SALOME documentation central

Access to subshapes by a criteria
[Creating Advanced Geometrical Objects]

Functions

def geompy.GetFreeFacesIDs
 Retrieve all free faces from the given shape.
def geompy.GetSharedShapes
 Get all sub-shapes of theShape1 of the given type, shared with theShape2.
def geompy.GetShapesOnPlane
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified plane by the certain way, defined through theState parameter.
def geompy.GetShapesOnPlaneIDs
 Works like the above method, but returns list of sub-shapes indices.
def geompy.GetShapesOnPlaneWithLocation
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified plane by the certain way, defined through theState parameter.
def geompy.GetShapesOnPlaneWithLocationIDs
 Works like the above method, but returns list of sub-shapes indices.
def geompy.GetShapesOnCylinder
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified cylinder by the certain way, defined through theState parameter.
def geompy.GetShapesOnCylinderIDs
 Works like the above method, but returns list of sub-shapes indices.
def geompy.GetShapesOnSphere
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified sphere by the certain way, defined through theState parameter.
def geompy.GetShapesOnSphereIDs
 Works like the above method, but returns list of sub-shapes indices.
def geompy.GetShapesOnQuadrangle
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified quadrangle by the certain way, defined through theState parameter.
def geompy.GetShapesOnQuadrangleIDs
 Works like the above method, but returns list of sub-shapes indices.
def geompy.GetShapesOnBox
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified theBox by the certain way, defined through theState parameter.
def geompy.GetShapesOnBoxIDs
 Works like the above method, but returns list of sub-shapes indices.
def geompy.GetShapesOnShape
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified theCheckShape by the certain way, defined through theState parameter.
def geompy.GetShapesOnShapeAsCompound
 Works like the above method, but returns result as compound.
def geompy.GetShapesOnShapeIDs
 Works like the above method, but returns list of sub-shapes indices.
def geompy.GetInPlace
 Get sub-shape(s) of theShapeWhere, which are coincident with theShapeWhat or could be a part of it.
def geompy.GetInPlaceByHistory
 Get sub-shape(s) of theShapeWhere, which are coincident with theShapeWhat or could be a part of it.
def geompy.GetSame
 Get sub-shape of theShapeWhere, which is equal to theShapeWhat.

Function Documentation

def geompy.GetFreeFacesIDs (   self,
  theShape 
)

Retrieve all free faces from the given shape.

Free face is a face, which is not shared between two shells of the shape.

Parameters:
theShape Shape to find free faces in.
Returns:
List of IDs of all free faces, contained in theShape.

Example

def geompy.GetSharedShapes (   self,
  theShape1,
  theShape2,
  theShapeType 
)

Get all sub-shapes of theShape1 of the given type, shared with theShape2.

Parameters:
theShape1 Shape to find sub-shapes in.
theShape2 Shape to find shared sub-shapes with.
theShapeType Type of sub-shapes to be retrieved.
Returns:
List of sub-shapes of theShape1, shared with theShape2.

Example

def geompy.GetShapesOnPlane (   self,
  theShape,
  theShapeType,
  theAx1,
  theState 
)

Find in theShape all sub-shapes of type theShapeType, situated relatively the specified plane by the certain way, defined through theState parameter.

Parameters:
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theAx1 Vector (or line, or linear edge), specifying normal direction and location of the plane to find shapes on.
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
Returns:
List of all found sub-shapes.

Example

def geompy.GetShapesOnPlaneIDs (   self,
  theShape,
  theShapeType,
  theAx1,
  theState 
)

Works like the above method, but returns list of sub-shapes indices.

Example

def geompy.GetShapesOnPlaneWithLocation (   self,
  theShape,
  theShapeType,
  theAx1,
  thePnt,
  theState 
)

Find in theShape all sub-shapes of type theShapeType, situated relatively the specified plane by the certain way, defined through theState parameter.

Parameters:
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theAx1 Vector (or line, or linear edge), specifying normal direction of the plane to find shapes on.
thePnt Point specifying location of the plane to find shapes on.
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
Returns:
List of all found sub-shapes.

Example

def geompy.GetShapesOnPlaneWithLocationIDs (   self,
  theShape,
  theShapeType,
  theAx1,
  thePnt,
  theState 
)

Works like the above method, but returns list of sub-shapes indices.

Example

def geompy.GetShapesOnCylinder (   self,
  theShape,
  theShapeType,
  theAxis,
  theRadius,
  theState 
)

Find in theShape all sub-shapes of type theShapeType, situated relatively the specified cylinder by the certain way, defined through theState parameter.

