Salome HOME
944096750c0694629c45e31982a0c2f746f61a42
[modules/geom.git] / src / GEOM_I / GEOM_IShapesOperations_i.hh
1 // Copyright (C) 2007-2014  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, or (at your option) any later version.
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 MakeFaceFromSurface(GEOM::GEOM_Object_ptr theFace,
68                                             GEOM::GEOM_Object_ptr theWire);
69
70   GEOM::GEOM_Object_ptr MakeFaceWithConstraints (const GEOM::ListOfGO& theConstraints);
71   
72   GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells);
73
74   GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
75
76   GEOM::GEOM_Object_ptr MakeSolidShells (const GEOM::ListOfGO& theShells);
77
78   GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes);
79
80   GEOM::GEOM_Object_ptr MakeSolidFromConnectedFaces (const GEOM::ListOfGO& theFacesOrShells,
81                                                      CORBA::Boolean isIntersect);
82
83   GEOM::GEOM_Object_ptr MakeGlueFaces (const GEOM::ListOfGO& theShape,
84                                        CORBA::Double         theTolerance,
85                                        CORBA::Boolean        doKeepNonSolids);
86
87   GEOM::ListOfGO* GetGlueFaces (const GEOM::ListOfGO& theShape,
88                                 CORBA::Double         theTolerance);
89
90   GEOM::GEOM_Object_ptr MakeGlueFacesByList (const GEOM::ListOfGO& theShape,
91                                              CORBA::Double         theTolerance,
92                                              const GEOM::ListOfGO& theFaces,
93                                              CORBA::Boolean doKeepNonSolids,
94                                              CORBA::Boolean doGlueAllEdges);
95
96   GEOM::GEOM_Object_ptr MakeGlueEdges (const GEOM::ListOfGO& theShape,
97                                        CORBA::Double         theTolerance);
98
99   GEOM::ListOfGO* GetGlueEdges (const GEOM::ListOfGO& theShape,
100                                 CORBA::Double         theTolerance);
101
102   GEOM::GEOM_Object_ptr MakeGlueEdgesByList (const GEOM::ListOfGO& theShape,
103                                              CORBA::Double         theTolerance,
104                                              const GEOM::ListOfGO& theEdges);
105
106   GEOM::ListOfGO* GetExistingSubObjects (GEOM::GEOM_Object_ptr theShape,
107                                          CORBA::Boolean        theGroupsOnly);
108
109   // For old SubShapeAll()
110   // Deprecated, use MakeAllSubShapes() instead
111   GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape,
112                                CORBA::Long           theShapeType,
113                                CORBA::Boolean        isSorted);
114
115   GEOM::ListOfGO* MakeAllSubShapes (GEOM::GEOM_Object_ptr theShape,
116                                     CORBA::Long           theShapeType,
117                                     CORBA::Boolean        isSorted);
118
119   GEOM::ListOfGO* ExtractSubShapes (GEOM::GEOM_Object_ptr theShape,
120                                     CORBA::Long           theShapeType,
121                                     CORBA::Boolean        isSorted);
122
123   // Deprecated, use GetAllSubShapesIDs() instead
124   GEOM::ListOfLong* SubShapeAllIDs (GEOM::GEOM_Object_ptr theShape,
125                                     CORBA::Long           theShapeType,
126                                     CORBA::Boolean        isSorted);
127
128   GEOM::ListOfLong* GetAllSubShapesIDs (GEOM::GEOM_Object_ptr theShape,
129                                         CORBA::Long           theShapeType,
130                                         CORBA::Boolean        isSorted);
131
132   GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape,
133                                      CORBA::Long           theID);
134
135   GEOM::ListOfGO* MakeSubShapes (GEOM::GEOM_Object_ptr theMainShape,
136                                  const GEOM::ListOfLong& theIndices);
137
138   CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theMainShape,
139                                 GEOM::GEOM_Object_ptr theSubShape);
140   
141   GEOM::ListOfLong* GetSubShapesIndices (GEOM::GEOM_Object_ptr theMainShape,
142                                          const GEOM::ListOfGO& theSubShapes);
143
144   CORBA::Long GetTopologyIndex (GEOM::GEOM_Object_ptr theMainShape,
145                                 GEOM::GEOM_Object_ptr theSubShape);
146
147   char* GetShapeTypeString (GEOM::GEOM_Object_ptr theShape);
148
149   CORBA::Boolean IsSubShapeBelongsTo( GEOM::GEOM_Object_ptr theSubobject,
150                                       const CORBA::Long theSubObjectIndex,
151                                       GEOM::GEOM_Object_ptr theObject,
152                                       const CORBA::Long theObjectIndex );
153
154   CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
155   CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
156   CORBA::Long NumberOfSubShapes (GEOM::GEOM_Object_ptr theShape,
157                                  const CORBA::Long     theShapeType);
158
159   GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
160
161   GEOM::ListOfLong* GetFreeFacesIDs (GEOM::GEOM_Object_ptr theShape);
162
163   GEOM::ListOfGO* GetSharedShapes (GEOM::GEOM_Object_ptr theShape1,
164                                    GEOM::GEOM_Object_ptr theShape2,
165                                    CORBA::Long           theShapeType);
166
167   GEOM::ListOfGO* GetSharedShapesMulti (const GEOM::ListOfGO& theShapes,
168                                         CORBA::Long           theShapeType);
169
170   GEOM::ListOfGO* GetShapesOnPlane (GEOM::GEOM_Object_ptr theShape,
171                                     CORBA::Long           theShapeType,
172                                     GEOM::GEOM_Object_ptr theAx1,
173                                     GEOM::shape_state     theState);
174
175   GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
176                                                CORBA::Long           theShapeType,
177                                                GEOM::GEOM_Object_ptr theAx1,
178                                                GEOM::GEOM_Object_ptr thePnt,
179                                                GEOM::shape_state     theState);
180
181   GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
182                                        CORBA::Long           theShapeType,
183                                        GEOM::GEOM_Object_ptr theAxis,
184                                        CORBA::Double         theRadius,
185                                        GEOM::shape_state     theState);
186
187   GEOM::ListOfGO* GetShapesOnCylinderWithLocation (GEOM::GEOM_Object_ptr theShape,
188                                                    CORBA::Long           theShapeType,
189                                                    GEOM::GEOM_Object_ptr theAxis,
190                                                    GEOM::GEOM_Object_ptr thePnt,
191                                                    CORBA::Double         theRadius,
192                                                    GEOM::shape_state     theState);
193
194   GEOM::ListOfGO* GetShapesOnSphere (GEOM::GEOM_Object_ptr theShape,
195                                      CORBA::Long           theShapeType,
196                                      GEOM::GEOM_Object_ptr theCenter,
197                                      CORBA::Double         theRadius,
198                                      GEOM::shape_state     theState);
199
200   GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
201                                          CORBA::Long           theShapeType,
202                                          GEOM::GEOM_Object_ptr theTopLeftPoint,
203                                          GEOM::GEOM_Object_ptr theTopRigthPoint,
204                                          GEOM::GEOM_Object_ptr theBottomLeftPoint,
205                                          GEOM::GEOM_Object_ptr theBottomRigthPoint,
206                                          GEOM::shape_state     theState);
207
208   GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
209                                          CORBA::Long           theShapeType,
210                                          GEOM::GEOM_Object_ptr theAx1,
211                                          GEOM::shape_state     theState);
212
213   GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
214                                                      CORBA::Long           theShapeType,
215                                                      GEOM::GEOM_Object_ptr theAx1,
216                                                      GEOM::GEOM_Object_ptr thePnt,
217                                                      GEOM::shape_state     theState);
218
219   GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
220                                             CORBA::Long           theShapeType,
221                                             GEOM::GEOM_Object_ptr theAxis,
222                                             CORBA::Double         theRadius,
223                                             GEOM::shape_state     theState);
224
225   GEOM::ListOfLong* GetShapesOnCylinderWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
226                                                         CORBA::Long           theShapeType,
227                                                         GEOM::GEOM_Object_ptr theAxis,
228                                                         GEOM::GEOM_Object_ptr thePnt,
229                                                         CORBA::Double         theRadius,
230                                                         GEOM::shape_state     theState);
231
232   GEOM::ListOfLong* GetShapesOnSphereIDs (GEOM::GEOM_Object_ptr theShape,
233                                           CORBA::Long           theShapeType,
234                                           GEOM::GEOM_Object_ptr theCenter,
235                                           CORBA::Double         theRadius,
236                                           GEOM::shape_state     theState);
237
238   GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
239                                               CORBA::Long           theShapeType,
240                                               GEOM::GEOM_Object_ptr theTopLeftPoint,
241                                               GEOM::GEOM_Object_ptr theTopRigthPoint,
242                                               GEOM::GEOM_Object_ptr theBottomLeftPoint,
243                                               GEOM::GEOM_Object_ptr theBottomRigthPoint,
244                                               GEOM::shape_state     theState);
245
246   GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
247                                   GEOM::GEOM_Object_ptr theShape,
248                                   CORBA::Long           theShapeType,
249                                   GEOM::shape_state     theState);
250
251   GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox,
252                                        GEOM::GEOM_Object_ptr theShape,
253                                        CORBA::Long           theShapeType,
254                                        GEOM::shape_state     theState);
255
256   GEOM::ListOfGO* GetShapesOnShape (GEOM::GEOM_Object_ptr theSheckShape,
257                                     GEOM::GEOM_Object_ptr theShape,
258                                     CORBA::Short          theShapeType,
259                                     GEOM::shape_state     theState);
260
261   GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
262                                    (GEOM::GEOM_Object_ptr theSheckShape,
263                                     GEOM::GEOM_Object_ptr theShape,
264                                     CORBA::Short          theShapeType,
265                                     GEOM::shape_state     theState);
266
267   GEOM::ListOfLong* GetShapesOnShapeIDs (GEOM::GEOM_Object_ptr theCheckShape,
268                                          GEOM::GEOM_Object_ptr theShape,
269                                          CORBA::Short          theShapeType,
270                                          GEOM::shape_state     theState);
271
272   GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
273                                     GEOM::GEOM_Object_ptr theShapeWhat);
274
275   GEOM::GEOM_Object_ptr GetInPlaceOld (GEOM::GEOM_Object_ptr theShapeWhere,
276                                        GEOM::GEOM_Object_ptr theShapeWhat);
277
278   GEOM::GEOM_Object_ptr GetInPlaceByHistory (GEOM::GEOM_Object_ptr theShapeWhere,
279                                              GEOM::GEOM_Object_ptr theShapeWhat);
280
281   GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
282                                  GEOM::GEOM_Object_ptr theShapeWhat);
283
284   GEOM::ListOfLong* GetSameIDs  (GEOM::GEOM_Object_ptr theShapeWhere,
285                                  GEOM::GEOM_Object_ptr theShapeWhat);
286
287   GEOM::GEOM_Object_ptr ExtendEdge(GEOM::GEOM_Object_ptr theEdge,
288                                    CORBA::Double         theMin,
289                                    CORBA::Double         theMax);
290
291   GEOM::GEOM_Object_ptr ExtendFace(GEOM::GEOM_Object_ptr theFace,
292                                    CORBA::Double         theUMin,
293                                    CORBA::Double         theUMax,
294                                    CORBA::Double         theVMin,
295                                    CORBA::Double         theVMax);
296
297   GEOM::GEOM_Object_ptr MakeSurfaceFromFace(GEOM::GEOM_Object_ptr theFace);
298
299   ::GEOMImpl_IShapesOperations* GetOperations()
300   { return (::GEOMImpl_IShapesOperations*)GetImpl(); }
301 };
302
303 #endif