OCC.TopoDS module

class OCC.TopoDS.Handle_TopoDS_HShape(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

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

The membership flag

class OCC.TopoDS.Handle_TopoDS_ListNodeOfListOfShape(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

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

The membership flag

class OCC.TopoDS.Handle_TopoDS_TCompSolid(*args)

Bases: OCC.TopoDS.Handle_TopoDS_TShape

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

The membership flag

class OCC.TopoDS.Handle_TopoDS_TCompound(*args)

Bases: OCC.TopoDS.Handle_TopoDS_TShape

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

The membership flag

class OCC.TopoDS.Handle_TopoDS_TEdge(*args)

Bases: OCC.TopoDS.Handle_TopoDS_TShape

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

The membership flag

class OCC.TopoDS.Handle_TopoDS_TFace(*args)

Bases: OCC.TopoDS.Handle_TopoDS_TShape

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

The membership flag

class OCC.TopoDS.Handle_TopoDS_TShape(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

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

The membership flag

class OCC.TopoDS.Handle_TopoDS_TShell(*args)

Bases: OCC.TopoDS.Handle_TopoDS_TShape

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

The membership flag

class OCC.TopoDS.Handle_TopoDS_TSolid(*args)

Bases: OCC.TopoDS.Handle_TopoDS_TShape

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

The membership flag

class OCC.TopoDS.Handle_TopoDS_TVertex(*args)

Bases: OCC.TopoDS.Handle_TopoDS_TShape

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

The membership flag

class OCC.TopoDS.Handle_TopoDS_TWire(*args)

Bases: OCC.TopoDS.Handle_TopoDS_TShape

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

The membership flag

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

Bases: object

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

The membership flag

value()
class OCC.TopoDS.TopoDS_Builder

Bases: object

Add()
  • Add the Shape C in the Shape S. Exceptions - TopoDS_FrozenShape if S is not free and cannot be modified. - TopoDS__UnCompatibleShapes if S and C are not compatible.
Parameters:
  • S (TopoDS_Shape &) –
  • C (TopoDS_Shape &) –
Return type:

None

MakeCompSolid()
  • Make an empty Composite Solid.
Parameters:C (TopoDS_CompSolid &) –
Return type:None
MakeCompound()
  • Make an empty Compound.
Parameters:C (TopoDS_Compound &) –
Return type:None
MakeShell()
  • Make an empty Shell.
Parameters:S (TopoDS_Shell &) –
Return type:None
MakeSolid()
  • Make a Solid covering the whole 3D space.
Parameters:S (TopoDS_Solid &) –
Return type:None
MakeWire()
  • Make an empty Wire.
Parameters:W (TopoDS_Wire &) –
Return type:None
Remove()
  • Remove the Shape C from the Shape S. Exceptions TopoDS_FrozenShape if S is frozen and cannot be modified.
Parameters:
  • S (TopoDS_Shape &) –
  • C (TopoDS_Shape &) –
Return type:

None

thisown

The membership flag

class OCC.TopoDS.TopoDS_CompSolid

Bases: OCC.TopoDS.TopoDS_Shape

thisown

The membership flag

class OCC.TopoDS.TopoDS_Compound

Bases: OCC.TopoDS.TopoDS_Shape

thisown

The membership flag

class OCC.TopoDS.TopoDS_Edge

Bases: OCC.TopoDS.TopoDS_Shape

thisown

The membership flag

class OCC.TopoDS.TopoDS_Face

Bases: OCC.TopoDS.TopoDS_Shape

thisown

The membership flag

class OCC.TopoDS.TopoDS_HShape(*args)

Bases: OCC.MMgt.MMgt_TShared

ChangeShape()
  • Exchanges the TopoDS_Shape object defining this shape for another one referencing the same underlying shape Accesses the list of shapes within the underlying shape referenced by the TopoDS_Shape object. Returns a reference to a TopoDS_Shape based on this shape. The TopoDS_Shape can be modified.
Return type:TopoDS_Shape
GetHandle()

TopoDS_HShape_GetHandle(TopoDS_HShape self) -> Handle_TopoDS_HShape

Shape()
  • Loads this shape with the shape aShape
Parameters:aShape (TopoDS_Shape &) –
Return type:None
  • Returns a reference to a constant TopoDS_Shape based on this shape.
Return type:TopoDS_Shape
thisown

The membership flag

class OCC.TopoDS.TopoDS_Iterator(*args)

Bases: object

Initialize()
  • Initializes this iterator with shape S. Note: - If cumOri is true, the function composes all sub-shapes with the orientation of S. - If cumLoc is true, the function multiplies all sub-shapes by the location of S, i.e. it applies to each sub-shape the transformation that is associated with S.
Parameters:
  • S (TopoDS_Shape &) –
  • cumOri (bool) – default value is Standard_True
  • cumLoc (bool) – default value is Standard_True
Return type:

None

  • Initializes this iterator with shape S. Note: - If cumOri is true, the function composes all sub-shapes with the orientation of S. - If cumLoc is true, the function multiplies all sub-shapes by the location of S, i.e. it applies to each sub-shape the transformation that is associated with S.
Parameters:
  • S (TopoDS_Shape &) –
  • cumOri (bool) – default value is Standard_True
  • cumLoc (bool) – default value is Standard_True
Return type:

None

  • Initializes this iterator with shape S. Note: - If cumOri is true, the function composes all sub-shapes with the orientation of S. - If cumLoc is true, the function multiplies all sub-shapes by the location of S, i.e. it applies to each sub-shape the transformation that is associated with S.
Parameters:
  • S (TopoDS_Shape &) –
  • cumOri (bool) – default value is Standard_True
  • cumLoc (bool) – default value is Standard_True
Return type:

None

More()
  • Returns true if there is another sub-shape in the shape which this iterator is scanning.
Return type:bool
Next()
  • Moves on to the next sub-shape in the shape which this iterator is scanning. Exceptions Standard_NoMoreObject if there are no more sub-shapes in the shape.
Return type:None
Value()
  • Returns the current sub-shape in the shape which this iterator is scanning. Exceptions Standard_NoSuchObject if there is no current sub-shape.
Return type:TopoDS_Shape
thisown

The membership flag

class OCC.TopoDS.TopoDS_ListIteratorOfListOfShape(*args)

Bases: object

Initialize()
Parameters:L (TopoDS_ListOfShape &) –
Return type:None
More()
Return type:bool
Next()
Return type:None
Value()
Return type:TopoDS_Shape
thisown

The membership flag

class OCC.TopoDS.TopoDS_ListNodeOfListOfShape(*args)

Bases: OCC.TCollection.TCollection_MapNode

GetHandle()

TopoDS_ListNodeOfListOfShape_GetHandle(TopoDS_ListNodeOfListOfShape self) -> Handle_TopoDS_ListNodeOfListOfShape

Value()
Return type:TopoDS_Shape
thisown

The membership flag

class OCC.TopoDS.TopoDS_ListOfShape

Bases: object

Append()
Parameters:
  • I (TopoDS_Shape &) –
  • I
  • theIt (TopoDS_ListIteratorOfListOfShape &) –
  • Other (TopoDS_ListOfShape &) –
Return type:

None

Return type:

None

Return type:

None

Assign()
Parameters:Other (TopoDS_ListOfShape &) –
Return type:None
Clear()
Return type:None
Extent()
Return type:int
First()
Return type:TopoDS_Shape
InsertAfter()
Parameters:
  • I (TopoDS_Shape &) –
  • It (TopoDS_ListIteratorOfListOfShape &) –
  • Other (TopoDS_ListOfShape &) –
  • It
Return type:

None

Return type:

None

InsertBefore()
Parameters:
  • I (TopoDS_Shape &) –
  • It (TopoDS_ListIteratorOfListOfShape &) –
  • Other (TopoDS_ListOfShape &) –
  • It
Return type:

None

Return type:

None

IsEmpty()
Return type:bool
Last()
Return type:TopoDS_Shape
Prepend()
Parameters:
  • I (TopoDS_Shape &) –
  • I
  • theIt (TopoDS_ListIteratorOfListOfShape &) –
  • Other (TopoDS_ListOfShape &) –
Return type:

None

Return type:

None

Return type:

None

Remove()
Parameters:It (TopoDS_ListIteratorOfListOfShape &) –
Return type:None
RemoveFirst()
Return type:None
Set()
Parameters:Other (TopoDS_ListOfShape &) –
Return type:None
thisown

The membership flag

class OCC.TopoDS.TopoDS_Shape(TopoDS_Shape self, TopoDS_Shape arg0)

Bases: object

Checked()
  • Returns the checked flag.
Return type:bool
  • Sets the checked flag.
Parameters:C (bool) –
Return type:None
Closed()
  • Returns the closedness flag.
Return type:bool
  • Sets the closedness flag.
Parameters:C (bool) –
Return type:None
Complement()
  • Complements the orientation, using the Complement method from the TopAbs package.
Return type:None
Complemented()
  • Returns a shape similar to <self> with the orientation complemented, using the Complement method from the TopAbs package.
Return type:TopoDS_Shape
Compose()
  • Updates the Shape Orientation by composition with <Orient>, using the Compose method from the TopAbs package.
Parameters:Orient (TopAbs_Orientation) –
Return type:None
Composed()
  • Returns a shape similar to <self> with the orientation composed with <Orient>, using the Compose method from the TopAbs package.
Parameters:Orient (TopAbs_Orientation) –
Return type:TopoDS_Shape
Convex()
  • Returns the convexness flag.
Return type:bool
  • Sets the convexness flag.
Parameters:C (bool) –
Return type:None
EmptyCopied()
  • Returns a new Shape with the same Orientation and Location and a new TShape with the same geometry and no sub-shapes.
Return type:TopoDS_Shape
EmptyCopy()
  • Replace <self> by a new Shape with the same Orientation and Location and a new TShape with the same geometry and no sub-shapes.
Return type:None
Free()
  • Returns the free flag.
Return type:bool
  • Sets the free flag.
Parameters:F (bool) –
Return type:None
HashCode()
  • Returns a hashed value denoting <self>. This value is in the range 1..<Upper>. It is computed from the TShape and the Location. The Orientation is not used.
Parameters:Upper (Standard_Integer) –
Return type:int
Infinite()
  • Returns the infinity flag.
Return type:bool
  • Sets the infinity flag.
Parameters:C (bool) –
Return type:None
IsEqual()
  • Returns True if two shapes are equal, i.e. if they share the same TShape with the same Locations and Orientations.
Parameters:other (TopoDS_Shape &) –
Return type:bool
IsNotEqual()
  • Negation of the IsEqual method.
Parameters:other (TopoDS_Shape &) –
Return type:bool
IsNull()
  • Returns true if this shape is null. In other words, it references no underlying shape with the potential to be given a location and an orientation.
Return type:bool
IsPartner()
  • Returns True if two shapes are partners, i.e. if they share the same TShape. Locations and Orientations may differ.
Parameters:other (TopoDS_Shape &) –
Return type:bool
IsSame()
  • Returns True if two shapes are same, i.e. if they share the same TShape with the same Locations. Orientations may differ.
Parameters:other (TopoDS_Shape &) –
Return type:bool
Located()
  • Returns a shape similar to <self> with the local coordinate system set to <Loc>.
Parameters:Loc (TopLoc_Location &) –
Return type:TopoDS_Shape
Location()
  • Returns the shape local coordinate system.
Return type:TopLoc_Location
  • Sets the shape local coordinate system.
Parameters:Loc (TopLoc_Location &) –
Return type:None
Modified()
  • Returns the modification flag.
Return type:bool
  • Sets the modification flag.
Parameters:M (bool) –
Return type:None
Move()
  • Multiplies the Shape location by <position>.
Parameters:position (TopLoc_Location &) –
Return type:None
Moved()
  • Returns a shape similar to <self> with a location multiplied by <position>.
Parameters:position (TopLoc_Location &) –
Return type:TopoDS_Shape
Nullify()
  • Destroys the reference to the underlying shape stored in this shape. As a result, this shape becomes null.
Return type:None
Orientable()
  • Returns the orientability flag.
Return type:bool
  • Sets the orientability flag.
Parameters:C (bool) –
Return type:None
Orientation()
  • Returns the shape orientation.
Return type:TopAbs_Orientation
  • Sets the shape orientation.
Parameters:Orient (TopAbs_Orientation) –
Return type:None
Oriented()
  • Returns a shape similar to <self> with the orientation set to <Or>.
Parameters:Or (TopAbs_Orientation) –
Return type:TopoDS_Shape
Reverse()
  • Reverses the orientation, using the Reverse method from the TopAbs package.
Return type:None
Reversed()
  • Returns a shape similar to <self> with the orientation reversed, using the Reverse method from the TopAbs package.
Return type:TopoDS_Shape
ShapeType()
  • Returns the value of the TopAbs_ShapeEnum enumeration that corresponds to this shape, for example VERTEX, EDGE, and so on. Exceptions Standard_NullObject if this shape is null.
Return type:TopAbs_ShapeEnum
TShape()
Return type:Handle_TopoDS_TShape
Parameters:T (Handle_TopoDS_TShape &) –
Return type:None
thisown

The membership flag

class OCC.TopoDS.TopoDS_Shell

Bases: OCC.TopoDS.TopoDS_Shape

thisown

The membership flag

class OCC.TopoDS.TopoDS_Solid

Bases: OCC.TopoDS.TopoDS_Shape

thisown

The membership flag

class OCC.TopoDS.TopoDS_TCompSolid

Bases: OCC.TopoDS.TopoDS_TShape

GetHandle()

TopoDS_TCompSolid_GetHandle(TopoDS_TCompSolid self) -> Handle_TopoDS_TCompSolid

thisown

The membership flag

class OCC.TopoDS.TopoDS_TCompound

Bases: OCC.TopoDS.TopoDS_TShape

GetHandle()

TopoDS_TCompound_GetHandle(TopoDS_TCompound self) -> Handle_TopoDS_TCompound

thisown

The membership flag

class OCC.TopoDS.TopoDS_TEdge(*args, **kwargs)

Bases: OCC.TopoDS.TopoDS_TShape

GetHandle()

TopoDS_TEdge_GetHandle(TopoDS_TEdge self) -> Handle_TopoDS_TEdge

thisown

The membership flag

class OCC.TopoDS.TopoDS_TFace

Bases: OCC.TopoDS.TopoDS_TShape

GetHandle()

TopoDS_TFace_GetHandle(TopoDS_TFace self) -> Handle_TopoDS_TFace

thisown

The membership flag

class OCC.TopoDS.TopoDS_TShape(*args, **kwargs)

Bases: OCC.MMgt.MMgt_TShared

Checked()
  • Returns the checked flag.
Return type:bool
  • Sets the checked flag.
Parameters:C (bool) –
Return type:None
Closed()
  • Returns the closedness flag.
Return type:bool
  • Sets the closedness flag.
Parameters:C (bool) –
Return type:None
Convex()
  • Returns the convexness flag.
Return type:bool
  • Sets the convexness flag.
Parameters:C (bool) –
Return type:None
EmptyCopy()
  • Returns a copy of the TShape with no sub-shapes.
Return type:Handle_TopoDS_TShape
Free()
  • Returns the free flag.
Return type:bool
  • Sets the free flag.
Parameters:F (bool) –
Return type:None
GetHandle()

TopoDS_TShape_GetHandle(TopoDS_TShape self) -> Handle_TopoDS_TShape

Infinite()
  • Returns the infinity flag.
Return type:bool
  • Sets the infinity flag.
Parameters:C (bool) –
Return type:None
Modified()
  • Returns the modification flag.
Return type:bool
  • Sets the modification flag.
Parameters:M (bool) –
Return type:None
Orientable()
  • Returns the orientability flag.
Return type:bool
  • Sets the orientability flag.
Parameters:C (bool) –
Return type:None
ShapeType()
  • Returns the type as a term of the ShapeEnum enum : VERTEX, EDGE, WIRE, FACE, ....
Return type:TopAbs_ShapeEnum
thisown

The membership flag

class OCC.TopoDS.TopoDS_TShell

Bases: OCC.TopoDS.TopoDS_TShape

GetHandle()

TopoDS_TShell_GetHandle(TopoDS_TShell self) -> Handle_TopoDS_TShell

thisown

The membership flag

class OCC.TopoDS.TopoDS_TSolid

Bases: OCC.TopoDS.TopoDS_TShape

GetHandle()

TopoDS_TSolid_GetHandle(TopoDS_TSolid self) -> Handle_TopoDS_TSolid

thisown

The membership flag

class OCC.TopoDS.TopoDS_TVertex(*args, **kwargs)

Bases: OCC.TopoDS.TopoDS_TShape

GetHandle()

TopoDS_TVertex_GetHandle(TopoDS_TVertex self) -> Handle_TopoDS_TVertex

thisown

The membership flag

class OCC.TopoDS.TopoDS_TWire

Bases: OCC.TopoDS.TopoDS_TShape

GetHandle()

TopoDS_TWire_GetHandle(TopoDS_TWire self) -> Handle_TopoDS_TWire

thisown

The membership flag

class OCC.TopoDS.TopoDS_Vertex(TopoDS_Vertex self, TopoDS_Vertex arg0)

Bases: OCC.TopoDS.TopoDS_Shape

thisown

The membership flag

class OCC.TopoDS.TopoDS_Wire

Bases: OCC.TopoDS.TopoDS_Shape

thisown

The membership flag

class OCC.TopoDS.topods(*args, **kwargs)

Bases: object

static CompSolid(*args)
  • Casts shape S to the more specialized return type, CompSolid. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_CompSolid

Return type:

inline TopoDS_CompSolid

static Compound(*args)
  • Casts shape S to the more specialized return type, Compound. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Compound

Return type:

inline TopoDS_Compound

static Edge(*args)
  • Casts shape S to the more specialized return type, Edge Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Edge

Return type:

inline TopoDS_Edge

static Face(*args)
  • Casts shape S to the more specialized return type, Face. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Face

Return type:

inline TopoDS_Face

static Shell(*args)
  • Casts shape S to the more specialized return type, Shell. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Shell

Return type:

inline TopoDS_Shell

static Solid(*args)
  • Casts shape S to the more specialized return type, Solid. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Solid

Return type:

inline TopoDS_Solid

static Vertex(*args)
  • Basic tool to access the data structure. Casts shape S to the more specialized return type, Vertex. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Vertex

Return type:

inline TopoDS_Vertex

static Wire(*args)
  • Casts shape S to the more specialized return type, Wire. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Wire

Return type:

inline TopoDS_Wire

thisown

The membership flag

OCC.TopoDS.topods_CompSolid(*args)
  • Casts shape S to the more specialized return type, CompSolid. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_CompSolid

Return type:

inline TopoDS_CompSolid

OCC.TopoDS.topods_Compound(*args)
  • Casts shape S to the more specialized return type, Compound. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Compound

Return type:

inline TopoDS_Compound

OCC.TopoDS.topods_Edge(*args)
  • Casts shape S to the more specialized return type, Edge Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Edge

Return type:

inline TopoDS_Edge

OCC.TopoDS.topods_Face(*args)
  • Casts shape S to the more specialized return type, Face. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Face

Return type:

inline TopoDS_Face

OCC.TopoDS.topods_Shell(*args)
  • Casts shape S to the more specialized return type, Shell. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Shell

Return type:

inline TopoDS_Shell

OCC.TopoDS.topods_Solid(*args)
  • Casts shape S to the more specialized return type, Solid. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Solid

Return type:

inline TopoDS_Solid

OCC.TopoDS.topods_Vertex(*args)
  • Basic tool to access the data structure. Casts shape S to the more specialized return type, Vertex. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Vertex

Return type:

inline TopoDS_Vertex

OCC.TopoDS.topods_Wire(*args)
  • Casts shape S to the more specialized return type, Wire. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
Parameters:
  • S (TopoDS_Shape &) –
  • & (TopoDS_Shape) –
Return type:

TopoDS_Wire

Return type:

inline TopoDS_Wire