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