Parameters:
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theAxis Vector (or line, or linear edge), specifying axis of the cylinder to find shapes on.
theRadius Radius of the cylinder to find shapes on.
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
Returns:
List of all found sub-shapes.

Example

def geompy.GetShapesOnCylinderIDs (   self,
  theShape,
  theShapeType,
  theAxis,
  theRadius,
  theState 
)

Works like the above method, but returns list of sub-shapes indices.

Example

def geompy.GetShapesOnSphere (   self,
  theShape,
  theShapeType,
  theCenter,
  theRadius,
  theState 
)

Find in theShape all sub-shapes of type theShapeType, situated relatively the specified sphere by the certain way, defined through theState parameter.

Parameters:
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theCenter Point, specifying center of the sphere to find shapes on.
theRadius Radius of the sphere to find shapes on.
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
Returns:
List of all found sub-shapes.

Example

def geompy.GetShapesOnSphereIDs (   self,
  theShape,
  theShapeType,
  theCenter,
  theRadius,
  theState 
)

Works like the above method, but returns list of sub-shapes indices.

Example

def geompy.GetShapesOnQuadrangle (   self,
  theShape,
  theShapeType,
  theTopLeftPoint,
  theTopRigthPoint,
  theBottomLeftPoint,
  theBottomRigthPoint,
  theState 
)

Find in theShape all sub-shapes of type theShapeType, situated relatively the specified quadrangle by the certain way, defined through theState parameter.

Parameters:
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theTopLeftPoint Point, specifying top left corner of a quadrangle
theTopRigthPoint Point, specifying top right corner of a quadrangle
theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
Returns:
List of all found sub-shapes.

Example

def geompy.GetShapesOnQuadrangleIDs (   self,
  theShape,
  theShapeType,
  theTopLeftPoint,
  theTopRigthPoint,
  theBottomLeftPoint,
  theBottomRigthPoint,
  theState 
)

Works like the above method, but returns list of sub-shapes indices.

Example

def geompy.GetShapesOnBox (   self,
  theBox,
  theShape,
  theShapeType,
  theState 
)

Find in theShape all sub-shapes of type theShapeType, situated relatively the specified theBox by the certain way, defined through theState parameter.

Parameters:
theBox Shape for relative comparing.
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
Returns:
List of all found sub-shapes.

Example

def geompy.GetShapesOnBoxIDs (   self,
  theBox,
  theShape,
  theShapeType,
  theState 
)

Works like the above method, but returns list of sub-shapes indices.

Example

def geompy.GetShapesOnShape (   self,
  theCheckShape,
  theShape,
  theShapeType,
  theState 
)

Find in theShape all sub-shapes of type theShapeType, situated relatively the specified theCheckShape by the certain way, defined through theState parameter.

Parameters:
theCheckShape Shape for relative comparing.
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
Returns:
List of all found sub-shapes.

Example

def geompy.GetShapesOnShapeAsCompound (   self,
  theCheckShape,
  theShape,
  theShapeType,
  theState 
)

Works like the above method, but returns result as compound.

Example

def geompy.GetShapesOnShapeIDs (   self,
  theCheckShape,
  theShape,
  theShapeType,
  theState 
)

Works like the above method, but returns list of sub-shapes indices.

Example

def geompy.GetInPlace (   self,
  theShapeWhere,
  theShapeWhat 
)

Get sub-shape(s) of theShapeWhere, which are coincident with theShapeWhat or could be a part of it.

Parameters:
theShapeWhere Shape to find sub-shapes of.
theShapeWhat Shape, specifying what to find.
Returns:
Group of all found sub-shapes or a single found sub-shape.

Example

def geompy.GetInPlaceByHistory (   self,
  theShapeWhere,
  theShapeWhat 
)

Get sub-shape(s) of theShapeWhere, which are coincident with theShapeWhat or could be a part of it.

Implementation of this method is based on a saved history of an operation, produced theShapeWhere. The theShapeWhat must be among this operation's arguments (an argument shape or a sub-shape of an argument shape). The operation could be the Partition or one of boolean operations, performed on simple shapes (not on compounds).

Parameters:
theShapeWhere Shape to find sub-shapes of.
theShapeWhat Shape, specifying what to find (must be in the building history of the ShapeWhere).
Returns:
Group of all found sub-shapes or a single found sub-shape.

Example

def geompy.GetSame (   self,
  theShapeWhere,
  theShapeWhat 
)

Get sub-shape of theShapeWhere, which is equal to theShapeWhat.

Parameters:
theShapeWhere Shape to find sub-shape of.
theShapeWhat Shape, specifying what to find.
Returns:
New GEOM_Object for found sub-shape.

Example

 All Data Structures Namespaces Files Functions Variables

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