Version: 6.3.1
Home
Functions

Decompose objects

Creating Advanced Geometrical Objects

Functions

def geompy.GetExistingSubObjects
 Get all sub-shapes and groups of theShape, that were created already by any other methods.
def geompy.GetGroups
 Get all groups of theShape, that were created already by any other methods.
def geompy.SubShapeAll
 Explode a shape on subshapes of a given type.
def geompy.SubShapeAllIDs
 Explode a shape on subshapes of a given type.
def geompy.SubShape
 Obtain a compound of sub-shapes of aShape, selected by they indices in list of all sub-shapes of type aType.
def geompy.SubShapeAllSortedCentres
 Explode a shape on subshapes of a given type.
def geompy.SubShapeAllSortedCentresIDs
 Explode a shape on subshapes of a given type.
def geompy.SubShapeSortedCentres
 Obtain a compound of sub-shapes of aShape, selected by they indices in sorted list of all sub-shapes of type aType.
def geompy.ExtractShapes
 Extract shapes (excluding the main shape) of given type.
def geompy.SubShapes
 Get a set of sub shapes defined by their unique IDs inside theMainShape

Function Documentation

def geompy.GetExistingSubObjects (   self,
  theShape,
  theGroupsOnly = False 
)

Get all sub-shapes and groups of theShape, that were created already by any other methods.

Parameters:
theShapeAny shape.
theGroupsOnlyIf this parameter is TRUE, only groups will be returned, else all found sub-shapes and groups.
Returns:
List of existing sub-objects of theShape.

Example

def geompy.GetGroups (   self,
  theShape 
)

Get all groups of theShape, that were created already by any other methods.

Parameters:
theShapeAny shape.
Returns:
List of existing groups of theShape.

Example

def geompy.SubShapeAll (   self,
  aShape,
  aType 
)

Explode a shape on subshapes of a given type.

If the shape itself matches the type, it is also returned.

Parameters:
aShapeShape to be exploded.
aTypeType of sub-shapes to be retrieved.
Returns:
List of sub-shapes of type theShapeType, contained in theShape.

Example

def geompy.SubShapeAllIDs (   self,
  aShape,
  aType 
)

Explode a shape on subshapes of a given type.

Parameters:
aShapeShape to be exploded.
aTypeType of sub-shapes to be retrieved.
Returns:
List of IDs of sub-shapes.

Example

def geompy.SubShape (   self,
  aShape,
  aType,
  ListOfInd 
)

Obtain a compound of sub-shapes of aShape, selected by they indices in list of all sub-shapes of type aType.

Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]

Example

def geompy.SubShapeAllSortedCentres (   self,
  aShape,
  aType 
)

Explode a shape on subshapes of a given type.

Sub-shapes will be sorted by coordinates of their gravity centers. If the shape itself matches the type, it is also returned.

Parameters:
aShapeShape to be exploded.
aTypeType of sub-shapes to be retrieved.
Returns:
List of sub-shapes of type theShapeType, contained in theShape.

Example

def geompy.SubShapeAllSortedCentresIDs (   self,
  aShape,
  aType 
)

Explode a shape on subshapes of a given type.

Sub-shapes will be sorted by coordinates of their gravity centers.

Parameters:
aShapeShape to be exploded.
aTypeType of sub-shapes to be retrieved.
Returns:
List of IDs of sub-shapes.

Example

def geompy.SubShapeSortedCentres (   self,
  aShape,
  aType,
  ListOfInd 
)

Obtain a compound of sub-shapes of aShape, selected by they indices in sorted list of all sub-shapes of type aType.

Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]

Example

def geompy.ExtractShapes (   self,
  aShape,
  aType,
  isSorted = False 
)

Extract shapes (excluding the main shape) of given type.

Parameters:
aShapeThe shape.
aTypeThe shape type.
isSortedBoolean flag to switch sorting on/off.
Returns:
List of sub-shapes of type aType, contained in aShape.

Example

def geompy.SubShapes (   self,
  aShape,
  anIDs 
)

Get a set of sub shapes defined by their unique IDs inside theMainShape

Parameters:
theMainShapeMain shape.
theIndicesList of unique IDs of sub shapes inside theMainShape.
Returns:
List of GEOM_Objects, corresponding to found sub shapes.

Example

 All Data Structures Namespaces Files Functions Variables
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS