Version: 6.5.0
Home
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
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 sub-shapes of a given type.
def geompy.SubShapeAllIDs
 Explode a shape on sub-shapes 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 sub-shapes of a given type.
def geompy.SubShapeAllSortedCentresIDs
 Explode a shape on sub-shapes 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 aShape

Detailed Description

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

References geompy.RaiseIfFailed().

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

References geompy.RaiseIfFailed().

def geompy.SubShapeAll (   self,
  aShape,
  aType 
)

Explode a shape on sub-shapes 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 (see ShapeType())
Returns
List of sub-shapes of type theShapeType, contained in theShape.

Example

References geompy.RaiseIfFailed().

def geompy.SubShapeAllIDs (   self,
  aShape,
  aType 
)

Explode a shape on sub-shapes of a given type.

Parameters
aShapeShape to be exploded.
aTypeType of sub-shapes to be retrieved (see ShapeType())
Returns
List of IDs of sub-shapes.

Example

References geompy.RaiseIfFailed().

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]

Parameters
aShapeShape to get sub-shape of.
ListOfIndList of sub-shapes indices.
aTypeType of sub-shapes to be retrieved (see ShapeType())
Returns
A compound of sub-shapes of aShape.

Example

def geompy.SubShapeAllSortedCentres (   self,
  aShape,
  aType 
)

Explode a shape on sub-shapes 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 (see ShapeType())
Returns
List of sub-shapes of type theShapeType, contained in theShape.

Example

References geompy.RaiseIfFailed().

def geompy.SubShapeAllSortedCentresIDs (   self,
  aShape,
  aType 
)

Explode a shape on sub-shapes 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 (see ShapeType())
Returns
List of IDs of sub-shapes.

Example

References geompy.RaiseIfFailed().

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]

Parameters
aShapeShape to get sub-shape of.
ListOfIndList of sub-shapes indices.
aTypeType of sub-shapes to be retrieved (see ShapeType())
Returns
A compound of sub-shapes of aShape.

Example

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

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

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

Example

References geompy.RaiseIfFailed().

def geompy.SubShapes (   self,
  aShape,
  anIDs 
)

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

Parameters
aShapeMain shape.
anIDsList of unique IDs of sub-shapes inside aShape.
Returns
List of GEOM.GEOM_Object, corresponding to found sub-shapes.

Example

References geompy.RaiseIfFailed().

Copyright © 2007-2012 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