Salome HOME
6f7542235b13df9cb62f9d73fcde83f079ed8bb2
[modules/geom.git] / src / GEOM_I / GEOM_IBlocksOperations_i.hh
1
2 #ifndef _GEOM_IBlocksOperations_i_HeaderFile
3 #define _GEOM_IBlocksOperations_i_HeaderFile
4
5
6 #include <SALOMEconfig.h>
7
8 #include CORBA_SERVER_HEADER(GEOM_Gen)
9 #include "GEOM_IOperations_i.hh"
10 #include "GEOM_Object_i.hh"
11
12 #include "GEOMImpl_IBlocksOperations.hxx"
13
14 class GEOM_IBlocksOperations_i :
15     public virtual POA_GEOM::GEOM_IBlocksOperations,
16     public virtual GEOM_IOperations_i
17 {
18  public:
19   GEOM_IBlocksOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine,
20                             ::GEOMImpl_IBlocksOperations* theImpl);
21   ~GEOM_IBlocksOperations_i();
22
23   // Creation of blocks and block faces
24   GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
25                                   GEOM::GEOM_Object_ptr theEdge2,
26                                   GEOM::GEOM_Object_ptr theEdge3,
27                                   GEOM::GEOM_Object_ptr theEdge4);
28
29   GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
30                                         GEOM::GEOM_Object_ptr theEdge2);
31
32   GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
33                                            GEOM::GEOM_Object_ptr thePnt2,
34                                            GEOM::GEOM_Object_ptr thePnt3,
35                                            GEOM::GEOM_Object_ptr thePnt4);
36
37   GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1,
38                                   GEOM::GEOM_Object_ptr theFace2,
39                                   GEOM::GEOM_Object_ptr theFace3,
40                                   GEOM::GEOM_Object_ptr theFace4,
41                                   GEOM::GEOM_Object_ptr theFace5,
42                                   GEOM::GEOM_Object_ptr theFace6);
43
44   GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
45                                         GEOM::GEOM_Object_ptr theFace2);
46
47   GEOM::GEOM_Object_ptr MakeBlockCompound (GEOM::GEOM_Object_ptr theCompound);
48
49   // Extract elements of blocks and blocks compounds
50   GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape,
51                                   CORBA::Double   theX,
52                                   CORBA::Double   theY,
53                                   CORBA::Double   theZ,
54                                   CORBA::Double   theEpsilon);
55
56   GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape,
57                                  GEOM::GEOM_Object_ptr thePoint1,
58                                  GEOM::GEOM_Object_ptr thePoint2);
59
60   GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
61                                           GEOM::GEOM_Object_ptr thePoint);
62
63   GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
64                                          GEOM::GEOM_Object_ptr thePoint1,
65                                          GEOM::GEOM_Object_ptr thePoint2,
66                                          GEOM::GEOM_Object_ptr thePoint3,
67                                          GEOM::GEOM_Object_ptr thePoint4);
68
69   GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
70                                         GEOM::GEOM_Object_ptr theEdge1,
71                                         GEOM::GEOM_Object_ptr theEdge2);
72
73   GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
74                                          GEOM::GEOM_Object_ptr theFace);
75
76   GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
77                                           GEOM::GEOM_Object_ptr thePoint);
78
79   GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
80                                           GEOM::GEOM_Object_ptr theVector);
81
82   // Check blocks compound
83   CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
84                                      CORBA::Long     theMinNbFaces,
85                                      CORBA::Long     theMaxNbFaces,
86                                      CORBA::Long&          theNbBlocks);
87
88   CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
89                                         GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors);
90
91   char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
92                        const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors);
93
94   GEOM::GEOM_Object_ptr RemoveExtraEdges (GEOM::GEOM_Object_ptr theShape);
95
96   GEOM::GEOM_Object_ptr CheckAndImprove (GEOM::GEOM_Object_ptr theCompound);
97
98   // Extract blocks from blocks compounds
99   GEOM::ListOfGO* ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
100                                            CORBA::Long     theMinNbFaces,
101                                            CORBA::Long     theMaxNbFaces);
102
103   GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
104                                            GEOM::GEOM_Object_ptr thePoint);
105
106   GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
107                                          const GEOM::ListOfGO& theParts);
108
109   GEOM::ListOfGO* GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
110                                     const GEOM::ListOfGO& theParts);
111
112   // Operations on blocks with gluing of result
113   GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
114                                                    CORBA::Long     theDirFace1,
115                                                    CORBA::Long     theDirFace2,
116                                                    CORBA::Long     theNbTimes);
117
118   GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock,
119                                                    CORBA::Long     theDirFace1U,
120                                                    CORBA::Long     theDirFace2U,
121                                                    CORBA::Long     theNbTimesU,
122                                                    CORBA::Long     theDirFace1V,
123                                                    CORBA::Long     theDirFace2V,
124                                                    CORBA::Long     theNbTimesV);
125
126   // Build groups for Propagation of 1D hypotheses
127   GEOM::ListOfGO* Propagate (GEOM::GEOM_Object_ptr theShape);
128
129   ::GEOMImpl_IBlocksOperations* GetOperations()
130   { return (::GEOMImpl_IBlocksOperations*)GetImpl(); }
131 };
132
133 #endif