OCC.TopExp module

class SwigPyIterator(*args, **kwargs)

Bases: object

advance()
copy()
decr()
distance()
equal()
incr()
next()
previous()
thisown

The membership flag

value()
class TopExp_Explorer(*args)

Bases: object

  • Creates an empty explorer, becomes usefull after Init.
Return type:None
  • Creates an Explorer on the Shape <S>. //! <ToFind> is the type of shapes to search. TopAbs_VERTEX, TopAbs_EDGE, ... //! <ToAvoid> is the type of shape to skip in the exploration. If <ToAvoid> is equal or less complex than <ToFind> or if <ToAVoid> is SHAPE it has no effect on the exploration.
Parameters:
  • S (TopoDS_Shape &) –
  • ToFind (TopAbs_ShapeEnum) –
  • ToAvoid (TopAbs_ShapeEnum) – default value is TopAbs_SHAPE
Return type:

None

Clear()
  • Clears the content of the explorer. It will return False on More().
Return type:None
Current()
  • Returns the current shape in the exploration. Exceptions Standard_NoSuchObject if this explorer has no more shapes to explore.
Return type:TopoDS_Shape
Depth()
  • Returns the current depth of the exploration. 0 is the shape to explore itself.
Return type:int
Destroy()
Return type:None
Init()
  • Resets this explorer on the shape S. It is initialized to search the shape S, for shapes of type ToFind, that are not part of a shape ToAvoid. If the shape ToAvoid is equal to TopAbs_SHAPE, or if it is the same as, or less complex than, the shape ToFind it has no effect on the search.
Parameters:
  • S (TopoDS_Shape &) –
  • ToFind (TopAbs_ShapeEnum) –
  • ToAvoid (TopAbs_ShapeEnum) – default value is TopAbs_SHAPE
Return type:

None

More()
  • Returns True if there are more shapes in the exploration.
Return type:bool
Next()
  • Moves to the next Shape in the exploration. Exceptions Standard_NoMoreObject if there are no more shapes to explore.
Return type:None
ReInit()
  • Reinitialize the exploration with the original arguments.
Return type:None
thisown

The membership flag

register_handle(handle, base_object)

Inserts the handle into the base object to prevent memory corruption in certain cases

class topexp

Bases: object

static CommonVertex(*args)
  • Finds the vertex <V> common to the two edges <E1,E2>, returns True if this vertex exists. //! Warning: <V> has sense only if the value <True> is returned
Parameters:
  • E1 (TopoDS_Edge &) –
  • E2 (TopoDS_Edge &) –
  • V (TopoDS_Vertex &) –
Return type:

bool

static FirstVertex(*args)
  • Returns the Vertex of orientation FORWARD in E. If there is none returns a Null Shape. CumOri = True : taking account the edge orientation
Parameters:
  • E (TopoDS_Edge &) –
  • CumOri (bool) – default value is Standard_False
Return type:

TopoDS_Vertex

static LastVertex(*args)
  • Returns the Vertex of orientation REVERSED in E. If there is none returns a Null Shape. CumOri = True : taking account the edge orientation
Parameters:
  • E (TopoDS_Edge &) –
  • CumOri (bool) – default value is Standard_False
Return type:

TopoDS_Vertex

static MapShapes(*args)
  • Tool to explore a topological data structure. Stores in the map <M> all the sub-shapes of <S> of type <T>. //! Warning: The map is not cleared at first.
Parameters:
  • S (TopoDS_Shape &) –
  • T (TopAbs_ShapeEnum) –
  • M (TopTools_IndexedMapOfShape &) –
Return type:

void

  • Stores in the map <M> all the sub-shapes of <S>.
Parameters:
  • S (TopoDS_Shape &) –
  • M (TopTools_IndexedMapOfShape &) –
Return type:

void

static MapShapesAndAncestors(*args)
  • Stores in the map <M> all the subshape of <S> of type <TS> for each one append to the list all the ancestors of type <TA>. For example map all the edges and bind the list of faces. Warning: The map is not cleared at first.
