Version: 6.3.1
Functions

Blocks Operations

Transforming geometrical objects

Functions

def geompy.GetPoint
 Get a vertex, found in the given shape by its coordinates.
def geompy.GetVertexNearPoint
 Find a vertex of the given shape, which has minimal distance to the given point.
def geompy.GetEdge
 Get an edge, found in the given shape by two given vertices.
def geompy.GetEdgeNearPoint
 Find an edge of the given shape, which has minimal distance to the given point.
def geompy.GetFaceByPoints
 Returns a face, found in the given shape by four given corner vertices.
def geompy.GetFaceByEdges
 Get a face of block, found in the given shape by two given edges.
def geompy.GetOppositeFace
 Find a face, opposite to the given one in the given block.
def geompy.GetFaceNearPoint
 Find a face of the given shape, which has minimal distance to the given point.
def geompy.GetFaceByNormale
 Find a face of block, whose outside normale has minimal angle with the given vector.
def geompy.GetShapesNearPoint
 Find all subshapes of type theShapeType of the given shape, which have minimal distance to the given point.
def geompy.MakeBlockExplode
 Get all the blocks, contained in the given compound.
def geompy.GetBlockNearPoint
 Find block, containing the given point inside its volume or on boundary.
def geompy.GetBlockByParts
 Find block, containing all the elements, passed as the parts, or maximum quantity of them.
def geompy.GetBlocksByParts
 Return all blocks, containing all the elements, passed as the parts.
def geompy.MakeMultiTransformation1D
 Multi-transformate block and glue the result.
def geompy.MakeMultiTransformation2D
 Multi-transformate block and glue the result.
def geompy.Propagate
 Build all possible propagation groups.

Function Documentation

def geompy.GetPoint (   self,
  theShape,
  theX,
  theY,
  theZ,
  theEpsilon 
)
Parameters:
theShapeBlock or a compound of blocks.
theX,theY,theZCoordinates of the sought vertex.
theEpsilonMaximum allowed distance between the resulting vertex and point with the given coordinates.
Returns:
New GEOM_Object, containing the found vertex.

Example

def geompy.GetVertexNearPoint (   self,
  theShape,
  thePoint 
)
Parameters:
theShapeAny shape.
thePointPoint, close to the desired vertex.
Returns:
New GEOM_Object, containing the found vertex.

Example

def geompy.GetEdge (   self,
  theShape,
  thePoint1,
  thePoint2 
)
Parameters:
theShapeBlock or a compound of blocks.
thePoint1,thePoint2Points, close to the ends of the desired edge.
Returns:
New GEOM_Object, containing the found edge.

Example

def geompy.GetEdgeNearPoint (   self,
  theShape,
  thePoint 
)
Parameters:
theShapeBlock or a compound of blocks.
thePointPoint, close to the desired edge.
Returns:
New GEOM_Object, containing the found edge.

Example

def geompy.GetFaceByPoints (   self,
  theShape,
  thePoint1,
  thePoint2,
  thePoint3,
  thePoint4 
)
Parameters:
theShapeBlock or a compound of blocks.
thePoint1,thePoint2,thePoint3,thePoint4Points, close to the corners of the desired face.
Returns:
New GEOM_Object, containing the found face.

Example

def geompy.GetFaceByEdges (   self,
  theShape,
  theEdge1,
  theEdge2 
)
Parameters:
theShapeBlock or a compound of blocks.
theEdge1,theEdge2Edges, close to the edges of the desired face.
Returns:
New GEOM_Object, containing the found face.

Example

def geompy.GetOppositeFace (   self,
  theBlock,
  theFace 
)
Parameters:
theBlockMust be a hexahedral solid.
theFaceFace of theBlock, opposite to the desired face.
Returns:
New GEOM_Object, containing the found face.

Example

def geompy.GetFaceNearPoint (   self,
  theShape,
  thePoint 
)
Parameters:
theShapeBlock or a compound of blocks.
thePointPoint, close to the desired face.
Returns:
New GEOM_Object, containing the found face.

Example

def geompy.GetFaceByNormale (   self,
  theBlock,
  theVector 
)
Parameters:
theBlockBlock or a compound of blocks.
theVectorVector, close to the normale of the desired face.
Returns:
New GEOM_Object, containing the found face.

Example

def geompy.GetShapesNearPoint (   self,
  theShape,
  thePoint,
  theShapeType,
  theTolerance = 1e-07 
)
Parameters:
theShapeAny shape.
thePointPoint, close to the desired shape.
theShapeTypeDefines what kind of subshapes is searched.
theToleranceThe tolerance for distances comparison. All shapes with distances to the given point in interval [minimal_distance, minimal_distance + theTolerance] will be gathered.
Returns:
New GEOM_Object, containing a group of all found shapes.

Example

def geompy.MakeBlockExplode (   self,
  theCompound,
  theMinNbFaces,
  theMaxNbFaces 
)
Parameters:
theCompoundThe compound to explode.
theMinNbFacesIf solid has lower number of faces, it is not a block.
theMaxNbFacesIf solid has higher number of faces, it is not a block.
Note:
If theMaxNbFaces = 0, the maximum number of faces is not restricted.
Returns:
List of GEOM_Objects, containing the retrieved blocks.

Example 1
Example 2

def geompy.GetBlockNearPoint (   self,
  theCompound,
  thePoint 
)
Parameters:
theCompoundCompound, to find block in.
thePointPoint, close to the desired block. If the point lays on boundary between some blocks, we return block with nearest center.
Returns:
New GEOM_Object, containing the found block.

Example

def geompy.GetBlockByParts (   self,
  theCompound,
  theParts 
)
Parameters:
theCompoundCompound, to find block in.
thePartsList of faces and/or edges and/or vertices to be parts of the found block.
Returns:
New GEOM_Object, containing the found block.

Example

def geompy.GetBlocksByParts (   self,
  theCompound,
  theParts 
)
Parameters:
theCompoundCompound, to find blocks in.
thePartsList of faces and/or edges and/or vertices to be parts of the found blocks.
Returns:
List of GEOM_Objects, containing the found blocks.

Example

def geompy.MakeMultiTransformation1D (   self,
  Block,
  DirFace1,
  DirFace2,
  NbTimes 
)

Transformation is defined so, as to superpose direction faces.

Parameters:
BlockHexahedral solid to be multi-transformed.
DirFace1ID of First direction face.
DirFace2ID of Second direction face.
NbTimesQuantity of transformations to be done.
Note:
Unique ID of sub-shape can be obtained, using method GetSubShapeID().
Returns:
New GEOM_Object, containing the result shape.

Example

def geompy.MakeMultiTransformation2D (   self,
  Block,
  DirFace1U,
  DirFace2U,
  NbTimesU,
  DirFace1V,
  DirFace2V,
  NbTimesV 
)
Parameters:
BlockHexahedral solid to be multi-transformed.
DirFace1U,DirFace2UIDs of Direction faces for the first transformation.
DirFace1V,DirFace2VIDs of Direction faces for the second transformation.
NbTimesU,NbTimesVQuantity of transformations to be done.
Returns:
New GEOM_Object, containing the result shape.

Example

def geompy.Propagate (   self,
  theShape 
)

Propagation group is a set of all edges, opposite to one (main) edge of this group directly or through other opposite edges. Notion of Opposite Edge make sence only on quadrangle face.

Parameters:
theShapeShape to build propagation groups on.
Returns:
List of GEOM_Objects, each of them is a propagation group.

Example

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