Version: 6.5.0
Home
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
Access to sub-shapes 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.GetSharedShapesMulti
 Get all sub-shapes, shared by all shapes in the list theShapes.
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
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified plane by the certain way, defined through theState parameter.
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
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified plane by the certain way, defined through theState parameter.
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
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified cylinder by the certain way, defined through theState parameter.
def geompy.GetShapesOnCylinderWithLocation
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified cylinder by the certain way, defined through theState parameter.
def geompy.GetShapesOnCylinderWithLocationIDs
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified cylinder by the certain way, defined through theState parameter.
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
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified sphere by the certain way, defined through theState parameter.
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
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified quadrangle by the certain way, defined through theState parameter.
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
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified theBox by the certain way, defined through theState parameter.
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
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified theCheckShape by the certain way, defined through theState parameter.
def geompy.GetShapesOnShapeIDs
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified theCheckShape by the certain way, defined through theState parameter.
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.
def geompy.GetSameIDs
 Get sub-shape indices of theShapeWhere, which is equal to theShapeWhat.

Detailed Description

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
theShapeShape to find free faces in.
Returns
List of IDs of all free faces, contained in theShape.

Example

References geompy.RaiseIfFailed().

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

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

Parameters
theShape1Shape to find sub-shapes in.
theShape2Shape to find shared sub-shapes with.
theShapeTypeType of sub-shapes to be retrieved.
Returns
List of sub-shapes of theShape1, shared with theShape2.

Example

References geompy.RaiseIfFailed().

def geompy.GetSharedShapesMulti (   self,
  theShapes,
  theShapeType 
)

Get all sub-shapes, shared by all shapes in the list theShapes.

Parameters
theShapesShapes to find common sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
Returns
List of objects, that are sub-shapes of all given shapes.

Example

References geompy.RaiseIfFailed().

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
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theAx1Vector (or line, or linear edge), specifying normal direction and location of the plane to find shapes on.
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes.

Example

References geompy.RaiseIfFailed().

def geompy.GetShapesOnPlaneIDs (   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
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theAx1Vector (or line, or linear edge), specifying normal direction and location of the plane to find shapes on.
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes indices.

Example

References geompy.RaiseIfFailed().

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
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theAx1Vector (or line, or linear edge), specifying normal direction of the plane to find shapes on.
thePntPoint specifying location of the plane to find shapes on.
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes.

Example

References geompy.RaiseIfFailed().

def geompy.GetShapesOnPlaneWithLocationIDs (   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
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theAx1Vector (or line, or linear edge), specifying normal direction of the plane to find shapes on.
thePntPoint specifying location of the plane to find shapes on.
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes indices.

Example

References geompy.RaiseIfFailed().

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
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theAxisVector (or line, or linear edge), specifying axis of the cylinder to find shapes on.
theRadiusRadius of the cylinder to find shapes on.
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes.

Example

References geompy.RaiseIfFailed().

def geompy.GetShapesOnCylinderIDs (   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
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theAxisVector (or line, or linear edge), specifying axis of the cylinder to find shapes on.
theRadiusRadius of the cylinder to find shapes on.
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes indices.

Example

References geompy.RaiseIfFailed().

def geompy.GetShapesOnCylinderWithLocation (   self,
  theShape,
  theShapeType,
  theAxis,
  thePnt,
  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
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theAxisVector (or line, or linear edge), specifying axis of the cylinder to find shapes on.
thePntPoint specifying location of the bottom of the cylinder.
theRadiusRadius of the cylinder to find shapes on.
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes.

Example

References geompy.RaiseIfFailed().

def geompy.GetShapesOnCylinderWithLocationIDs (   self,
  theShape,
  theShapeType,
  theAxis,
  thePnt,
  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
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theAxisVector (or line, or linear edge), specifying axis of the cylinder to find shapes on.
thePntPoint specifying location of the bottom of the cylinder.
theRadiusRadius of the cylinder to find shapes on.
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes indices

Example

References geompy.RaiseIfFailed().

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
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theCenterPoint, specifying center of the sphere to find shapes on.
theRadiusRadius of the sphere to find shapes on.
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes.

Example

References geompy.RaiseIfFailed().

def geompy.GetShapesOnSphereIDs (   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
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theCenterPoint, specifying center of the sphere to find shapes on.
theRadiusRadius of the sphere to find shapes on.
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes indices.

Example

References geompy.GetShapesOnQuadrangle(), and geompy.RaiseIfFailed().

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
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theTopLeftPointPoint, specifying top left corner of a quadrangle
theTopRigthPointPoint, specifying top right corner of a quadrangle
theBottomLeftPointPoint, specifying bottom left corner of a quadrangle
theBottomRigthPointPoint, specifying bottom right corner of a quadrangle
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes.

Example

References geompy.GetShapesOnQuadrangleIDs(), and geompy.RaiseIfFailed().

def geompy.GetShapesOnQuadrangleIDs (   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
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theTopLeftPointPoint, specifying top left corner of a quadrangle
theTopRigthPointPoint, specifying top right corner of a quadrangle
theBottomLeftPointPoint, specifying bottom left corner of a quadrangle
theBottomRigthPointPoint, specifying bottom right corner of a quadrangle
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes indices.

Example

References geompy.RaiseIfFailed().

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
theBoxShape for relative comparing.
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes.

Example

References geompy.RaiseIfFailed().

def geompy.GetShapesOnBoxIDs (   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
theBoxShape for relative comparing.
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes indices.

Example

References geompy.RaiseIfFailed().

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
theCheckShapeShape for relative comparing. It must be a solid.
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes.

Example

References geompy.RaiseIfFailed().

def geompy.GetShapesOnShapeAsCompound (   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
theCheckShapeShape for relative comparing. It must be a solid.
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
All found sub-shapes as compound.

Example

References geompy.RaiseIfFailed().

def geompy.GetShapesOnShapeIDs (   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
theCheckShapeShape for relative comparing. It must be a solid.
theShapeShape to find sub-shapes of.
theShapeTypeType of sub-shapes to be retrieved (see ShapeType())
theStateThe state of the sub-shapes to find (see GEOM::shape_state)
Returns
List of all found sub-shapes indices.

Example

References geompy.RaiseIfFailed().

def geompy.GetInPlace (   self,
  theShapeWhere,
  theShapeWhat,
  isNewImplementation = False 
)

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

Parameters
theShapeWhereShape to find sub-shapes of.
theShapeWhatShape, specifying what to find.
isNewImplementationimplementation of GetInPlace functionality (default = False, old alghorithm based on shape properties)
Returns
Group of all found sub-shapes or a single found sub-shape.
Note
This function has a restriction on argument shapes. If theShapeWhere has curved parts with significantly outstanding centres (i.e. the mass centre of a part is closer to theShapeWhat than to the part), such parts will not be found.
get_in_place_lost_part.png

Example

References geompy.RaiseIfFailed().

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
theShapeWhereShape to find sub-shapes of.
theShapeWhatShape, 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

References geompy.RaiseIfFailed().

def geompy.GetSame (   self,
  theShapeWhere,
  theShapeWhat 
)

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

Parameters
theShapeWhereShape to find sub-shape of.
theShapeWhatShape, specifying what to find.
Returns
New GEOM.GEOM_Object for found sub-shape.

Example

References geompy.RaiseIfFailed().

def geompy.GetSameIDs (   self,
  theShapeWhere,
  theShapeWhat 
)

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

Parameters
theShapeWhereShape to find sub-shape of.
theShapeWhatShape, specifying what to find.
Returns
List of all found sub-shapes indices.

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