2 #ifndef _GEOMImpl_IBlocksOperations_HXX_
3 #define _GEOMImpl_IBlocksOperations_HXX_
5 #include "GEOM_IOperations.hxx"
7 #include <TopTools_ListOfShape.hxx>
8 #include <TColStd_HSequenceOfTransient.hxx>
13 class Handle(GEOM_Object);
14 class Handle(TColStd_HArray1OfInteger);
16 class GEOMImpl_IBlocksOperations : public GEOM_IOperations {
18 GEOMImpl_IBlocksOperations(GEOM_Engine* theEngine, int theDocID);
19 ~GEOMImpl_IBlocksOperations();
21 // Creation of blocks and block faces
22 Handle(GEOM_Object) MakeQuadFaceFourVertices (Handle(GEOM_Object) thePoint1,
23 Handle(GEOM_Object) thePoint2,
24 Handle(GEOM_Object) thePoint3,
25 Handle(GEOM_Object) thePoint4);
27 Handle(GEOM_Object) MakeQuadFaceFourEdges (Handle(GEOM_Object) theEdge1,
28 Handle(GEOM_Object) theEdge2,
29 Handle(GEOM_Object) theEdge3,
30 Handle(GEOM_Object) theEdge4);
32 Handle(GEOM_Object) MakeQuadFaceTwoEdges (Handle(GEOM_Object) theEdge1,
33 Handle(GEOM_Object) theEdge2);
35 Handle(GEOM_Object) MakeHexaSolidSixFaces (Handle(GEOM_Object) theFace1,
36 Handle(GEOM_Object) theFace2,
37 Handle(GEOM_Object) theFace3,
38 Handle(GEOM_Object) theFace4,
39 Handle(GEOM_Object) theFace5,
40 Handle(GEOM_Object) theFace6);
42 Handle(GEOM_Object) MakeHexaSolidTwoFaces (Handle(GEOM_Object) theFace1,
43 Handle(GEOM_Object) theFace2);
45 // Extract elements of blocks and blocks compounds
46 Handle(GEOM_Object) GetEdge (Handle(GEOM_Object) theShape,
47 Handle(GEOM_Object) thePoint1,
48 Handle(GEOM_Object) thePoint2);
50 Handle(GEOM_Object) GetFaceByPoints (Handle(GEOM_Object) theShape,
51 Handle(GEOM_Object) thePoint1,
52 Handle(GEOM_Object) thePoint2,
53 Handle(GEOM_Object) thePoint3,
54 Handle(GEOM_Object) thePoint4);
56 Handle(GEOM_Object) GetFaceByEdges (Handle(GEOM_Object) theShape,
57 Handle(GEOM_Object) theEdge1,
58 Handle(GEOM_Object) theEdge2);
60 Handle(GEOM_Object) GetOppositeFace (Handle(GEOM_Object) theBlock,
61 Handle(GEOM_Object) theFace);
63 Handle(GEOM_Object) GetFaceNearPoint (Handle(GEOM_Object) theBlock,
64 Handle(GEOM_Object) thePoint);
66 Handle(GEOM_Object) GetFaceByNormale (Handle(GEOM_Object) theBlock,
67 Handle(GEOM_Object) theVector);
69 // Extract blocks from blocks compounds
70 Standard_Boolean IsCompoundOfBlocks (Handle(GEOM_Object) theCompound,
71 const Standard_Integer theMinNbFaces,
72 const Standard_Integer theMaxNbFaces,
73 Standard_Integer& theNbBlocks);
75 Handle(TColStd_HSequenceOfTransient) ExplodeCompoundOfBlocks
76 (Handle(GEOM_Object) theCompound,
77 const Standard_Integer theMinNbFaces,
78 const Standard_Integer theMaxNbFaces);
80 Handle(GEOM_Object) GetBlockNearPoint (Handle(GEOM_Object) theCompound,
81 Handle(GEOM_Object) thePoint);
83 Handle(GEOM_Object) GetBlockByParts
84 (Handle(GEOM_Object) theCompound,
85 const Handle(TColStd_HSequenceOfTransient)& theParts);
87 Handle(TColStd_HSequenceOfTransient) GetBlocksByParts
88 (Handle(GEOM_Object) theCompound,
89 const Handle(TColStd_HSequenceOfTransient)& theParts);
91 // Operations on blocks with gluing of result
92 Handle(GEOM_Object) MakeMultiTransformation1D (Handle(GEOM_Object) theBlock,
93 const Standard_Integer theDirFace1,
94 const Standard_Integer theDirFace2,
95 const Standard_Integer theNbTimes);
97 Handle(GEOM_Object) MakeMultiTransformation2D (Handle(GEOM_Object) theBlock,
98 const Standard_Integer theDirFace1U,
99 const Standard_Integer theDirFace2U,
100 const Standard_Integer theNbTimesU,
101 const Standard_Integer theDirFace1V,
102 const Standard_Integer theDirFace2V,
103 const Standard_Integer theNbTimesV);
105 Handle(GEOM_Object) MakeMultiTranslation1D (Handle(GEOM_Object) theBlock,
106 const Standard_Integer theDirFace,
107 const Standard_Integer theNbTimes);
109 Handle(GEOM_Object) MakeMultiTranslation2D (Handle(GEOM_Object) theBlock,
110 const Standard_Integer theDirFace1,
111 const Standard_Integer theNbTimes1,
112 const Standard_Integer theDirFace2,
113 const Standard_Integer theNbTimes2);