OCC.TopExp module

class OCC.TopExp.Handle_TopExp_StackNodeOfStackOfIterator(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.TopExp.SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
class OCC.TopExp.TopExp_Explorer(*args)

Bases: object

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

  • 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

class OCC.TopExp.TopExp_StackIteratorOfStackOfIterator(*args)

Bases: object

Initialize()
Parameters:S (TopExp_StackOfIterator &) –
Return type:None
More()
Return type:bool
Next()
Return type:None
Value()
Return type:TopoDS_Iterator
thisown

The membership flag

class OCC.TopExp.TopExp_StackNodeOfStackOfIterator(*args)

Bases: OCC.TCollection.TCollection_MapNode

GetHandle()

TopExp_StackNodeOfStackOfIterator_GetHandle(TopExp_StackNodeOfStackOfIterator self) -> Handle_TopExp_StackNodeOfStackOfIterator

Value()
Return type:TopoDS_Iterator
thisown

The membership flag

class OCC.TopExp.TopExp_StackOfIterator

Bases: object

Assign()
Parameters:Other (TopExp_StackOfIterator &) –
Return type:TopExp_StackOfIterator
ChangeTop()
Return type:TopoDS_Iterator
Clear()
Return type:None
Depth()
Return type:int
IsEmpty()
Return type:bool
Pop()
Return type:None
Push()
Parameters:I (TopoDS_Iterator &) –
Return type:None
Set()
Parameters:Other (TopExp_StackOfIterator &) –
Return type:TopExp_StackOfIterator
Top()
Return type:TopoDS_Iterator
thisown

The membership flag

class OCC.TopExp.topexp(*args, **kwargs)

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

  • 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

  • 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 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

OCC.TopExp.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

OCC.TopExp.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

  • 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

OCC.TopExp.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

  • 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

OCC.TopExp.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

OCC.TopExp.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

OCC.TopExp.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 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