Salome HOME
IMP 0021129: EDF 1541 GEOM: Problem with GetInPlace. A new GetInPlace implementation...
[modules/geom.git] / src / GEOM_I / GEOM_IShapesOperations_i.hh
1 // Copyright (C) 2007-2011  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 "GEOMImpl_Gen.hxx"
27
28 #include <SALOMEconfig.h>
29
30 #include CORBA_SERVER_HEADER(GEOM_Gen)
31 #include "GEOM_IOperations_i.hh"
32 #include "GEOM_Object_i.hh"
33
34 #include "GEOMImpl_IShapesOperations.hxx"
35
36 class GEOM_I_EXPORT GEOM_IShapesOperations_i :
37     public virtual POA_GEOM::GEOM_IShapesOperations,
38     public virtual GEOM_IOperations_i
39 {
40  public:
41   GEOM_IShapesOperations_i (PortableServer::POA_ptr       thePOA,
42                             GEOM::GEOM_Gen_ptr            theEngine,
43                             ::GEOMImpl_IShapesOperations* theImpl);
44   ~GEOM_IShapesOperations_i();
45
46   GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
47                                   GEOM::GEOM_Object_ptr thePnt2);
48
49   GEOM::GEOM_Object_ptr MakeEdgeOnCurveByLength (GEOM::GEOM_Object_ptr theCurve,
50                                                  CORBA::Double         theLength,
51                                                  GEOM::GEOM_Object_ptr theStartPoint);
52
53   GEOM::GEOM_Object_ptr MakeEdgeWire (GEOM::GEOM_Object_ptr theWire,
54                                       const CORBA::Double theLinearTolerance,
55                                       const CORBA::Double theAngularTolerance);
56
57   GEOM::GEOM_Object_ptr MakeWire (const GEOM::ListOfGO& theEdgesAndWires,
58                                   const CORBA::Double   theTolerance);
59
60   GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
61                                   CORBA::Boolean  isPlanarWanted);
62
63   GEOM::GEOM_Object_ptr MakeFaceWires (const GEOM::ListOfGO& theWires,
64                                        CORBA::Boolean  isPlanarWanted);
65
66   GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells);
67
68   GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
69
70   GEOM::GEOM_Object_ptr MakeSolidShells (const GEOM::ListOfGO& theShells);
71
72   GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes);
73
74   GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
75                                        CORBA::Double         theTolerance,
76                                        CORBA::Boolean        doKeepNonSolids);
77
78   GEOM::ListOfGO* GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
79                                 CORBA::Double         theTolerance);
80
81   GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
82                                              CORBA::Double         theTolerance,
83                                              const GEOM::ListOfGO& theFaces,
84                                              CORBA::Boolean doKeepNonSolids,
85                                              CORBA::Boolean doGlueAllEdges);
86
87   GEOM::GEOM_Object_ptr MakeGlueEdges (GEOM::GEOM_Object_ptr theShape,
88                                        CORBA::Double         theTolerance);
89
90   GEOM::ListOfGO* GetGlueEdges (GEOM::GEOM_Object_ptr theShape,
91                                 CORBA::Double         theTolerance);
92
93   GEOM::GEOM_Object_ptr MakeGlueEdgesByList (GEOM::GEOM_Object_ptr theShape,
94                                              CORBA::Double         theTolerance,
95                                              const GEOM::ListOfGO& theEdges);
96
97   GEOM::ListOfGO* GetExistingSubObjects (GEOM::GEOM_Object_ptr theShape,
98                                          CORBA::Boolean        theGroupsOnly);
99
100   // For old SubShapeAll()
101   // Deprecated, use MakeAllSubShapes() instead
102   GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape,
103                                CORBA::Long           theShapeType,
104                                CORBA::Boolean        isSorted);
105
106   GEOM::ListOfGO* MakeAllSubShapes (GEOM::GEOM_Object_ptr theShape,
107                                     CORBA::Long           theShapeType,
108                                     CORBA::Boolean        isSorted);
109
110   GEOM::ListOfGO* ExtractSubShapes (GEOM::GEOM_Object_ptr theShape,
111                                     CORBA::Long           theShapeType,
112                                     CORBA::Boolean        isSorted);
113
114   // Deprecated, use GetAllSubShapesIDs() instead
115   GEOM::ListOfLong* SubShapeAllIDs (GEOM::GEOM_Object_ptr theShape,
116                                     CORBA::Long           theShapeType,
117                                     CORBA::Boolean        isSorted);
118
119   GEOM::ListOfLong* GetAllSubShapesIDs (GEOM::GEOM_Object_ptr theShape,
120                                         CORBA::Long           theShapeType,
121                                         CORBA::Boolean        isSorted);
122
123   GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape,
124                                      CORBA::Long           theID);
125
126   GEOM::ListOfGO* MakeSubShapes (GEOM::GEOM_Object_ptr theMainShape,
127                                  const GEOM::ListOfLong& theIndices);
128
129   CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theMainShape,
130                                 GEOM::GEOM_Object_ptr theSubShape);
131
132   CORBA::Long GetTopologyIndex (GEOM::GEOM_Object_ptr theMainShape,
133                                 GEOM::GEOM_Object_ptr theSubShape);
134
135   char* GetShapeTypeString (GEOM::GEOM_Object_ptr theShape);
136
137   CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
138   CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
139   CORBA::Long NumberOfSubShapes (GEOM::GEOM_Object_ptr theShape,
140                                  const CORBA::Long     theShapeType);
141
142   GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
143
144   GEOM::ListOfLong* GetFreeFacesIDs (GEOM::GEOM_Object_ptr theShape);
145
146   GEOM::ListOfGO* GetSharedShapes (GEOM::GEOM_Object_ptr theShape1,
147                                    GEOM::GEOM_Object_ptr theShape2,
148                                    CORBA::Long           theShapeType);
149
150   GEOM::ListOfGO* GetSharedShapesMulti (const GEOM::ListOfGO& theShapes,
151                                         CORBA::Long           theShapeType);
152
153   GEOM::ListOfGO* GetShapesOnPlane (GEOM::GEOM_Object_ptr theShape,
154                                     CORBA::Long           theShapeType,
155                                     GEOM::GEOM_Object_ptr theAx1,
156                                     GEOM::shape_state     theState);
157
158   GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
159                                                CORBA::Long           theShapeType,
160                                                GEOM::GEOM_Object_ptr theAx1,
161                                                GEOM::GEOM_Object_ptr thePnt,
162                                                GEOM::shape_state     theState);
163
164   GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
165                                        CORBA::Long           theShapeType,
166                                        GEOM::GEOM_Object_ptr theAxis,
167                                        CORBA::Double         theRadius,
168                                        GEOM::shape_state     theState);
169
170   GEOM::ListOfGO* GetShapesOnCylinderWithLocation (GEOM::GEOM_Object_ptr theShape,
171                                                    CORBA::Long           theShapeType,
172                                                    GEOM::GEOM_Object_ptr theAxis,
173                                                    GEOM::GEOM_Object_ptr thePnt,
174                                                    CORBA::Double         theRadius,
175                                                    GEOM::shape_state     theState);
176
177   GEOM::ListOfGO* GetShapesOnSphere (GEOM::GEOM_Object_ptr theShape,
178                                      CORBA::Long           theShapeType,
179                                      GEOM::GEOM_Object_ptr theCenter,
180                                      CORBA::Double         theRadius,
181                                      GEOM::shape_state     theState);
182
183   GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
184                                          CORBA::Long           theShapeType,
185                                          GEOM::GEOM_Object_ptr theTopLeftPoint,
186                                          GEOM::GEOM_Object_ptr theTopRigthPoint,
187                                          GEOM::GEOM_Object_ptr theBottomLeftPoint,
188                                          GEOM::GEOM_Object_ptr theBottomRigthPoint,
189                                          GEOM::shape_state     theState);
190
191   GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
192                                          CORBA::Long           theShapeType,
193                                          GEOM::GEOM_Object_ptr theAx1,
194                                          GEOM::shape_state     theState);
195
196   GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
197                                                      CORBA::Long           theShapeType,
198                                                      GEOM::GEOM_Object_ptr theAx1,
199                                                      GEOM::GEOM_Object_ptr thePnt,
200                                                      GEOM::shape_state     theState);
201
202   GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
203                                             CORBA::Long           theShapeType,
204                                             GEOM::GEOM_Object_ptr theAxis,
205                                             CORBA::Double         theRadius,
206                                             GEOM::shape_state     theState);
207
208   GEOM::ListOfLong* GetShapesOnCylinderWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
209                                                         CORBA::Long           theShapeType,
210                                                         GEOM::GEOM_Object_ptr theAxis,
211                                                         GEOM::GEOM_Object_ptr thePnt,
212                                                         CORBA::Double         theRadius,
213                                                         GEOM::shape_state     theState);
214
215   GEOM::ListOfLong* GetShapesOnSphereIDs (GEOM::GEOM_Object_ptr theShape,
216                                           CORBA::Long           theShapeType,
217                                           GEOM::GEOM_Object_ptr theCenter,
218                                           CORBA::Double         theRadius,
219                                           GEOM::shape_state     theState);
220
221   GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
222                                               CORBA::Long           theShapeType,
223                                               GEOM::GEOM_Object_ptr theTopLeftPoint,
224                                               GEOM::GEOM_Object_ptr theTopRigthPoint,
225                                               GEOM::GEOM_Object_ptr theBottomLeftPoint,
226                                               GEOM::GEOM_Object_ptr theBottomRigthPoint,
227                                               GEOM::shape_state     theState);
228
229   GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
230                                   GEOM::GEOM_Object_ptr theShape,
231                                   CORBA::Long           theShapeType,
232                                   GEOM::shape_state     theState);
233
234   GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox,
235                                        GEOM::GEOM_Object_ptr theShape,
236                                        CORBA::Long           theShapeType,
237                                        GEOM::shape_state     theState);
238
239   GEOM::ListOfGO* GetShapesOnShape (GEOM::GEOM_Object_ptr theSheckShape,
240                                     GEOM::GEOM_Object_ptr theShape,
241                                     CORBA::Short          theShapeType,
242                                     GEOM::shape_state     theState);
243
244   GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
245                                    (GEOM::GEOM_Object_ptr theSheckShape,
246                                     GEOM::GEOM_Object_ptr theShape,
247                                     CORBA::Short          theShapeType,
248                                     GEOM::shape_state     theState);
249
250   GEOM::ListOfLong* GetShapesOnShapeIDs (GEOM::GEOM_Object_ptr theCheckShape,
251                                          GEOM::GEOM_Object_ptr theShape,
252                                          CORBA::Short          theShapeType,
253                                          GEOM::shape_state     theState);
254
255   GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
256                                     GEOM::GEOM_Object_ptr theShapeWhat);
257
258   GEOM::GEOM_Object_ptr GetInPlaceOld (GEOM::GEOM_Object_ptr theShapeWhere,
259                                        GEOM::GEOM_Object_ptr theShapeWhat);
260
261   GEOM::GEOM_Object_ptr GetInPlaceByHistory (GEOM::GEOM_Object_ptr theShapeWhere,
262                                              GEOM::GEOM_Object_ptr theShapeWhat);
263
264   GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
265                                  GEOM::GEOM_Object_ptr theShapeWhat);
266
267   ::GEOMImpl_IShapesOperations* GetOperations()
268   { return (::GEOMImpl_IShapesOperations*)GetImpl(); }
269 };
270
271 #endif