OCC.Core.TopoDS module¶
TopoDS module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_topods.html
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
property
thisown
¶ The membership flag
-
value
()¶
-
-
class
TopoDS_AlertWithShape
(*args)¶ Bases:
object
- Constructor with shape argument
- param theShape
- type theShape
TopoDS_Shape
- rtype
None
-
GetShape
()¶ - Returns contained shape
- rtype
TopoDS_Shape
-
Merge
()¶ - Returns false.
- param theTarget
- type theTarget
Message_Alert
- rtype
bool
-
SetShape
()¶ - Sets the shape
- param theShape
- type theShape
TopoDS_Shape
- rtype
None
-
SupportsMerge
()¶ - Returns false.
- rtype
bool
-
property
thisown
¶ The membership flag
-
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.
- param S
- type S
TopoDS_Shape
- param C
- type C
TopoDS_Shape
- rtype
None
-
MakeCompSolid
()¶ - Make an empty Composite Solid.
- param C
- type C
TopoDS_CompSolid
- rtype
None
-
MakeCompound
()¶ - Make an empty Compound.
- param C
- type C
TopoDS_Compound
- rtype
None
-
MakeShell
()¶ - Make an empty Shell.
- param S
- type S
TopoDS_Shell
- rtype
None
-
MakeSolid
()¶ - Make a Solid covering the whole 3D space.
- param S
- type S
TopoDS_Solid
- rtype
None
-
MakeWire
()¶ - Make an empty Wire.
- param W
- type W
TopoDS_Wire
- rtype
None
-
Remove
()¶ - Remove the Shape C from the Shape S. Exceptions TopoDS_FrozenShape if S is frozen and cannot be modified.
- param S
- type S
TopoDS_Shape
- param C
- type C
TopoDS_Shape
- rtype
None
-
property
thisown
¶ The membership flag
-
-
class
TopoDS_CompSolid
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_Shape
- Constructs an Undefined CompSolid.
- rtype
None
-
property
thisown
¶ The membership flag
-
class
TopoDS_Compound
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_Shape
- Constructs an Undefined Compound.
- rtype
None
-
property
thisown
¶ The membership flag
-
class
TopoDS_Edge
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_Shape
- Undefined Edge.
- rtype
None
-
property
thisown
¶ The membership flag
-
class
TopoDS_Face
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_Shape
- Undefined Face.
- rtype
None
-
property
thisown
¶ The membership flag
-
class
TopoDS_HShape
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Constructs an empty shape object
- rtype
None* Constructs a shape object defined by the shape aShape.
- param aShape
- type aShape
TopoDS_Shape
- rtype
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.
- rtype
TopoDS_Shape
-
static
DownCast
(t)¶
-
Shape
()¶ - Loads this shape with the shape aShape
- param aShape
- type aShape
TopoDS_Shape
- rtype
None* Returns a reference to a constant TopoDS_Shape based on this shape.
- rtype
TopoDS_Shape
-
property
thisown
¶ The membership flag
-
class
TopoDS_Iterator
(*args)¶ Bases:
object
- Creates an empty Iterator.
- rtype
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.
- param S
- type S
TopoDS_Shape
- param cumOri
default value is Standard_True
- type cumOri
bool
- param cumLoc
default value is Standard_True
- type cumLoc
bool
- rtype
None
-
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.
- param S
- type S
TopoDS_Shape
- param cumOri
default value is Standard_True
- type cumOri
bool
- param cumLoc
default value is Standard_True
- type cumLoc
bool
- rtype
None
-
More
()¶ - Returns true if there is another sub-shape in the shape which this iterator is scanning.
- rtype
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.
- rtype
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.
- rtype
TopoDS_Shape
-
property
thisown
¶ The membership flag
-
class
TopoDS_ListIteratorOfListOfShape
(*args)¶ Bases:
object
-
ChangeValue
()¶
-
More
()¶
-
Next
()¶
-
Value
()¶
-
property
thisown
¶ The membership flag
-
-
class
TopoDS_ListOfShape
(*args)¶ Bases:
object
-
Append
()¶
-
Assign
()¶
-
Clear
()¶
-
First
()¶
-
InsertAfter
()¶
-
InsertBefore
()¶
-
Last
()¶
-
Prepend
()¶
-
Remove
()¶
-
RemoveFirst
()¶
-
Reverse
()¶
-
Set
()¶
-
Size
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
TopoDS_Shape
(TopoDS_Shape self, TopoDS_Shape arg0) → TopoDS_Shape* Creates a NULL Shape referring to nothing.¶ Bases:
object
- Return type
-
Checked
()¶ - Returns the checked flag.
- rtype
bool* Sets the checked flag.
- param theIsChecked
- type theIsChecked
bool
- rtype
None
-
Closed
()¶ - Returns the closedness flag.
- rtype
bool* Sets the closedness flag.
- param theIsClosed
- type theIsClosed
bool
- rtype
None
-
Complement
()¶ - Complements the orientation, using the Complement method from the TopAbs package.
- rtype
None
-
Complemented
()¶ - Returns a shape similar to <self> with the orientation complemented, using the Complement method from the TopAbs package.
- rtype
TopoDS_Shape
-
Compose
()¶ - Updates the Shape Orientation by composition with theOrient, using the Compose method from the TopAbs package.
- param theOrient
- type theOrient
TopAbs_Orientation
- rtype
None
-
Composed
()¶ - Returns a shape similar to <self> with the orientation composed with theOrient, using the Compose method from the TopAbs package.
- param theOrient
- type theOrient
TopAbs_Orientation
- rtype
TopoDS_Shape
-
Convex
()¶ - Returns the convexness flag.
- rtype
bool* Sets the convexness flag.
- param theIsConvex
- type theIsConvex
bool
- rtype
None
-
DumpJsonToString
(TopoDS_Shape self, int depth=-1) → std::string¶
-
EmptyCopied
()¶ - Returns a new Shape with the same Orientation and Location and a new TShape with the same geometry and no sub-shapes.
- rtype
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.
- rtype
None
-
Free
()¶ - Returns the free flag.
- rtype
bool* Sets the free flag.
- param theIsFree
- type theIsFree
bool
- rtype
None
-
HashCode
()¶ - Returns a hashed value denoting <self>. This value is in the range [1, theUpperBound]. It is computed from the TShape and the Location. The Orientation is not used. @param theUpperBound the upper bound of the range a computing hash code must be within returns a computed hash code, in the range [1, theUpperBound]
- param theUpperBound
- type theUpperBound
int
- rtype
int
-
Infinite
()¶ - Returns the infinity flag.
- rtype
bool* Sets the infinity flag.
- param theIsInfinite
- type theIsInfinite
bool
- rtype
None
-
IsEqual
()¶ - Returns True if two shapes are equal, i.e. if they share the same TShape with the same Locations and Orientations.
- param theOther
- type theOther
TopoDS_Shape
- rtype
bool
-
IsNotEqual
()¶ - Negation of the IsEqual method.
- param theOther
- type theOther
TopoDS_Shape
- rtype
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.
- rtype
bool
-
IsPartner
()¶ - Returns True if two shapes are partners, i.e. if they share the same TShape. Locations and Orientations may differ.
- param theOther
- type theOther
TopoDS_Shape
- rtype
bool
-
IsSame
()¶ - Returns True if two shapes are same, i.e. if they share the same TShape with the same Locations. Orientations may differ.
- param theOther
- type theOther
TopoDS_Shape
- rtype
bool
-
Located
()¶ - Returns a shape similar to <self> with the local coordinate system set to <Loc>.
- param theLoc
- type theLoc
TopLoc_Location
- rtype
TopoDS_Shape
-
Location
()¶ - Returns the shape local coordinate system.
- rtype
TopLoc_Location* Sets the shape local coordinate system.
- param theLoc
- type theLoc
TopLoc_Location
- rtype
None
-
Locked
()¶ - Returns the locked flag.
- rtype
bool* Sets the locked flag.
- param theIsLocked
- type theIsLocked
bool
- rtype
None
-
Modified
()¶ - Returns the modification flag.
- rtype
bool* Sets the modification flag.
- param theIsModified
- type theIsModified
bool
- rtype
None
-
Move
()¶ - Multiplies the Shape location by thePosition.
- param thePosition
- type thePosition
TopLoc_Location
- rtype
None
-
Moved
()¶ - Returns a shape similar to <self> with a location multiplied by thePosition.
- param thePosition
- type thePosition
TopLoc_Location
- rtype
TopoDS_Shape
-
NbChildren
()¶ - Returns the number of direct sub-shapes (children). @sa TopoDS_Iterator for accessing sub-shapes
- rtype
int
-
Nullify
()¶ - Destroys the reference to the underlying shape stored in this shape. As a result, this shape becomes null.
- rtype
None
-
Orientable
()¶ - Returns the orientability flag.
- rtype
bool* Sets the orientability flag.
- param theIsOrientable
- type theIsOrientable
bool
- rtype
None
-
Orientation
()¶ - Returns the shape orientation.
- rtype
TopAbs_Orientation* Sets the shape orientation.
- param theOrient
- type theOrient
TopAbs_Orientation
- rtype
None
-
Oriented
()¶ - Returns a shape similar to <self> with the orientation set to <Or>.
- param theOrient
- type theOrient
TopAbs_Orientation
- rtype
TopoDS_Shape
-
Reverse
()¶ - Reverses the orientation, using the Reverse method from the TopAbs package.
- rtype
None
-
Reversed
()¶ - Returns a shape similar to <self> with the orientation reversed, using the Reverse method from the TopAbs package.
- rtype
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.
- rtype
TopAbs_ShapeEnum
-
TShape
()¶ - Returns a handle to the actual shape implementation.
- rtype
opencascade::handle<TopoDS_TShape>:param theTShape:
- type theTShape
TopoDS_TShape
- rtype
None
-
property
thisown
¶ The membership flag
-
class
TopoDS_Shell
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_Shape
- Constructs an Undefined Shell.
- rtype
None
-
property
thisown
¶ The membership flag
-
class
TopoDS_Solid
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_Shape
- Constructs an Undefined Solid.
- rtype
None
-
property
thisown
¶ The membership flag
-
class
TopoDS_TCompSolid
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_TShape
- Creates an empty TCompSolid.
- rtype
None
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
TopoDS_TCompound
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_TShape
- Creates an empty TCompound.
- rtype
None
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
TopoDS_TEdge
(*args, **kwargs)¶ Bases:
OCC.Core.TopoDS.TopoDS_TShape
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
TopoDS_TFace
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_TShape
- Creates an empty TFace.
- rtype
None
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
TopoDS_TShape
(*args, **kwargs)¶ Bases:
OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Checked
()¶ - Returns the checked flag.
- rtype
bool* Sets the checked flag.
- param theIsChecked
- type theIsChecked
bool
- rtype
None
-
Closed
()¶ - Returns the closedness flag.
- rtype
bool* Sets the closedness flag.
- param theIsClosed
- type theIsClosed
bool
- rtype
None
-
Convex
()¶ - Returns the convexness flag.
- rtype
bool* Sets the convexness flag.
- param theIsConvex
- type theIsConvex
bool
- rtype
None
-
static
DownCast
(t)¶
-
DumpJsonToString
(TopoDS_TShape self, int depth=-1) → std::string¶
-
EmptyCopy
()¶ - Returns a copy of the TShape with no sub-shapes.
- rtype
opencascade::handle<TopoDS_TShape>
-
Free
()¶ - Returns the free flag.
- rtype
bool* Sets the free flag.
- param theIsFree
- type theIsFree
bool
- rtype
None
-
Infinite
()¶ - Returns the infinity flag.
- rtype
bool* Sets the infinity flag.
- param theIsInfinite
- type theIsInfinite
bool
- rtype
None
-
Locked
()¶ - Returns the locked flag.
- rtype
bool* Sets the locked flag.
- param theIsLocked
- type theIsLocked
bool
- rtype
None
-
Modified
()¶ - Returns the modification flag.
- rtype
bool* Sets the modification flag.
- param theIsModified
- type theIsModified
bool
- rtype
None
-
NbChildren
()¶ - Returns the number of direct sub-shapes (children). @sa TopoDS_Iterator for accessing sub-shapes
- rtype
int
-
Orientable
()¶ - Returns the orientability flag.
- rtype
bool* Sets the orientability flag.
- param theIsOrientable
- type theIsOrientable
bool
- rtype
None
-
ShapeType
()¶ - Returns the type as a term of the ShapeEnum enumVERTEX, EDGE, WIRE, FACE, ….
- rtype
TopAbs_ShapeEnum
-
property
thisown
¶ The membership flag
-
class
TopoDS_TShell
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_TShape
- Creates an empty TShell.
- rtype
None
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
TopoDS_TSolid
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_TShape
- Creates an empty TSolid.
- rtype
None
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
TopoDS_TVertex
(*args, **kwargs)¶ Bases:
OCC.Core.TopoDS.TopoDS_TShape
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
TopoDS_TWire
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_TShape
- Creates an empty TWire.
- rtype
None
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
TopoDS_Vertex
(TopoDS_Vertex self, TopoDS_Vertex arg0) → TopoDS_Vertex* Undefined Vertex.¶ Bases:
OCC.Core.TopoDS.TopoDS_Shape
- Return type
-
property
thisown
¶ The membership flag
-
class
TopoDS_Wire
(*args)¶ Bases:
OCC.Core.TopoDS.TopoDS_Shape
- Undefined Wire.
- rtype
None
-
property
thisown
¶ The membership flag
-
class
topods
¶ Bases:
object
-
static
CompSolid
()¶ - Casts shape S to the more specialized return type, CompSolid. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
- param S
- type S
TopoDS_Shape
- rtype
TopoDS_CompSolid:param &:
- type &
TopoDS_Shape
- rtype
inline TopoDS_CompSolid
-
static
Compound
()¶ - Casts shape S to the more specialized return type, Compound. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
- param S
- type S
TopoDS_Shape
- rtype
TopoDS_Compound:param &:
- type &
TopoDS_Shape
- rtype
inline TopoDS_Compound
-
static
Edge
()¶ - Casts shape S to the more specialized return type, Edge Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
- param S
- type S
TopoDS_Shape
- rtype
TopoDS_Edge:param &:
- type &
TopoDS_Shape
- rtype
inline TopoDS_Edge
-
static
Face
()¶ - Casts shape S to the more specialized return type, Face. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
- param S
- type S
TopoDS_Shape
- rtype
TopoDS_Face:param &:
- type &
TopoDS_Shape
- rtype
inline TopoDS_Face
-
static
Shell
()¶ - Casts shape S to the more specialized return type, Shell. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
- param S
- type S
TopoDS_Shape
- rtype
TopoDS_Shell:param &:
- type &
TopoDS_Shape
- rtype
inline TopoDS_Shell
-
static
Solid
()¶ - Casts shape S to the more specialized return type, Solid. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
- param S
- type S
TopoDS_Shape
- rtype
TopoDS_Solid:param &:
- type &
TopoDS_Shape
- rtype
inline TopoDS_Solid
-
static
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.
- param S
- type S
TopoDS_Shape
- rtype
TopoDS_Vertex:param &:
- type &
TopoDS_Shape
- rtype
inline TopoDS_Vertex
-
static
Wire
()¶ - Casts shape S to the more specialized return type, Wire. Exceptions Standard_TypeMismatch if S cannot be cast to this return type.
- param S
- type S
TopoDS_Shape
- rtype
TopoDS_Wire:param &:
- type &
TopoDS_Shape
- rtype
inline TopoDS_Wire
-
property
thisown
¶ The membership flag
-
static