OCC.TopoDS module¶
Provides methods to cast objects of classTopoDS_Shape to be onjects of more specializedsub-classes. Types are verified, thus in the examplebelow, the first two blocks are correct but the third isrejected by the compiler.
-
class
Handle_TopoDS_HShape
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TopoDS_ListNodeOfListOfShape
(*args)¶ Bases:
OCC.TCollection.Handle_TCollection_MapNode
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TopoDS_TCompSolid
(*args)¶ Bases:
OCC.TopoDS.Handle_TopoDS_TShape
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TopoDS_TCompound
(*args)¶ Bases:
OCC.TopoDS.Handle_TopoDS_TShape
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TopoDS_TEdge
(*args)¶ Bases:
OCC.TopoDS.Handle_TopoDS_TShape
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TopoDS_TFace
(*args)¶ Bases:
OCC.TopoDS.Handle_TopoDS_TShape
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TopoDS_TShape
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TopoDS_TShell
(*args)¶ Bases:
OCC.TopoDS.Handle_TopoDS_TShape
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TopoDS_TSolid
(*args)¶ Bases:
OCC.TopoDS.Handle_TopoDS_TShape
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TopoDS_TVertex
(*args)¶ Bases:
OCC.TopoDS.Handle_TopoDS_TShape
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TopoDS_TWire
(*args)¶ Bases:
OCC.TopoDS.Handle_TopoDS_TShape
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
class
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:
-
MakeCompSolid
()¶ - Make an empty Composite Solid.
Parameters: C (TopoDS_CompSolid &) – Return type: None
-
MakeSolid
()¶ - Make a Solid covering the whole 3D space.
Parameters: S (TopoDS_Solid &) – 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:
-
thisown
¶ The membership flag
-
-
class
TopoDS_CompSolid
(*args)¶ Bases:
OCC.TopoDS.TopoDS_Shape
- Constructs an Undefined CompSolid.
Return type: None -
thisown
¶ The membership flag
-
class
TopoDS_Compound
(*args)¶ Bases:
OCC.TopoDS.TopoDS_Shape
- Constructs an Undefined Compound.
Return type: None -
thisown
¶ The membership flag
-
class
TopoDS_Edge
(*args)¶ Bases:
OCC.TopoDS.TopoDS_Shape
- Undefined Edge.
Return type: None -
thisown
¶ The membership flag
-
class
TopoDS_Face
(*args)¶ Bases:
OCC.TopoDS.TopoDS_Shape
- Undefined Face.
Return type: None -
thisown
¶ The membership flag
-
class
TopoDS_HShape
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- Constructs an empty shape object
Return type: None - Constructs a shape object defined by the shape aShape.
Parameters: aShape (TopoDS_Shape &) – Return type: None -
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
()¶
-
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
TopoDS_Iterator
(*args)¶ Bases:
object
- Creates an empty Iterator.
Return type: None - Creates an Iterator on <S> sub-shapes. 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: Return type: -
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: Return type:
-
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
TopoDS_ListIteratorOfListOfShape
(*args)¶ Bases:
object
Return type: None Parameters: L (TopoDS_ListOfShape &) – Return type: None -
Value
()¶ Return type: TopoDS_Shape
-
thisown
¶ The membership flag
-
-
class
TopoDS_ListNodeOfListOfShape
(*args)¶ Bases:
OCC.TCollection.TCollection_MapNode
Parameters: - I (TopoDS_Shape &) –
- n (TCollection_MapNodePtr &) –
Return type: -
GetHandle
()¶
-
Value
()¶ Return type: TopoDS_Shape
-
thisown
¶ The membership flag
-
class
TopoDS_ListOfShape
(*args)¶ Bases:
object
Return type: None Parameters: Other (TopoDS_ListOfShape &) – Return type: None -
Append
()¶ Parameters: - I (TopoDS_Shape &) –
- I –
- theIt (TopoDS_ListIteratorOfListOfShape &) –
- Other (TopoDS_ListOfShape &) –
Return type: Return type: Return type:
-
First
()¶ Return type: TopoDS_Shape
-
InsertAfter
()¶ Parameters: - I (TopoDS_Shape &) –
- It (TopoDS_ListIteratorOfListOfShape &) –
- Other (TopoDS_ListOfShape &) –
- It –
Return type: Return type:
-
InsertBefore
()¶ Parameters: - I (TopoDS_Shape &) –
- It (TopoDS_ListIteratorOfListOfShape &) –
- Other (TopoDS_ListOfShape &) –
- It –
Return type: Return type:
-
Last
()¶ Return type: TopoDS_Shape
-
Prepend
()¶ Parameters: - I (TopoDS_Shape &) –
- I –
- theIt (TopoDS_ListIteratorOfListOfShape &) –
- Other (TopoDS_ListOfShape &) –
Return type: Return type: Return type:
-
thisown
¶ The membership flag
-
-
class
TopoDS_Shape
(TopoDS_Shape self, TopoDS_Shape arg0) → TopoDS_Shape¶ Bases:
object
- Creates a NULL Shape referring to nothing.
Return type: None -
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 (int) – 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
-
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
-
Locked
()¶ - Returns the locked flag.
Return type: bool - Sets the locked flag.
Parameters: F (bool) – 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
TopoDS_Shell
(*args)¶ Bases:
OCC.TopoDS.TopoDS_Shape
- Constructs an Undefined Shell.
Return type: None -
thisown
¶ The membership flag
-
class
TopoDS_Solid
(*args)¶ Bases:
OCC.TopoDS.TopoDS_Shape
- Constructs an Undefined Solid.
Return type: None -
thisown
¶ The membership flag
-
class
TopoDS_TCompSolid
(*args)¶ Bases:
OCC.TopoDS.TopoDS_TShape
- Creates an empty TCompSolid.
Return type: None -
GetHandle
()¶
-
thisown
¶ The membership flag
-
class
TopoDS_TCompound
(*args)¶ Bases:
OCC.TopoDS.TopoDS_TShape
- Creates an empty TCompound.
Return type: None -
GetHandle
()¶
-
thisown
¶ The membership flag
-
class
TopoDS_TEdge
(*args, **kwargs)¶ Bases:
OCC.TopoDS.TopoDS_TShape
-
GetHandle
()¶
-
thisown
¶ The membership flag
-
-
class
TopoDS_TFace
(*args)¶ Bases:
OCC.TopoDS.TopoDS_TShape
- Creates an empty TFace.
Return type: None -
GetHandle
()¶
-
thisown
¶ The membership flag
-
class
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
()¶
-
Infinite
()¶ - Returns the infinity flag.
Return type: bool - Sets the infinity flag.
Parameters: C (bool) – Return type: None
-
Locked
()¶ - Returns the locked flag.
Return type: bool - Sets the locked flag.
Parameters: F (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
TopoDS_TShell
(*args)¶ Bases:
OCC.TopoDS.TopoDS_TShape
- Creates an empty TShell.
Return type: None -
GetHandle
()¶
-
thisown
¶ The membership flag
-
class
TopoDS_TSolid
(*args)¶ Bases:
OCC.TopoDS.TopoDS_TShape
- Creates an empty TSolid.
Return type: None -
GetHandle
()¶
-
thisown
¶ The membership flag
-
class
TopoDS_TVertex
(*args, **kwargs)¶ Bases:
OCC.TopoDS.TopoDS_TShape
-
GetHandle
()¶
-
thisown
¶ The membership flag
-
-
class
TopoDS_TWire
(*args)¶ Bases:
OCC.TopoDS.TopoDS_TShape
- Creates an empty TWire.
Return type: None -
GetHandle
()¶
-
thisown
¶ The membership flag
-
class
TopoDS_Vertex
(TopoDS_Vertex self, TopoDS_Vertex arg0) → TopoDS_Vertex¶ Bases:
OCC.TopoDS.TopoDS_Shape
- Undefined Vertex.
Return type: None -
thisown
¶ The membership flag
-
class
TopoDS_Wire
(*args)¶ Bases:
OCC.TopoDS.TopoDS_Shape
- Undefined Wire.
Return type: None -
thisown
¶ The membership flag
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases
-
class
topods
¶ Bases:
object
-
static
CompSolid
(*args) → OCC.TopoDS.TopoDS_CompSolid¶ - 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: Return type: inline TopoDS_CompSolid
-
static
Compound
(*args) → OCC.TopoDS.TopoDS_Compound¶ - 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: Return type: inline TopoDS_Compound
-
static
Edge
(*args) → OCC.TopoDS.TopoDS_Edge¶ - 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: Return type: inline TopoDS_Edge
-
static
Face
(*args) → OCC.TopoDS.TopoDS_Face¶ - 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: Return type: inline TopoDS_Face
-
static
Shell
(*args) → OCC.TopoDS.TopoDS_Shell¶ - 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: Return type: inline TopoDS_Shell
-
static
Solid
(*args) → OCC.TopoDS.TopoDS_Solid¶ - 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: Return type: inline TopoDS_Solid
-
static
Vertex
(*args) → OCC.TopoDS.TopoDS_Vertex¶ - 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: Return type: inline TopoDS_Vertex
-
static
Wire
(*args) → OCC.TopoDS.TopoDS_Wire¶ - 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: Return type: inline TopoDS_Wire
-
thisown
¶ The membership flag
-
static
-
topods_CompSolid
(*args) → OCC.TopoDS.TopoDS_CompSolid¶ - 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: Return type: inline TopoDS_CompSolid
-
topods_Compound
(*args) → OCC.TopoDS.TopoDS_Compound¶ - 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: Return type: inline TopoDS_Compound
-
topods_Edge
(*args) → OCC.TopoDS.TopoDS_Edge¶ - 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: Return type: inline TopoDS_Edge
-
topods_Face
(*args) → OCC.TopoDS.TopoDS_Face¶ - 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: Return type: inline TopoDS_Face
-
topods_Shell
(*args) → OCC.TopoDS.TopoDS_Shell¶ - 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: Return type: inline TopoDS_Shell
-
topods_Solid
(*args) → OCC.TopoDS.TopoDS_Solid¶ - 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: Return type: inline TopoDS_Solid
-
topods_Vertex
(*args) → OCC.TopoDS.TopoDS_Vertex¶ - 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: Return type: inline TopoDS_Vertex
-
topods_Wire
(*args) → OCC.TopoDS.TopoDS_Wire¶ - 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: Return type: inline TopoDS_Wire