Salome HOME
afe3e54853111f0b365fda547108588ecd2fd3a2
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IBlocksOperations.hxx
1
2 #ifndef _GEOMImpl_IBlocksOperations_HXX_
3 #define _GEOMImpl_IBlocksOperations_HXX_
4
5 #include "GEOM_IOperations.hxx"
6
7 #include <TopTools_ListOfShape.hxx>
8 #include <TColStd_HSequenceOfTransient.hxx>
9
10 #include <list>
11
12 class GEOM_Engine;
13 class Handle(GEOM_Object);
14 class Handle(TColStd_HArray1OfInteger);
15
16 class GEOMImpl_IBlocksOperations : public GEOM_IOperations {
17  public:
18   GEOMImpl_IBlocksOperations(GEOM_Engine* theEngine, int theDocID);
19   ~GEOMImpl_IBlocksOperations();
20
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);
26
27   Handle(GEOM_Object) MakeQuadFaceFourEdges (Handle(GEOM_Object) theEdge1,
28                                              Handle(GEOM_Object) theEdge2,
29                                              Handle(GEOM_Object) theEdge3,
30                                              Handle(GEOM_Object) theEdge4);
31
32   Handle(GEOM_Object) MakeQuadFaceTwoEdges (Handle(GEOM_Object) theEdge1,
33                                             Handle(GEOM_Object) theEdge2);
34
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);
41
42   Handle(GEOM_Object) MakeHexaSolidTwoFaces (Handle(GEOM_Object) theFace1,
43                                              Handle(GEOM_Object) theFace2);
44
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);
49
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);
55
56   Handle(GEOM_Object) GetFaceByEdges (Handle(GEOM_Object) theShape,
57                                       Handle(GEOM_Object) theEdge1,
58                                       Handle(GEOM_Object) theEdge2);
59
60   Handle(GEOM_Object) GetOppositeFace (Handle(GEOM_Object) theBlock,
61                                        Handle(GEOM_Object) theFace);
62
63   Handle(GEOM_Object) GetFaceNearPoint (Handle(GEOM_Object) theBlock,
64                                         Handle(GEOM_Object) thePoint);
65
66   Handle(GEOM_Object) GetFaceByNormale (Handle(GEOM_Object) theBlock,
67                                         Handle(GEOM_Object) theVector);
68
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);
74
75   Handle(TColStd_HSequenceOfTransient) ExplodeCompoundOfBlocks
76                                       (Handle(GEOM_Object)    theCompound,
77                                        const Standard_Integer theMinNbFaces,
78                                        const Standard_Integer theMaxNbFaces);
79
80   Handle(GEOM_Object) GetBlockNearPoint (Handle(GEOM_Object) theCompound,
81                                          Handle(GEOM_Object) thePoint);
82
83   Handle(GEOM_Object) GetBlockByParts
84                      (Handle(GEOM_Object)                         theCompound,
85                       const Handle(TColStd_HSequenceOfTransient)& theParts);
86
87   Handle(TColStd_HSequenceOfTransient) GetBlocksByParts
88                      (Handle(GEOM_Object)                         theCompound,
89                       const Handle(TColStd_HSequenceOfTransient)& theParts);
90
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);
96
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);
104
105   Handle(GEOM_Object) MakeMultiTranslation1D (Handle(GEOM_Object)    theBlock,
106                                               const Standard_Integer theDirFace,
107                                               const Standard_Integer theNbTimes);
108
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);
114 };
115
116 #endif