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) MakeQuad (Handle(GEOM_Object) theEdge1,
23 Handle(GEOM_Object) theEdge2,
24 Handle(GEOM_Object) theEdge3,
25 Handle(GEOM_Object) theEdge4);
27 Handle(GEOM_Object) MakeQuad2Edges (Handle(GEOM_Object) theEdge1,
28 Handle(GEOM_Object) theEdge2);
30 Handle(GEOM_Object) MakeQuad4Vertices (Handle(GEOM_Object) thePoint1,
31 Handle(GEOM_Object) thePoint2,
32 Handle(GEOM_Object) thePoint3,
33 Handle(GEOM_Object) thePoint4);
35 Handle(GEOM_Object) MakeHexa (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) MakeHexa2Faces (Handle(GEOM_Object) theFace1,
43 Handle(GEOM_Object) theFace2);
45 Handle(GEOM_Object) MakeBlockCompound (Handle(GEOM_Object) theCompound);
47 // Extract elements of blocks and blocks compounds
48 Handle(GEOM_Object) GetPoint (Handle(GEOM_Object) theShape,
49 const Standard_Real theX,
50 const Standard_Real theY,
51 const Standard_Real theZ,
52 const Standard_Real theEpsilon);
54 Handle(GEOM_Object) GetEdge (Handle(GEOM_Object) theShape,
55 Handle(GEOM_Object) thePoint1,
56 Handle(GEOM_Object) thePoint2);
58 Handle(GEOM_Object) GetEdgeNearPoint (Handle(GEOM_Object) theBlock,
59 Handle(GEOM_Object) thePoint);
61 Handle(GEOM_Object) GetFaceByPoints (Handle(GEOM_Object) theShape,
62 Handle(GEOM_Object) thePoint1,
63 Handle(GEOM_Object) thePoint2,
64 Handle(GEOM_Object) thePoint3,
65 Handle(GEOM_Object) thePoint4);
67 Handle(GEOM_Object) GetFaceByEdges (Handle(GEOM_Object) theShape,
68 Handle(GEOM_Object) theEdge1,
69 Handle(GEOM_Object) theEdge2);
71 Handle(GEOM_Object) GetOppositeFace (Handle(GEOM_Object) theBlock,
72 Handle(GEOM_Object) theFace);
74 Handle(GEOM_Object) GetFaceNearPoint (Handle(GEOM_Object) theBlock,
75 Handle(GEOM_Object) thePoint);
77 Handle(GEOM_Object) GetFaceByNormale (Handle(GEOM_Object) theBlock,
78 Handle(GEOM_Object) theVector);
80 // Check blocks compounds
81 Standard_Boolean IsCompoundOfBlocks (Handle(GEOM_Object) theCompound,
82 const Standard_Integer theMinNbFaces,
83 const Standard_Integer theMaxNbFaces,
84 Standard_Integer& theNbBlocks);
95 list<int> incriminated;
98 Standard_Boolean CheckCompoundOfBlocks (Handle(GEOM_Object) theCompound,
99 list<BCError>& theErrors);
101 TCollection_AsciiString PrintBCErrors (Handle(GEOM_Object) theCompound,
102 const list<BCError>& theErrors);
104 // Extract blocks from blocks compounds
105 Handle(TColStd_HSequenceOfTransient) ExplodeCompoundOfBlocks
106 (Handle(GEOM_Object) theCompound,
107 const Standard_Integer theMinNbFaces,
108 const Standard_Integer theMaxNbFaces);
110 Handle(GEOM_Object) GetBlockNearPoint (Handle(GEOM_Object) theCompound,
111 Handle(GEOM_Object) thePoint);
113 Handle(GEOM_Object) GetBlockByParts
114 (Handle(GEOM_Object) theCompound,
115 const Handle(TColStd_HSequenceOfTransient)& theParts);
117 Handle(TColStd_HSequenceOfTransient) GetBlocksByParts
118 (Handle(GEOM_Object) theCompound,
119 const Handle(TColStd_HSequenceOfTransient)& theParts);
121 // Operations on blocks with gluing of result
122 Handle(GEOM_Object) MakeMultiTransformation1D (Handle(GEOM_Object) theBlock,
123 const Standard_Integer theDirFace1,
124 const Standard_Integer theDirFace2,
125 const Standard_Integer theNbTimes);
127 Handle(GEOM_Object) MakeMultiTransformation2D (Handle(GEOM_Object) theBlock,
128 const Standard_Integer theDirFace1U,
129 const Standard_Integer theDirFace2U,
130 const Standard_Integer theNbTimesU,
131 const Standard_Integer theDirFace1V,
132 const Standard_Integer theDirFace2V,
133 const Standard_Integer theNbTimesV);