Version: 9.12.0
GEOM::GEOM_IBlocksOperations Interface Reference

Interface for Blocks construction Face from points or edges, Block from faces, Blocks multi-translation and multi-rotation.

import"GEOM_Gen.idl";

Inheritance diagram for GEOM::GEOM_IBlocksOperations:
Inheritance graph

Classes

struct  BCError
 Description of Blocks Compound defect: type and incriminated sub-shapes. More...
 

Public Types

enum  BCErrorType {
  NOT_BLOCK , EXTRA_EDGE , INVALID_CONNECTION , NOT_CONNECTED ,
  NOT_GLUED
}
 Enumeration of Blocks Compound defects. More...
 
typedef sequence< BCErrorBCErrors
 Sequence of all Blocks Compound defects. More...
 

Public Member Functions

GEOM_Object MakeQuad (in GEOM_Object theEdge1, in GEOM_Object theEdge2, in GEOM_Object theEdge3, in GEOM_Object theEdge4)
 Create a quadrangle face from four edges. Order of Edges is not important. It is not necessary that edges share the same vertex. More...
 
GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1, in GEOM_Object theEdge2)
 Create a quadrangle face on two edges. More...
 
GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1, in GEOM_Object thePnt2, in GEOM_Object thePnt3, in GEOM_Object thePnt4)
 Create a quadrangle face with specified corners. More...
 
GEOM_Object MakeHexa (in GEOM_Object theFace1, in GEOM_Object theFace2, in GEOM_Object theFace3, in GEOM_Object theFace4, in GEOM_Object theFace5, in GEOM_Object theFace6)
 Create a hexahedral solid, bounded by the six given faces. Order of faces is not important. More...
 
GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1, in GEOM_Object theFace2)
 Create a hexahedral solid between two given faces. More...
 
GEOM_Object GetPoint (in GEOM_Object theShape, in double theX, in double theY, in double theZ, in double theEpsilon)
 Get a vertex, found in the given shape by its coordinates. More...
 
GEOM_Object GetVertexNearPoint (in GEOM_Object theShape, in GEOM_Object thePoint)
 Find a vertex of the given shape, which has minimal distance to the given point. More...
 
GEOM_Object GetEdge (in GEOM_Object theShape, in GEOM_Object thePoint1, in GEOM_Object thePoint2)
 Get an edge, found in the given shape by two given vertices. More...
 
GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape, in GEOM_Object thePoint)
 Find an edge of the given shape, which has minimal distance to the given point. More...
 
GEOM_Object GetFaceByPoints (in GEOM_Object theShape, in GEOM_Object thePoint1, in GEOM_Object thePoint2, in GEOM_Object thePoint3, in GEOM_Object thePoint4)
 Returns a face, found in the given shape by four given corner vertices. More...
 
GEOM_Object GetFaceByEdges (in GEOM_Object theShape, in GEOM_Object theEdge1, in GEOM_Object theEdge2)
 Get a face of block, found in the given shape by two given edges. More...
 
GEOM_Object GetOppositeFace (in GEOM_Object theBlock, in GEOM_Object theFace)
 Find a face, opposite to the given one in the given block. More...
 
GEOM_Object GetFaceNearPoint (in GEOM_Object theShape, in GEOM_Object thePoint)
 Find a face of the given shape, which has minimal distance to the given point. More...
 
GEOM_Object GetFaceByNormale (in GEOM_Object theBlock, in GEOM_Object theVector)
 Find a face of block, whose outside normale has minimal angle with the given vector. More...
 
GEOM_Object GetShapesNearPoint (in GEOM_Object theShape, in GEOM_Object thePoint, in long theShapeType, in double theTolerance)
 Find all sub-shapes of type theShapeType of the given shape, which have minimal distance to the given point. More...
 
boolean IsCompoundOfBlocks (in GEOM_Object theCompound, in long theMinNbFaces, in long theMaxNbFaces, out long theNbBlocks)
 Check, if the compound contains only specified blocks. More...
 
boolean CheckCompoundOfBlocks (in GEOM_Object theCompound, in double theToleranceC1, out BCErrors theErrors)
 Check, if the compound of blocks is given. More...
 
string PrintBCErrors (in GEOM_Object theCompound, in BCErrors theErrors)
 Convert sequence of Blocks Compound errors, returned by CheckCompoundOfBlocks(), into string. More...
 
