Functions | |
def | CreateGroup |
Creates a new group which will store sub-shapes of theMainShape. More... | |
def | AddObject |
Adds a sub-object with ID theSubShapeId to the group. More... | |
def | RemoveObject |
Removes a sub-object with ID theSubShapeId from the group. More... | |
def | UnionList |
Adds to the group all the given shapes. More... | |
def | UnionIDs |
Adds to the group all the given shapes. More... | |
def | DifferenceList |
Removes from the group all the given shapes. More... | |
def | DifferenceIDs |
Removes from the group all the given shapes. More... | |
def | UnionGroups |
Union of two groups. More... | |
def | IntersectGroups |
Intersection of two groups. More... | |
def | CutGroups |
Cut of two groups. More... | |
def | UnionListOfGroups |
Union of list of groups. More... | |
def | IntersectListOfGroups |
Cut of lists of groups. More... | |
def | CutListOfGroups |
Cut of lists of groups. More... | |
def | GetObjectIDs |
Returns a list of sub-objects ID stored in the group. More... | |
def | GetType |
Returns a type of sub-objects stored in the group. More... | |
def | ShapeIdToType |
Convert a type of geom object from id to string value. More... | |
def | GetMainShape |
Returns a main shape associated with the group. More... | |
def | GetEdgesByLength |
Create group of edges of theShape, whose length is in range [min_length, max_length]. More... | |
def | SelectEdges |
Create group of edges of selected shape, whose length is in range [min_length, max_length]. More... | |
def CreateGroup | ( | self, | |
theMainShape, | |||
theShapeType, | |||
theName = None |
|||
) |
Creates a new group which will store sub-shapes of theMainShape.
theMainShape | is a GEOM object on which the group is selected |
theShapeType | defines a shape type of the group (see GEOM::shape_type) |
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.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def AddObject | ( | self, | |
theGroup, | |||
theSubShapeID | |||
) |
Adds a sub-object with ID theSubShapeId to the group.
theGroup | is a GEOM group to which the new sub-shape is added |
theSubShapeID | is a sub-shape ID in the main object. |
References geomBuilder.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def RemoveObject | ( | self, | |
theGroup, | |||
theSubShapeID | |||
) |
Removes a sub-object with ID theSubShapeId from the group.
theGroup | is a GEOM group from which the new sub-shape is removed |
theSubShapeID | is a sub-shape ID in the main object. |
References geomBuilder.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def UnionList | ( | self, | |
theGroup, | |||
theSubShapes | |||
) |
Adds to the group all the given shapes.
No errors, if some shapes are alredy included.
theGroup | is a GEOM group to which the new sub-shapes are added. |
theSubShapes | is a list of sub-shapes to be added. |
References geomBuilder.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def UnionIDs | ( | self, | |
theGroup, | |||
theSubShapes | |||
) |
Adds to the group all the given shapes.
No errors, if some shapes are alredy included.
theGroup | is a GEOM group to which the new sub-shapes are added. |
theSubShapes | is a list of indices of sub-shapes to be added. |
References geomBuilder.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def DifferenceList | ( | self, | |
theGroup, | |||
theSubShapes | |||
) |
Removes from the group all the given shapes.
No errors, if some shapes are not included.
theGroup | is a GEOM group from which the sub-shapes are removed. |
theSubShapes | is a list of sub-shapes to be removed. |
References geomBuilder.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def DifferenceIDs | ( | self, | |
theGroup, | |||
theSubShapes | |||
) |
Removes from the group all the given shapes.
No errors, if some shapes are not included.
theGroup | is a GEOM group from which the sub-shapes are removed. |
theSubShapes | is a list of indices of sub-shapes to be removed. |
References geomBuilder.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def UnionGroups | ( | self, | |
theGroup1, | |||
theGroup2, | |||
theName = None |
|||
) |
Union of two groups.
New group is created. It will contain all entities which are present in groups theGroup1 and theGroup2.
theGroup1,theGroup2 | are the initial GEOM groups to create the united group from. |
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.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def IntersectGroups | ( | self, | |
theGroup1, | |||
theGroup2, | |||
theName = None |
|||
) |
Intersection of two groups.
New group is created. It will contain only those entities which are present in both groups theGroup1 and theGroup2.
theGroup1,theGroup2 | are the initial GEOM groups to get common part of. |
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.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def CutGroups | ( | self, | |
theGroup1, | |||
theGroup2, | |||
theName = None |
|||
) |
Cut of two groups.
New group is created. It will contain entities which are present in group theGroup1 but are not present in group theGroup2.
theGroup1 | is a GEOM group to include elements of. |
theGroup2 | is a GEOM group to exclude elements of. |
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.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def UnionListOfGroups | ( | self, | |
theGList, | |||
theName = None |
|||
) |
Union of list of groups.
New group is created. It will contain all entities that are present in groups listed in theGList.
theGList | is a list of GEOM groups to create the united group from. |
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.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def IntersectListOfGroups | ( | self, | |
theGList, | |||
theName = None |
|||
) |
Cut of lists of groups.
New group is created. It will contain only entities which are present in groups listed in theGList.
theGList | is a list of GEOM groups to include elements of. |
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.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def CutListOfGroups | ( | self, | |
theGList1, | |||
theGList2, | |||
theName = None |
|||
) |
Cut of lists of groups.
New group is created. It will contain only entities which are present in groups listed in theGList1 but are not present in groups from theGList2.
theGList1 | is a list of GEOM groups to include elements of. |
theGList2 | is a list of GEOM groups to exclude elements of. |
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.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def GetObjectIDs | ( | self, | |
theGroup | |||
) |
Returns a list of sub-objects ID stored in the group.
theGroup | is a GEOM group for which a list of IDs is requested |
References geomBuilder.GroupOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def GetType | ( | self, | |
theGroup | |||
) |
Returns a type of sub-objects stored in the group.
theGroup | is a GEOM group which type is returned. |
References geomBuilder.GroupOp, and geomBuilder.RaiseIfFailed().
def ShapeIdToType | ( | self, | |
theId | |||
) |
Convert a type of geom object from id to string value.
theId | is a GEOM obect type id. |
References geomBuilder.ManageTransactions().
def GetMainShape | ( | self, | |
theGroup | |||
) |
Returns a main shape associated with the group.
theGroup | is a GEOM group for which a main shape object is requested |
References geomBuilder.GroupOp, and geomBuilder.RaiseIfFailed().
def GetEdgesByLength | ( | self, | |
theShape, | |||
min_length, | |||
max_length, | |||
include_min = 1 , |
|||
include_max = 1 , |
|||
theName = None |
|||
) |
Create group of edges of theShape, whose length is in range [min_length, max_length].
If include_min/max == 0, edges with length == min/max_length will not be included in result.
theShape | given shape (see GEOM.GEOM_Object) |
min_length | minimum length of edges of theShape |
max_length | maximum length of edges of theShape |
include_max | indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1) |
include_min | indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1) |
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. |
@ref swig_todo "Example"
References geomBuilder.BasicProperties(), geomBuilder.CreateGroup(), geomBuilder.ShapeType, geomBuilder.SubShapeAll(), and geomBuilder.UnionList().
def SelectEdges | ( | self, | |
min_length, | |||
max_length, | |||
include_min = 1 , |
|||
include_max = 1 |
|||
) |
Create group of edges of selected shape, whose length is in range [min_length, max_length].
If include_min/max == 0, edges with length == min/max_length will not be included in result.
min_length | minimum length of edges of selected shape |
max_length | maximum length of edges of selected shape |
include_max | indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1) |
include_min | indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1) |
References geomBuilder.addToStudyInFather(), geomBuilder.GetEdgesByLength(), and geomBuilder.ManageTransactions().