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