GEOM_Object GetNonBlocks (in GEOM_Object theShape, in double theToleranceC1, out GEOM_Object theNonQuads)
 Retrieve all non blocks solids and faces from a shape. More...
 
GEOM_Object RemoveExtraEdges (in GEOM_Object theShape, in long theOptimumNbFaces)
 Remove all seam and degenerated edges from theShape. More...
 
GEOM_Object UnionFaces (in GEOM_Object theShape)
 Performs union faces of theShape. More...
 
GEOM_Object CheckAndImprove (in GEOM_Object theCompound)
 Check, if the given shape is a blocks compound. More...
 
ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound, in long theMinNbFaces, in long theMaxNbFaces)
 Get all the blocks, contained in the given compound. More...
 
GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound, in GEOM_Object thePoint)
 Find block, containing the given point inside its volume or on boundary. More...
 
GEOM_Object GetBlockByParts (in GEOM_Object theCompound, in ListOfGO theParts)
 Find block, containing all the elements, passed as the parts, or maximum quantity of them. More...
 
ListOfGO GetBlocksByParts (in GEOM_Object theCompound, in ListOfGO theParts)
 Return all blocks, containing all the elements, passed as the parts. More...
 
GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock, in long theDirFace1, in long theDirFace2, in long theNbTimes)
 Multi-transformate block and glue the result. More...
 
GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock, in long theDirFace1U, in long theDirFace2U, in long theNbTimesU, in long theDirFace1V, in long theDirFace2V, in long theNbTimesV)
 Multi-transformate block and glue the result. More...
 
ListOfGO Propagate (in GEOM_Object theShape)
 Build all possible propagation groups. More...
 
- Public Member Functions inherited from GEOM::GEOM_IOperations
boolean IsDone ()
 To know, if the operation was successfully performed. More...
 
void SetErrorCode (in string theErrorID)
 Set the operation error code. More...
 
string GetErrorCode ()
 Get the operation error code. More...
 
void StartOperation ()
 Opens a new transaction. More...
 
void FinishOperation ()
 Closes the previously opened transaction. More...
 
void AbortOperation ()
 Aborts the previously opened transaction. More...
 

Member Typedef Documentation

◆ BCErrors

Member Enumeration Documentation

◆ BCErrorType

Enumerator
NOT_BLOCK 
EXTRA_EDGE 
INVALID_CONNECTION 
NOT_CONNECTED 
NOT_GLUED 

Member Function Documentation

◆ CheckAndImprove()

GEOM_Object GEOM::GEOM_IBlocksOperations::CheckAndImprove ( in GEOM_Object  theCompound)

Fix all detected errors.

Note
Single block can be also fixed by this method.
Parameters
theCompoundThe compound to check and improve.
Returns
Improved compound.

◆ CheckCompoundOfBlocks()

boolean GEOM::GEOM_IBlocksOperations::CheckCompoundOfBlocks ( in GEOM_Object  theCompound,
in double  theToleranceC1,
out BCErrors  theErrors 
)

To be considered as a compound of blocks, the given shape must satisfy the following conditions:

  • Each element of the compound should be a Block (6 faces and 12 edges).
  • A connection between two Blocks should be an entire quadrangle face or an entire edge.
  • The compound should be connexe.
  • The glue between two quadrangle faces should be applied.
    Note
    Single block is also accepted as a valid compound of blocks.
    Parameters
    theCompoundThe compound to check.
    theToleranceC1the tolerance to check if two neighbor edges are collinear in the common vertex with this tolerance. Negative value means that C1 criterion is not used (old implementation).
    theErrorsStructure, containing discovered errors and incriminated sub-shapes.
    Returns
    TRUE, if the given shape is a compound of blocks.

◆ ExplodeCompoundOfBlocks()

