Version: 9.15.0
Home

Functions

def GetSubShape (self, aShape, ListOfID, theName=None)
 Obtain a composite sub-shape of aShape, composed from sub-shapes of aShape, selected by their unique IDs inside aShape More...
 
def GetSubShapeID (self, aShape, aSubShape)
 Obtain unique ID of sub-shape aSubShape inside aShape of aShape, selected by their unique IDs inside aShape More...
 
def GetSubShapesIDs (self, aShape, aSubShapes)
 Obtain unique IDs of sub-shapes aSubShapes inside aShape This function is provided for performance purpose. More...
 

Detailed Description

Function Documentation

◆ GetSubShape()

def GetSubShape (   self,
  aShape,
  ListOfID,
  theName = None 
)

Obtain a composite sub-shape of aShape, composed from sub-shapes of aShape, selected by their unique IDs inside aShape

Parameters
aShapeShape to get sub-shape of.
ListOfIDList of sub-shapes indices.
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
Found sub-shape.

Example

References geomBuilder._autoPublish(), and GEOM_Gen.AddSubShape().

◆ GetSubShapeID()

def GetSubShapeID (   self,
  aShape,
  aSubShape 
)

Obtain unique ID of sub-shape aSubShape inside aShape of aShape, selected by their unique IDs inside aShape

Parameters
aShapeShape to get sub-shape of.
aSubShapeSub-shapes of aShape.
Returns
ID of found sub-shape.

Example

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

◆ GetSubShapesIDs()

def GetSubShapesIDs (   self,
  aShape,
  aSubShapes 
)

Obtain unique IDs of sub-shapes aSubShapes inside aShape This function is provided for performance purpose.

The complexity is O(n) with n the number of subobjects of aShape

Parameters
aShapeShape to get sub-shape of.
aSubShapesSub-shapes of aShape.
Returns
list of IDs of found sub-shapes.

Example

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