Salome HOME
WIN32 compilation.
[modules/geom.git] / src / GEOM_I / GEOM_IShapesOperations_i.hh
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #ifndef _GEOM_IShapesOperations_i_HeaderFile
24 #define _GEOM_IShapesOperations_i_HeaderFile
25
26 #include "GEOM_GEOM_I.hxx"
27 #include "GEOMImpl_Gen.hxx"
28
29 #include <SALOMEconfig.h>
30
31 #include CORBA_SERVER_HEADER(GEOM_Gen)
32 #include "GEOM_IOperations_i.hh"
33 #include "GEOM_Object_i.hh"
34
35 #include "GEOMImpl_IShapesOperations.hxx"
36
37 class GEOM_I_EXPORT GEOM_IShapesOperations_i :
38     public virtual POA_GEOM::GEOM_IShapesOperations,
39     public virtual GEOM_IOperations_i
40 {
41  public:
42   GEOM_IShapesOperations_i (PortableServer::POA_ptr       thePOA,
43                             GEOM::GEOM_Gen_ptr            theEngine,
44                             ::GEOMImpl_IShapesOperations* theImpl);
45   ~GEOM_IShapesOperations_i();
46
47   GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
48                                   GEOM::GEOM_Object_ptr thePnt2);
49
50   GEOM::GEOM_Object_ptr MakeEdgeOnCurveByLength (GEOM::GEOM_Object_ptr theCurve,
51                                                  CORBA::Double         theLength,
52                                                  GEOM::GEOM_Object_ptr theStartPoint);
53
54   GEOM::GEOM_Object_ptr MakeEdgeWire (GEOM::GEOM_Object_ptr theWire,
55                                       const CORBA::Double theLinearTolerance,
56                                       const CORBA::Double theAngularTolerance);
57
58   GEOM::GEOM_Object_ptr MakeWire (const GEOM::ListOfGO& theEdgesAndWires,
59                                   const CORBA::Double   theTolerance);
60
61   GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
62                                   CORBA::Boolean  isPlanarWanted);
63
64   GEOM::GEOM_Object_ptr MakeFaceWires (const GEOM::ListOfGO& theWires,
65                                        CORBA::Boolean  isPlanarWanted);
66
67   GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells);
68
69   GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
70
71   GEOM::GEOM_Object_ptr MakeSolidShells (const GEOM::ListOfGO& theShells);
72
73   GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes);
74
75   GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
76                                        CORBA::Double         theTolerance,
77                                        CORBA::Boolean        doKeepNonSolids);
78
79   GEOM::ListOfGO* GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
80                                 CORBA::Double         theTolerance);
81
82   GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
83                                              CORBA::Double         theTolerance,
84                                              const GEOM::ListOfGO& theFaces,
85                                              CORBA::Boolean doKeepNonSolids,
86                                              CORBA::Boolean doGlueAllEdges);
87
88   GEOM::GEOM_Object_ptr MakeGlueEdges (GEOM::GEOM_Object_ptr theShape,
89                                        CORBA::Double         theTolerance);
90
91   GEOM::ListOfGO* GetGlueEdges (GEOM::GEOM_Object_ptr theShape,
92                                 CORBA::Double         theTolerance);
93
94   GEOM::GEOM_Object_ptr MakeGlueEdgesByList (GEOM::GEOM_Object_ptr theShape,
95                                              CORBA::Double         theTolerance,
96                                              const GEOM::ListOfGO& theEdges);
97
98   GEOM::ListOfGO* GetExistingSubObjects (GEOM::GEOM_Object_ptr theShape,
99                                          CORBA::Boolean        theGroupsOnly);
100
101   // For old SubShapeAll()
102   // Deprecated, use MakeAllSubShapes() instead
103   GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape,
104                                CORBA::Long           theShapeType,
105                                CORBA::Boolean        isSorted);
106
107   GEOM::ListOfGO* MakeAllSubShapes (GEOM::GEOM_Object_ptr theShape,
108                                     CORBA::Long           theShapeType,
109                                     CORBA::Boolean        isSorted);
110
111   GEOM::ListOfGO* ExtractSubShapes (GEOM::GEOM_Object_ptr theShape,
112                                     CORBA::Long           theShapeType,
113                                     CORBA::Boolean        isSorted);
114
115   // Deprecated, use GetAllSubShapesIDs() instead
116   GEOM::ListOfLong* SubShapeAllIDs (GEOM::GEOM_Object_ptr theShape,
117                                     CORBA::Long           theShapeType,
118                                     CORBA::Boolean        isSorted);
119
120   GEOM::ListOfLong* GetAllSubShapesIDs (GEOM::GEOM_Object_ptr theShape,
121                                         CORBA::Long           theShapeType,
122                                         CORBA::Boolean        isSorted);
123
124   GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape,
125                                      CORBA::Long           theID);
126
127   GEOM::ListOfGO* MakeSubShapes (GEOM::GEOM_Object_ptr theMainShape,
128                                  const GEOM::ListOfLong& theIndices);
129
130   CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theMainShape,
131                                 GEOM::GEOM_Object_ptr theSubShape);
132   
133   GEOM::ListOfLong* GetSubShapesIndices (GEOM::GEOM_Object_ptr theMainShape,
134                                          const GEOM::ListOfGO& theSubShapes);
135
136   CORBA::Long GetTopologyIndex (GEOM::GEOM_Object_ptr theMainShape,
137                                 GEOM::GEOM_Object_ptr theSubShape);
138
139   char* GetShapeTypeString (GEOM::GEOM_Object_ptr theShape);
140
141   CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
142   CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
143   CORBA::Long NumberOfSubShapes (GEOM::GEOM_Object_ptr theShape,
144                                  const CORBA::Long     theShapeType);
145
146   GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
147
148   GEOM::ListOfLong* GetFreeFacesIDs (GEOM::GEOM_Object_ptr theShape);
149
150   GEOM::ListOfGO* GetSharedShapes (GEOM::GEOM_Object_ptr theShape1,
151                                    GEOM::GEOM_Object_ptr theShape2,
152                                    CORBA::Long           theShapeType);
153
154   GEOM::ListOfGO* GetSharedShapesMulti (const GEOM::ListOfGO& theShapes,
155                                         CORBA::Long           theShapeType);
156
157   GEOM::ListOfGO* GetShapesOnPlane (GEOM::GEOM_Object_ptr theShape,
158                                     CORBA::Long           theShapeType,
159                                     GEOM::GEOM_Object_ptr theAx1,
160                                     GEOM::shape_state     theState);
161
162   GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
163                                                CORBA::Long           theShapeType,
164                                                GEOM::GEOM_Object_ptr theAx1,
165                                                GEOM::GEOM_Object_ptr thePnt,
166                                                GEOM::shape_state     theState);
167
168   GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
169                                        CORBA::Long           theShapeType,
170                                        GEOM::GEOM_Object_ptr theAxis,
171                                        CORBA::Double         theRadius,
172                                        GEOM::shape_state     theState);
173
174   GEOM::ListOfGO* GetShapesOnCylinderWithLocation (GEOM::GEOM_Object_ptr theShape,
175                                                    CORBA::Long           theShapeType,
176                                                    GEOM::GEOM_Object_ptr theAxis,
177                                                    GEOM::GEOM_Object_ptr thePnt,
178                                                    CORBA::Double         theRadius,
179                                                    GEOM::shape_state     theState);
180
181   GEOM::ListOfGO* GetShapesOnSphere (GEOM::GEOM_Object_ptr theShape,
182                                      CORBA::Long           theShapeType,
183                                      GEOM::GEOM_Object_ptr theCenter,
184                                      CORBA::Double         theRadius,
185                                      GEOM::shape_state     theState);
186
187   GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
188                                          CORBA::Long           theShapeType,
189                                          GEOM::GEOM_Object_ptr theTopLeftPoint,
190                                          GEOM::GEOM_Object_ptr theTopRigthPoint,
191                                          GEOM::GEOM_Object_ptr theBottomLeftPoint,
192                                          GEOM::GEOM_Object_ptr theBottomRigthPoint,
193                                          GEOM::shape_state     theState);
194
195   GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
196                                          CORBA::Long           theShapeType,
197                                          GEOM::GEOM_Object_ptr theAx1,
198                                          GEOM::shape_state     theState);
199
200   GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
201                                                      CORBA::Long           theShapeType,
202                                                      GEOM::GEOM_Object_ptr theAx1,
203                                                      GEOM::GEOM_Object_ptr thePnt,
204                                                      GEOM::shape_state     theState);
205
206   GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
207                                             CORBA::Long           theShapeType,
208                                             GEOM::GEOM_Object_ptr theAxis,
209                                             CORBA::Double         theRadius,
210                                             GEOM::shape_state     theState);
211
212   GEOM::ListOfLong* GetShapesOnCylinderWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
213                                                         CORBA::Long           theShapeType,
214                                                         GEOM::GEOM_Object_ptr theAxis,
215                                                         GEOM::GEOM_Object_ptr thePnt,
216                                                         CORBA::Double         theRadius,
217                                                         GEOM::shape_state     theState);
218
219   GEOM::ListOfLong* GetShapesOnSphereIDs (GEOM::GEOM_Object_ptr theShape,
220                                           CORBA::Long           theShapeType,
221                                           GEOM::GEOM_Object_ptr theCenter,
222                                           CORBA::Double         theRadius,
223                                           GEOM::shape_state     theState);
224
225   GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
226                                               CORBA::Long           theShapeType,
227                                               GEOM::GEOM_Object_ptr theTopLeftPoint,
228                                               GEOM::GEOM_Object_ptr theTopRigthPoint,
229                                               GEOM::GEOM_Object_ptr theBottomLeftPoint,
230                                               GEOM::GEOM_Object_ptr theBottomRigthPoint,
231                                               GEOM::shape_state     theState);
232
233   GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
234                                   GEOM::GEOM_Object_ptr theShape,
235                                   CORBA::Long           theShapeType,
236                                   GEOM::shape_state     theState);
237
238   GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox,
239                                        GEOM::GEOM_Object_ptr theShape,
240                                        CORBA::Long           theShapeType,
241                                        GEOM::shape_state     theState);
242
243   GEOM::ListOfGO* GetShapesOnShape (GEOM::GEOM_Object_ptr theSheckShape,
244                                     GEOM::GEOM_Object_ptr theShape,
245                                     CORBA::Short          theShapeType,
246                                     GEOM::shape_state     theState);
247
248   GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
249                                    (GEOM::GEOM_Object_ptr theSheckShape,
250                                     GEOM::GEOM_Object_ptr theShape,
251                                     CORBA::Short          theShapeType,
252                                     GEOM::shape_state     theState);
253
254   GEOM::ListOfLong* GetShapesOnShapeIDs (GEOM::GEOM_Object_ptr theCheckShape,
255                                          GEOM::GEOM_Object_ptr theShape,
256                                          CORBA::Short          theShapeType,
257                                          GEOM::shape_state     theState);
258
259   GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
260                                     GEOM::GEOM_Object_ptr theShapeWhat);
261
262   GEOM::GEOM_Object_ptr GetInPlaceOld (GEOM::GEOM_Object_ptr theShapeWhere,
263                                        GEOM::GEOM_Object_ptr theShapeWhat);
264
265   GEOM::GEOM_Object_ptr GetInPlaceByHistory (GEOM::GEOM_Object_ptr theShapeWhere,
266                                              GEOM::GEOM_Object_ptr theShapeWhat);
267
268   GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
269                                  GEOM::GEOM_Object_ptr theShapeWhat);
270
271   GEOM::ListOfLong* GetSameIDs  (GEOM::GEOM_Object_ptr theShapeWhere,
272                                  GEOM::GEOM_Object_ptr theShapeWhat);
273
274   ::GEOMImpl_IShapesOperations* GetOperations()
275   { return (::GEOMImpl_IShapesOperations*)GetImpl(); }
276 };
277
278 #endif