ListOfGO GEOM::GEOM_IBlocksOperations::ExplodeCompoundOfBlocks ( in GEOM_Object  theCompound,
in long  theMinNbFaces,
in long  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_Object, containing the retrieved blocks.

◆ GetBlockByParts()

GEOM_Object GEOM::GEOM_IBlocksOperations::GetBlockByParts ( in GEOM_Object  theCompound,
in ListOfGO  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.

◆ GetBlockNearPoint()

GEOM_Object GEOM::GEOM_IBlocksOperations::GetBlockNearPoint ( in GEOM_Object  theCompound,
in GEOM_Object  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.

◆ GetBlocksByParts()

ListOfGO GEOM::GEOM_IBlocksOperations::GetBlocksByParts ( in GEOM_Object  theCompound,
in ListOfGO  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_Object, containing the found blocks.

◆ GetEdge()

GEOM_Object GEOM::GEOM_IBlocksOperations::GetEdge ( in GEOM_Object  theShape,
in GEOM_Object  thePoint1,
in GEOM_Object  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.

◆ GetEdgeNearPoint()

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

◆ GetFaceByEdges()

GEOM_Object GEOM::GEOM_IBlocksOperations::GetFaceByEdges ( in GEOM_Object  theShape,
in GEOM_Object  theEdge1,
in GEOM_Object  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.

◆ GetFaceByNormale()

GEOM_Object GEOM::GEOM_IBlocksOperations::GetFaceByNormale ( in GEOM_Object  theBlock,
in GEOM_Object  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.

◆ GetFaceByPoints()

GEOM_Object GEOM::GEOM_IBlocksOperations::GetFaceByPoints ( in GEOM_Object  theShape,
in GEOM_Object  thePoint1,
in GEOM_Object  thePoint2,
in GEOM_Object  thePoint3,
in GEOM_Object  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.

◆ GetFaceNearPoint()

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

◆ GetNonBlocks()

GEOM_Object GEOM::GEOM_IBlocksOperations::GetNonBlocks ( in GEOM_Object  theShape,
in double  theToleranceC1,
out GEOM_Object  theNonQuads 
)
Parameters
theShapeThe shape to explore.
theToleranceC1the tolerance to check if two neighbor edges are collinear in the common vertex with this tolerance. Negative value means that C1 criterion is not used (old implementation).
theNonQuadsOutput parameter. Group of all non quadrangular faces.
Returns
Group of all non block solids (= not 6 faces, or with 6 faces, but with the presence of non-quadrangular faces).

◆ GetOppositeFace()

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

◆ GetPoint()

GEOM_Object GEOM::GEOM_IBlocksOperations::GetPoint ( in GEOM_Object  theShape,
in double  theX,
in double  theY,
in double  theZ,
in double  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.

◆ GetShapesNearPoint()

GEOM_Object GEOM::GEOM_IBlocksOperations::GetShapesNearPoint ( in GEOM_Object  theShape,
in GEOM_Object  thePoint,
in long  theShapeType,
in double  theTolerance 
)
Parameters
theShapeAny shape.
thePointPoint, close to the desired shape.
theShapeTypeDefines what kind of sub-shapes 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.

◆ GetVertexNearPoint()

GEOM_Object GEOM::GEOM_IBlocksOperations::GetVertexNearPoint ( in GEOM_Object  theShape,
in GEOM_Object  thePoint 
)
Parameters
theShapeAny shape.
thePointPoint, close to the desired vertex.
Returns
New GEOM_Object, containing the found vertex.

◆ IsCompoundOfBlocks()

boolean GEOM::GEOM_IBlocksOperations::IsCompoundOfBlocks ( in GEOM_Object  theCompound,
in long  theMinNbFaces,
in long  theMaxNbFaces,
out long  theNbBlocks 
)
Parameters
theCompoundThe compound to check.
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.
Parameters
theNbBlocksNumber of specified blocks in theCompound.
Returns
TRUE, if the given compound contains only blocks.

◆ MakeHexa()

GEOM_Object GEOM::GEOM_IBlocksOperations::MakeHexa ( in GEOM_Object  theFace1,
in GEOM_Object  theFace2,
in GEOM_Object  theFace3,
in GEOM_Object  theFace4,
in GEOM_Object  theFace5,
in GEOM_Object  theFace6 
)

It is not necessary that Faces share the same edge.

Parameters
theFace1,theFace2,theFace3,theFace4,theFace5,theFace6Faces for the hexahedral solid.
Returns
New GEOM_Object, containing the created solid.

◆ MakeHexa2Faces()

GEOM_Object GEOM::GEOM_IBlocksOperations::MakeHexa2Faces ( in GEOM_Object  theFace1,
in GEOM_Object  theFace2 
)

The missing faces will be built by creating the smallest ones.

Parameters
theFace1,theFace2Two opposite faces for the hexahedral solid.
Returns
New GEOM_Object, containing the created solid.

◆ MakeMultiTransformation1D()

GEOM_Object GEOM::GEOM_IBlocksOperations::MakeMultiTransformation1D ( in GEOM_Object  theBlock,
in long  theDirFace1,
in long  theDirFace2,
in long  theNbTimes 
)

Transformation is defined so, as to superpose theDirFace1 with theDirFace2.

Parameters
theBlockHexahedral solid to be multi-transformed.
theDirFace1First direction face global index.
theDirFace2Second direction face global index.
theNbTimesQuantity of transformations to be done.
Note
Global index of sub-shape can be obtained, using method GEOM_IShapesOperations.GetSubShapeIndex().
Returns
New GEOM_Object, containing the result shape.

◆ MakeMultiTransformation2D()

GEOM_Object GEOM::GEOM_IBlocksOperations::MakeMultiTransformation2D ( in GEOM_Object  theBlock,
in long  theDirFace1U,
in long  theDirFace2U,
in long  theNbTimesU,
in long  theDirFace1V,
in long  theDirFace2V,
in long  theNbTimesV 
)
Parameters
theBlockHexahedral solid to be multi-transformed.
theDirFace1U,theDirFace2UDirection faces for the first transformation.
theDirFace1V,theDirFace2VDirection faces for the second transformation.
theNbTimesU,theNbTimesVQuantity of transformations to be done.
Returns
New GEOM_Object, containing the result shape.

◆ MakeQuad()

GEOM_Object GEOM::GEOM_IBlocksOperations::MakeQuad ( in GEOM_Object  theEdge1,
in GEOM_Object  theEdge2,
in GEOM_Object  theEdge3,
in GEOM_Object  theEdge4 
)
Parameters
theEdge1,theEdge2,theEdge3,theEdge4Edges for the face bound.
Returns
New GEOM_Object, containing the created face.

◆ MakeQuad2Edges()

GEOM_Object GEOM::GEOM_IBlocksOperations::MakeQuad2Edges ( in GEOM_Object  theEdge1,
in GEOM_Object  theEdge2 
)

The missing edges will be built by creating the shortest ones.

Parameters
theEdge1,theEdge2Two opposite edges for the face.
Returns
New GEOM_Object, containing the created face.

◆ MakeQuad4Vertices()

GEOM_Object GEOM::GEOM_IBlocksOperations::MakeQuad4Vertices ( in GEOM_Object  thePnt1,
in GEOM_Object  thePnt2,
in GEOM_Object  thePnt3,
in GEOM_Object  thePnt4 
)

The missing edges will be built by creating the shortest ones.

Parameters
thePnt1,thePnt2,thePnt3,thePnt4Corner vertices for the face.
Returns
New GEOM_Object, containing the created face.

◆ PrintBCErrors()

string GEOM::GEOM_IBlocksOperations::PrintBCErrors ( in GEOM_Object  theCompound,
in BCErrors  theErrors 
)
Parameters
theCompoundThe bad compound.
theErrorsThe sequence of theCompound errors.
Returns
String, describing all the errors in form, suitable for printing.

◆ Propagate()

ListOfGO GEOM::GEOM_IBlocksOperations::Propagate ( in GEOM_Object  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 sense only on quadrangle face.

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

◆ RemoveExtraEdges()

GEOM_Object GEOM::GEOM_IBlocksOperations::RemoveExtraEdges ( in GEOM_Object  theShape,
in long  theOptimumNbFaces 
)

Unite faces and edges, sharing one surface.

Parameters
theShapeThe compound or single solid to remove irregular edges from.
theOptimumNbFacesIf more than zero, unite faces only for those solids, that have more than theOptimumNbFaces faces. If zero, unite faces always, regardsless their quantity in the solid. If negative, do not unite faces at all. For blocks repairing recommended value is 6.
Returns
Improved shape.

◆ UnionFaces()

GEOM_Object GEOM::GEOM_IBlocksOperations::UnionFaces ( in GEOM_Object  theShape)

Unite faces sharing one surface.

Parameters
theShapeThe compound or single solid that contains faces to perform union.
Returns
Improved shape.

The documentation for this interface was generated from the following file: