Version: 9.16.0
Home
Loading...
Searching...
No Matches

Functions

 CreateGroup (self, theMainShape, theShapeType, theName=None)
 Creates a new group which will store sub-shapes of theMainShape.
 
 AddObject (self, theGroup, theSubShapeID)
 Adds a sub-object with ID theSubShapeId to the group.
 
 RemoveObject (self, theGroup, theSubShapeID)
 Removes a sub-object with ID theSubShapeId from the group.
 
 UnionList (self, theGroup, theSubShapes)
 Adds to the group all the given shapes.
 
 UnionIDs (self, theGroup, theSubShapes)
 Adds to the group all the given shapes.
 
 DifferenceList (self, theGroup, theSubShapes)
 Removes from the group all the given shapes.
 
 DifferenceIDs (self, theGroup, theSubShapes)
 Removes from the group all the given shapes.
 
 UnionGroups (self, theGroup1, theGroup2, theName=None)
 Union of two groups.
 
 IntersectGroups (self, theGroup1, theGroup2, theName=None)
 Intersection of two groups.
 
 CutGroups (self, theGroup1, theGroup2, theName=None)
 Cut of two groups.
 
 UnionListOfGroups (self, theGList, theName=None)
 Union of list of groups.
 
 IntersectListOfGroups (self, theGList, theName=None)
 Cut of lists of groups.
 
 CutListOfGroups (self, theGList1, theGList2, theName=None)
 Cut of lists of groups.
 
 GetObjectIDs (self, theGroup)
 Returns a list of sub-objects ID stored in the group.
 
 GetType (self, theGroup)
 Returns a type of sub-objects stored in the group.
 
 ShapeIdToType (self, theId)
 Convert a type of geom object from id to string value.
 
 GetMainShape (self, theGroup)
 Returns a main shape associated with the group.
 
 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].
 
 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].
 

Detailed Description

Function Documentation

◆ CreateGroup()

CreateGroup (   self,
  theMainShape,
  theShapeType,
  theName = None 
)

Creates a new group which will store sub-shapes of theMainShape.

Parameters
theMainShapeis a GEOM object on which the group is selected
theShapeTypedefines a shape type of the group (see GEOM::shape_type)
theNameObject 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.
Returns
a newly created GEOM group (GEOM.GEOM_Object)

Example 1
Example 2

References geomBuilder._autoPublish(), geomBuilder.CreateGroup(), geomBuilder.GroupOp, and geomBuilder.RaiseIfFailed().

◆ AddObject()

AddObject (   self,
  theGroup,
  theSubShapeID 
)

Adds a sub-object with ID theSubShapeId to the group.

Parameters
theGroupis a GEOM group to which the new sub-shape is added
theSubShapeIDis a sub-shape ID in the main object.
Note
Use method GetSubShapeID() to get an unique ID of the sub-shape

Example

References geomBuilder.AddObject(), geomBuilder.GroupOp, and geomBuilder.RaiseIfFailed().

◆ RemoveObject()

RemoveObject (   self,
  theGroup,
  theSubShapeID 
)

Removes a sub-object with ID theSubShapeId from the group.

Parameters
theGroupis a GEOM group from which the new sub-shape is removed
theSubShapeIDis a sub-shape ID in the main object.
Note
Use method GetSubShapeID() to get an unique ID of the sub-shape

Example

References geomBuilder.GroupOp, geomBuilder.RaiseIfFailed(), and geomBuilder.RemoveObject().

◆ UnionList()

UnionList (   self,
  theGroup,
  theSubShapes 
)

Adds to the group all the given shapes.

No errors, if some shapes are already included.

Parameters
theGroupis a GEOM group to which the new sub-shapes are added.
theSubShapesis a list of sub-shapes to be added.

Example

References geomBuilder.GroupOp, geomBuilder.RaiseIfFailed(), and geomBuilder.UnionList().

◆ UnionIDs()

UnionIDs (   self,
  theGroup,
  theSubShapes 
)

Adds to the group all the given shapes.

No errors, if some shapes are already included.

Parameters
theGroupis a GEOM group to which the new sub-shapes are added.
theSubShapesis a list of indices of sub-shapes to be added.

Example

References geomBuilder.GroupOp, geomBuilder.RaiseIfFailed(), and geomBuilder.UnionIDs().

◆ DifferenceList()

DifferenceList (   self,
  theGroup,
  theSubShapes 
)

Removes from the group all the given shapes.

No errors, if some shapes are not included.

Parameters
theGroupis a GEOM group from which the sub-shapes are removed.
theSubShapesis a list of sub-shapes to be removed.

Example

References geomBuilder.DifferenceList(), geomBuilder.GroupOp, and geomBuilder.RaiseIfFailed().

