py4design.py3dmodel.fetch module

py4design.py3dmodel.fetch.points_frm_edge(occedge)

This function fetches a list of points from the OCCedge. The list of points consist of the starting and ending point of the edge.

Parameters:
occedge : OCCedge

The OCCedge to be examined.

Returns:
list of points : pyptlist

The list of points extracted from the OCCedge.

py4design.py3dmodel.fetch.is_edge_bspline(occedge)

This function checks if an OCCedge contains a bspline curve.

Parameters:
occedge : OCCedge

The OCCedge to be examined.

Returns:
True or False : bool

True or False if the edge contains a bspline curve.

py4design.py3dmodel.fetch.is_edge_line(occedge)

This function checks if an OCCedge contains a line.

Parameters:
occedge : OCCedge

The OCCedge to be examined.

Returns:
True or False : bool

True or False if the edge contains a line.

py4design.py3dmodel.fetch.poles_from_bsplinecurve_edge(occedge)

This function fetches the poles of a bspline OCCedge.

Parameters:
occedge : OCCedge

The OCCedge to be examined. The OCCedge needs to contain a bspline curve

Returns:
List of poles : pyptlist

List of poles of the bspline curve

py4design.py3dmodel.fetch.edge_domain(occedge)

This function fetches the domain of an OCCedge.

Parameters:
occedge : OCCedge

The OCCedge to be examined.

Returns:
lower bound: float

The lower bound of the OCCedge domain

upper bound: float

The upper bound of the OCCedge domain

py4design.py3dmodel.fetch.points_frm_wire(occwire)

This function fetches a list of points from the OCCwire. The wire is constructed based on the list of points. TODO: WHEN DEALING WITH OPEN WIRE IT WILL NOT RETURN THE LAST VERTEX

Parameters:
occwire : OCCwire

The OCCwire to be examined.

Returns:
list of points : pyptlist

The list of points extracted from the OCCwire.

py4design.py3dmodel.fetch.edges_frm_wire(occwire)

This function fetches a list of OCCedges from the OCCwire. The wire is constructed based on the list of edges.

Parameters:
occwire : OCCwire

The OCCwire to be examined.

Returns:
list of edges : list of OCCedges

The list of OCCedges extracted from the OCCwire.

py4design.py3dmodel.fetch.points_frm_occface(occface)

This function fetches a list of points from the OCCface. The face is constructed based on the list of points.

Parameters:
occface : OCCface

The OCCface to be examined.

Returns:
list of points : pyptlist

The list of points extracted from the OCCface.

py4design.py3dmodel.fetch.wires_frm_face(occface)

This function fetches a list of OCCwires from the OCCface. The face is constructed based on the list of wires.

Parameters:
occface : OCCface

The OCCface to be examined.

Returns:
list of wires : list of OCCwires

The list of OCCwires extracted from the OCCface.

py4design.py3dmodel.fetch.is_face_null(occface)

This function checks if the OCCface is null. Null means it is a degenerated face.

Parameters:
occface : OCCface

The OCCface to be examined.

Returns:
True or False : bool

If True OCCface is null, if False OCCface is not null.

py4design.py3dmodel.fetch.faces_frm_shell(occshell)

This function fetches a list of OCCfaces from the OCCshell. The shell is constructed based on the list of faces.

Parameters:
occshell : OCCshell

The OCCshell to be examined.

Returns:
list of faces : list of OCCfaces

The list of OCCfaces extracted from the OCCshell.

py4design.py3dmodel.fetch.faces_frm_solid(occsolid)

This function fetches a list of OCCfaces from the OCCsolid. The solid is constructed based on the list of faces.

Parameters:
occsolid : OCCsolid

The OCCsolid to be examined.

Returns:
list of faces : list of OCCfaces

The list of OCCfaces extracted from the OCCsolid.

py4design.py3dmodel.fetch.shells_frm_solid(occsolid)

This function fetches a list of OCCshells from the OCCsolid. The solid is constructed based on the list of shells.

Parameters:
occsolid : OCCsolid

The OCCsolid to be examined.

Returns:
list of shells : list of OCCshells

The list of OCCshells extracted from the OCCsolid.

py4design.py3dmodel.fetch.points_frm_solid(occsolid)

This function fetches a list of points from the OCCsolid.

Parameters:
occsolid : OCCsolid

The OCCsolid to be examined.

Returns:
list of points : pyptlist

The list of points extracted from the OCCsolid.

py4design.py3dmodel.fetch.solids_frm_compsolid(occcompsolid)

This function fetches a list of OCCsolids from the OCCcompsolid.

Parameters:
occcompsolid : OCCcompsolid

The OCCcompsolid to be examined.

Returns:
list of solids : list of OCCsolids

The list of OCCsolids extracted from the occcompsolid.

py4design.py3dmodel.fetch.topos_frm_compound(occcompound)

This function extracts all the topologies in the OCCcompound.

Parameters:
occcompound : OCCcompound

The OCCcompound to be examined.

Returns:
dictionary of topologies : dictionary of OCCtopologies

The dictionary of OCCtopologies extracted from the occcompound. Specify the topology as keywords to obtain each topology list. e.g. dictionary of topologies[“face”] to extract the list of OCCfaces in the OCCcompound.

py4design.py3dmodel.fetch.is_compound_null(occ_compound)

This function checks if the OCCcompound is null. Null means its empty.

Parameters:
occcompound : OCCcompound

The OCCcompound to be examined.

Returns:
True or False : bool

If True the compound is null, if False compound is not null.

py4design.py3dmodel.fetch.get_topotype(occtopology_or_topo_str)

This function fetches the OCCtopology class object based on the specified OCCtopology or a string describing the topology. e.g. “face”.

Parameters:
occtopology_or_topo_str : OCCtopology or a string describing the topology.

The strings can be e.g. “compound”, “compsolid”, “solid”, “shell”, “face”, “wire”, “edge”, “vertex”.

Returns:
topology class : OCCtopology class (TopABS_xx)

The OCCtopology class based on the specified inputs.

py4design.py3dmodel.fetch.topo2topotype(occtopology)

This function converts the original OCCtopology of the given topology. e.g. an OCCcompound that is originally an OCCface etc.

Parameters:
occtopology : OCCtopology

The OCCtopology to be converted. OCCtopology includes: OCCshape, OCCcompound, OCCcompsolid, OCCsolid, OCCshell, OCCface, OCCwire, OCCedge, OCCvertex

Returns:
original topology : OCCtopology

The original OCCtopology of the input.

py4design.py3dmodel.fetch.topo_explorer(occtopo2explore, topotype2find)

This function explores and fetches the specified topological type from the given OCCtopology. e.g. find a list of OCCfaces in an OCCcompound.

Parameters:
occtopo2explore : OCCtopology

The OCCtopology to be explored. OCCtopology includes: OCCshape, OCCcompound, OCCcompsolid, OCCsolid, OCCshell, OCCface, OCCwire, OCCedge, OCCvertex

topotype2find : str

The string describing the topology to find. The strings can be e.g. “compound”, “compsolid”, “solid”, “shell”, “face”, “wire”, “edge”, “vertex”.

Returns:
list of topology : list of OCCtopology

The list of OCCtopology found in the specified OCCtopology.