Functions | |
def | GetExistingSubObjects |
Get all sub-shapes and groups of theShape, that were created already by any other methods. More... | |
def | GetGroups |
Get all groups of theShape, that were created already by any other methods. More... | |
def | SubShapeAll |
Explode a shape on sub-shapes of a given type. More... | |
def | SubShapeAllIDs |
Explode a shape on sub-shapes of a given type. More... | |
def | SubShape |
Obtain a compound of sub-shapes of aShape, selected by their indices in list of all sub-shapes of type aType. More... | |
def | SubShapeAllSortedCentres |
Explode a shape on sub-shapes of a given type. More... | |
def | SubShapeAllSortedCentresIDs |
Explode a shape on sub-shapes of a given type. More... | |
def | SubShapeSortedCentres |
Obtain a compound of sub-shapes of aShape, selected by they indices in sorted list of all sub-shapes of type aType. More... | |
def | ExtractShapes |
Extract shapes (excluding the main shape) of given type. More... | |
def | SubShapes |
Get a set of sub-shapes defined by their unique IDs inside aShape More... | |
def | GetSubShapeEdgeSorted |
Explode a shape into edges sorted in a row from a starting point. More... | |
def | GetSubShapesWithTolerance |
Return the list of subshapes that satisfies a certain tolerance criterion. More... | |
def | IsSubShapeBelongsTo |
Check if the object is a sub-object of another GEOM object. More... | |
def | MakeExtraction |
Perform extraction of sub-shapes from the main shape. More... | |
def GetExistingSubObjects | ( | self, | |
theShape, | |||
theGroupsOnly = False |
|||
) |
Get all sub-shapes and groups of theShape, that were created already by any other methods.
theShape | Any shape. |
theGroupsOnly | If this parameter is TRUE, only groups will be returned, else all found sub-shapes and groups. |
References geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def GetGroups | ( | self, | |
theShape | |||
) |
Get all groups of theShape, that were created already by any other methods.
theShape | Any shape. |
References geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def SubShapeAll | ( | self, | |
aShape, | |||
aType, | |||
theName = None |
|||
) |
Explode a shape on sub-shapes of a given type.
If the shape itself matches the type, it is also returned.
aShape | Shape to be exploded. |
aType | Type of sub-shapes to be retrieved (see ShapeType()) |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.EnumToLong(), geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def SubShapeAllIDs | ( | self, | |
aShape, | |||
aType | |||
) |
Explode a shape on sub-shapes of a given type.
aShape | Shape to be exploded. |
aType | Type of sub-shapes to be retrieved (see ShapeType()) |
References geomBuilder.EnumToLong(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def SubShape | ( | self, | |
aShape, | |||
aType, | |||
ListOfInd, | |||
theName = None |
|||
) |
Obtain a compound of sub-shapes of aShape, selected by their indices in list of all sub-shapes of type aType.
Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
aShape | Shape to get sub-shape of. |
ListOfInd | List of sub-shapes indices. |
aType | Type of sub-shapes to be retrieved (see ShapeType()) |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder.EnumToLong(), geomBuilder.GetSubShape(), geomBuilder.ManageTransactions(), and geomBuilder.SubShapeAllIDs().
def SubShapeAllSortedCentres | ( | self, | |
aShape, | |||
aType, | |||
theName = None |
|||
) |
Explode a shape on sub-shapes of a given type.
Sub-shapes will be sorted taking into account their gravity centers, to provide stable order of sub-shapes. Please see Description of Sorting Shapes Algorithm. If the shape itself matches the type, it is also returned.
aShape | Shape to be exploded. |
aType | Type of sub-shapes to be retrieved (see ShapeType()) |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.EnumToLong(), geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def SubShapeAllSortedCentresIDs | ( | self, | |
aShape, | |||
aType | |||
) |
Explode a shape on sub-shapes of a given type.
Sub-shapes will be sorted taking into account their gravity centers, to provide stable order of sub-shapes. Please see Description of Sorting Shapes Algorithm.
aShape | Shape to be exploded. |
aType | Type of sub-shapes to be retrieved (see ShapeType()) |
References geomBuilder.EnumToLong(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def SubShapeSortedCentres | ( | self, | |
aShape, | |||
aType, | |||
ListOfInd, | |||
theName = None |
|||
) |
Obtain a compound of sub-shapes of aShape, selected by they indices in sorted list of all sub-shapes of type aType.
Please see Description of Sorting Shapes Algorithm. Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
aShape | Shape to get sub-shape of. |
ListOfInd | List of sub-shapes indices. |
aType | Type of sub-shapes to be retrieved (see ShapeType()) |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder.EnumToLong(), geomBuilder.GetSubShape(), geomBuilder.ManageTransactions(), and geomBuilder.SubShapeAllSortedCentresIDs().
def ExtractShapes | ( | self, | |
aShape, | |||
aType, | |||
isSorted = False , |
|||
theName = None |
|||
) |
Extract shapes (excluding the main shape) of given type.
aShape | The shape. |
aType | The shape type (see ShapeType()) |
isSorted | Boolean flag to switch sorting on/off. Please see Description of Sorting Shapes Algorithm. |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.EnumToLong(), geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def SubShapes | ( | self, | |
aShape, | |||
anIDs, | |||
theName = None |
|||
) |
Get a set of sub-shapes defined by their unique IDs inside aShape
aShape | Main shape. |
anIDs | List of unique IDs of sub-shapes inside aShape. |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def GetSubShapeEdgeSorted | ( | self, | |
theShape, | |||
theStartPoint, | |||
theName = None |
|||
) |
Explode a shape into edges sorted in a row from a starting point.
theShape | the shape to be exploded on edges. |
theStartPoint | the starting point. |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.GetSubShapesWithTolerance(), geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def GetSubShapesWithTolerance | ( | self, | |
theShape, | |||
theShapeType, | |||
theCondition, | |||
theTolerance, | |||
theName = None |
|||
) |
Return the list of subshapes that satisfies a certain tolerance criterion.
The user defines the type of shapes to be returned, the condition and the tolerance value. The operation is defined for faces, edges and vertices only. E.g. for theShapeType FACE, theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns all faces of theShape that have tolerances greater then 1.e7.
theShape | the shape to be exploded |
theShapeType | the type of sub-shapes to be returned (see ShapeType()). Can have the values FACE, EDGE and VERTEX only. |
theCondition | the condition type (see GEOM::comparison_condition). |
theTolerance | the tolerance filter. |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.EnumToLong(), geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def IsSubShapeBelongsTo | ( | self, | |
aSubObject, | |||
anObject, | |||
aSubObjectIndex = 0 , |
|||
anObjectIndex = 0 |
|||
) |
Check if the object is a sub-object of another GEOM object.
aSubObject | Checked sub-object (or its parent object, in case if theSubObjectIndex is non-zero). |
anObject | An object that is checked for ownership (or its parent object, in case if theObjectIndex is non-zero). |
aSubObjectIndex | When non-zero, specifies a sub-shape index that identifies a sub-object within its parent specified via theSubObject. |
anObjectIndex | When non-zero, specifies a sub-shape index that identifies an object within its parent specified via theObject. |
References geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def MakeExtraction | ( | self, | |
theShape, | |||
theListOfID, | |||
theName = None |
|||
) |
Perform extraction of sub-shapes from the main shape.
theShape | the main shape |
theListOfID | the list of sub-shape IDs to be extracted from the main shape. |
References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.