Parameters:
  • S (TopoDS_Shape &) –
  • TS (TopAbs_ShapeEnum) –
  • TA (TopAbs_ShapeEnum) –
  • M (TopTools_IndexedDataMapOfShapeListOfShape &) –
Return type:

void

static Vertices(*args)
  • Returns in Vfirst, Vlast the FORWARD and REVERSED vertices of the edge <E>. May be null shapes. CumOri = True : taking account the edge orientation
Parameters:
  • E (TopoDS_Edge &) –
  • Vfirst (TopoDS_Vertex &) –
  • Vlast (TopoDS_Vertex &) –
  • CumOri (bool) – default value is Standard_False
Return type:

void

  • Returns in Vfirst, Vlast the first and last vertices of the open wire <W>. May be null shapes. if <W> is closed Vfirst and Vlast are a same vertex on <W>. if <W> is no manifold. VFirst and VLast are null shapes.
Parameters:
  • W (TopoDS_Wire &) –
  • Vfirst (TopoDS_Vertex &) –
  • Vlast (TopoDS_Vertex &) –
Return type:

void

thisown

The membership flag

topexp_CommonVertex(*args)
  • Finds the vertex <V> common to the two edges <E1,E2>, returns True if this vertex exists. //! Warning: <V> has sense only if the value <True> is returned
Parameters:
  • E1 (TopoDS_Edge &) –
  • E2 (TopoDS_Edge &) –
  • V (TopoDS_Vertex &) –
Return type:

bool

topexp_FirstVertex(*args)
  • Returns the Vertex of orientation FORWARD in E. If there is none returns a Null Shape. CumOri = True : taking account the edge orientation
Parameters:
  • E (TopoDS_Edge &) –
  • CumOri (bool) – default value is Standard_False
Return type:

TopoDS_Vertex

topexp_LastVertex(*args)
  • Returns the Vertex of orientation REVERSED in E. If there is none returns a Null Shape. CumOri = True : taking account the edge orientation
Parameters:
  • E (TopoDS_Edge &) –
  • CumOri (bool) – default value is Standard_False
Return type:

TopoDS_Vertex

topexp_MapShapes(*args)
  • Tool to explore a topological data structure. Stores in the map <M> all the sub-shapes of <S> of type <T>. //! Warning: The map is not cleared at first.
Parameters:
  • S (TopoDS_Shape &) –
  • T (TopAbs_ShapeEnum) –
  • M (TopTools_IndexedMapOfShape &) –
Return type:

void

  • Stores in the map <M> all the sub-shapes of <S>.
Parameters:
  • S (TopoDS_Shape &) –
  • M (TopTools_IndexedMapOfShape &) –
Return type:

void

topexp_MapShapesAndAncestors(*args)
  • Stores in the map <M> all the subshape of <S> of type <TS> for each one append to the list all the ancestors of type <TA>. For example map all the edges and bind the list of faces. Warning: The map is not cleared at first.
Parameters:
  • S (TopoDS_Shape &) –
  • TS (TopAbs_ShapeEnum) –
  • TA (TopAbs_ShapeEnum) –
  • M (TopTools_IndexedDataMapOfShapeListOfShape &) –
Return type:

void

topexp_Vertices(*args)
  • Returns in Vfirst, Vlast the FORWARD and REVERSED vertices of the edge <E>. May be null shapes. CumOri = True : taking account the edge orientation
Parameters:
  • E (TopoDS_Edge &) –
  • Vfirst (TopoDS_Vertex &) –
  • Vlast (TopoDS_Vertex &) –
  • CumOri (bool) – default value is Standard_False
Return type:

void

  • Returns in Vfirst, Vlast the first and last vertices of the open wire <W>. May be null shapes. if <W> is closed Vfirst and Vlast are a same vertex on <W>. if <W> is no manifold. VFirst and VLast are null shapes.
Parameters:
  • W (TopoDS_Wire &) –
  • Vfirst (TopoDS_Vertex &) –
  • Vlast (TopoDS_Vertex &) –
Return type:

void