◆ DifferenceIDs()

DifferenceIDs (   self,
  theGroup,
  theSubShapes 
)

Removes from the group all the given shapes.

No errors, if some shapes are not included.

Parameters
theGroupis a GEOM group from which the sub-shapes are removed.
theSubShapesis a list of indices of sub-shapes to be removed.

Example

References geomBuilder.DifferenceIDs(), geomBuilder.GroupOp, and geomBuilder.RaiseIfFailed().

◆ UnionGroups()

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.

Parameters
theGroup1,theGroup2are the initial GEOM groups to create the united group from.
theNameObject 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.
Returns
a newly created GEOM group.

Example

References geomBuilder._autoPublish(), geomBuilder.GroupOp, geomBuilder.RaiseIfFailed(), and geomBuilder.UnionGroups().

◆ IntersectGroups()

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.

Parameters
theGroup1,theGroup2are the initial GEOM groups to get common part of.
theNameObject 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.
Returns
a newly created GEOM group.

Example

References geomBuilder._autoPublish(), geomBuilder.GroupOp, geomBuilder.IntersectGroups(), and geomBuilder.RaiseIfFailed().

◆ CutGroups()

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.

Parameters
theGroup1is a GEOM group to include elements of.
theGroup2is a GEOM group to exclude elements of.
theNameObject 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.
Returns
a newly created GEOM group.

Example

References geomBuilder._autoPublish(), geomBuilder.CutGroups(), geomBuilder.GroupOp, and geomBuilder.RaiseIfFailed().

◆ UnionListOfGroups()

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.

Parameters
theGListis a list of GEOM groups to create the united group from.
theNameObject 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.
Returns
a newly created GEOM group.

Example

References geomBuilder._autoPublish(), geomBuilder.GroupOp, geomBuilder.RaiseIfFailed(), and geomBuilder.UnionListOfGroups().

◆ IntersectListOfGroups()

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.

Parameters
theGListis a list of GEOM groups to include elements of.
theNameObject 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.
Returns
a newly created GEOM group.

Example

References geomBuilder._autoPublish(), geomBuilder.GroupOp, geomBuilder.IntersectListOfGroups(), and geomBuilder.RaiseIfFailed().

◆ CutListOfGroups()

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.

Parameters
theGList1is a list of GEOM groups to include elements of.
theGList2is a list of GEOM groups to exclude elements of.
theNameObject 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.
Returns
a newly created GEOM group.

Example

References geomBuilder._autoPublish(), geomBuilder.CutListOfGroups(), geomBuilder.GroupOp, and geomBuilder.RaiseIfFailed().

◆ GetObjectIDs()

GetObjectIDs (   self,
  theGroup 
)

Returns a list of sub-objects ID stored in the group.

Parameters
theGroupis a GEOM group for which a list of IDs is requested

Example

References geomBuilder.GroupOp, and geomBuilder.RaiseIfFailed().

◆ GetType()

GetType (   self,
  theGroup 
)

Returns a type of sub-objects stored in the group.

Parameters
theGroupis a GEOM group which type is returned.

Example

References geomBuilder.GetType(), geomBuilder.GroupOp, and geomBuilder.RaiseIfFailed().

◆ ShapeIdToType()

ShapeIdToType (   self,
  theId 
)

Convert a type of geom object from id to string value.

Parameters
theIdis a GEOM object type id.
Returns
type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... ) Example

◆ GetMainShape()

GetMainShape (   self,
  theGroup 
)

Returns a main shape associated with the group.

Parameters
theGroupis a GEOM group for which a main shape object is requested
Returns
a GEOM object which is a main shape for theGroup

Example

References geomBuilder.GetMainShape(), geomBuilder.GroupOp, and geomBuilder.RaiseIfFailed().

◆ GetEdgesByLength()

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.

Parameters
theShapegiven shape (see GEOM.GEOM_Object)
min_lengthminimum length of edges of theShape
max_lengthmaximum length of edges of theShape
include_maxindicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
include_minindicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
theNameObject 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.
Returns
a newly created GEOM group of edges

@ref swig_todo "Example"

References geomBuilder.BasicProperties(), GEOM_IGroupOperations.CreateGroup(), geomBuilder.CreateGroup(), geomBuilder.ShapeType, geomBuilder.SubShapeAll(), GEOM_IGroupOperations.UnionList(), and geomBuilder.UnionList().

◆ SelectEdges()

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.

Parameters
min_lengthminimum length of edges of selected shape
max_lengthmaximum length of edges of selected shape
include_maxindicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
include_minindicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
Returns
a newly created GEOM group of edges Example

References geomBuilder.addToStudyInFather(), and geomBuilder.GetEdgesByLength().