Version: 8.3.0
Home
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Access to sub-shapes by their unique IDs inside the main shape

Functions

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

Detailed Description

Function Documentation

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(), GEOM_Gen.AddSubShape(), and geomBuilder.ManageTransactions().

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, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().

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.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.