Salome HOME
Issue 0020176: bad reference to myStudy variable
[modules/geom.git] / src / GEOM_I_Superv / GEOM_Superv_i.hh
1 //  Copyright (C) 2007-2008  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 #ifndef __GEOM_SUPERV_I_H__
23 #define __GEOM_SUPERV_I_H__
24
25 // IDL headers
26 #include <SALOMEconfig.h>
27 #include CORBA_SERVER_HEADER(GEOM_Superv)
28
29 #include "GEOM_Gen_i.hh"
30 #include "GEOM_List_i.hh"
31
32 class GEOM_Superv_i : public virtual POA_GEOM::GEOM_Superv,
33                       public Engines_Component_i
34 {
35 public:
36   GEOM_Superv_i(CORBA::ORB_ptr orb,
37                 PortableServer::POA_ptr poa,
38                 PortableServer::ObjectId * contId, 
39                 const char *instanceName, 
40                 const char *interfaceName);
41   ~GEOM_Superv_i();
42
43   // generic method to be put in a super class
44   void register_name(char * name);
45   void setGeomEngine();
46
47   void getBasicOp();
48   void get3DPrimOp();
49   void getBoolOp();
50   void getInsOp();
51   void getTransfOp();
52   void getShapesOp();
53   void getBlocksOp();
54   void getCurvesOp();
55   void getLocalOp();
56   void getGroupOp();  
57
58   PortableServer::ServantBase_var GetServant(CORBA::Object_ptr       theObject,
59                                              PortableServer::POA_ptr thePOA);
60
61   //-----------------------------------------------------------------------//
62   // Set current stydy ID                                                  //
63   //-----------------------------------------------------------------------//
64   void SetStudyID( CORBA::Long theId );      
65
66   //-----------------------------------------------------------//
67   // Create ListOfGO and add items to it                       // 
68   //-----------------------------------------------------------//
69   GEOM::GEOM_List_ptr CreateListOfGO();
70   void AddItemToListOfGO(GEOM::GEOM_List_ptr& theList, 
71                          GEOM::GEOM_Object_ptr theObject);
72
73   //-----------------------------------------------------------//
74   // Create ListOfLong and add items to it                     // 
75   //-----------------------------------------------------------//
76   GEOM::GEOM_List_ptr CreateListOfLong();
77   void AddItemToListOfLong(GEOM::GEOM_List_ptr& theList, 
78                            CORBA::Long theObject);
79   
80   //-----------------------------------------------------------//
81   // Create ListOfDouble and add items to it                   // 
82   //-----------------------------------------------------------//
83   GEOM::GEOM_List_ptr CreateListOfDouble();
84   void AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList, 
85                              CORBA::Double theObject);
86
87   //-----------------------------------------------------------------------//
88   // Inherited methods from SALOMEDS::Driver                               //
89   //-----------------------------------------------------------------------//    
90
91   SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
92                           const char* theURL,
93                           CORBA::Boolean isMultiFile);
94
95   SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
96                                const char* theURL,
97                                CORBA::Boolean isMultiFile);
98   
99   CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
100                       const SALOMEDS::TMPFile& theStream,
101                       const char* theURL,
102                       CORBA::Boolean isMultiFile);
103
104   CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent,
105                            const SALOMEDS::TMPFile& theStream,
106                            const char* theURL,
107                            CORBA::Boolean isMultiFile);
108
109   void Close(SALOMEDS::SComponent_ptr theComponent);
110   char* ComponentDataType();
111
112
113   char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
114                                const char* IORString,
115                                CORBA::Boolean isMultiFile,
116                                CORBA::Boolean isASCII);
117   char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
118                                const char* aLocalPersistentID,
119                                CORBA::Boolean isMultiFile,
120                                CORBA::Boolean isASCII);
121
122   CORBA::Boolean CanPublishInStudy(CORBA::Object_ptr theIOR);
123   SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
124                                        SALOMEDS::SObject_ptr theSObject,
125                                        CORBA::Object_ptr theObject,
126                                        const char* theName) throw (SALOME::SALOME_Exception) ;
127
128   CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
129   SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
130   CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
131   SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
132                                   CORBA::Long theObjectID,
133                                   SALOMEDS::SObject_ptr theObject);
134
135   //-----------------------------------------------------------//
136   // Primitives Construction : BasicOperations                 // 
137   //-----------------------------------------------------------//
138   GEOM::GEOM_Object_ptr MakePointXYZ (CORBA::Double theX,
139                                       CORBA::Double theY,
140                                       CORBA::Double theZ);
141   GEOM::GEOM_Object_ptr MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
142                                                 CORBA::Double theX, 
143                                                 CORBA::Double theY, 
144                                                 CORBA::Double theZ);
145   GEOM::GEOM_Object_ptr MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
146                                           CORBA::Double theParameter);
147   GEOM::GEOM_Object_ptr MakePointOnLinesIntersection (GEOM::GEOM_Object_ptr theRefLine1,
148                                                       GEOM::GEOM_Object_ptr theRefLine2);
149   GEOM::GEOM_Object_ptr MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
150                                              CORBA::Double theParameter);
151   GEOM::GEOM_Object_ptr MakeVectorDXDYDZ (CORBA::Double theDX,
152                                           CORBA::Double theDY,
153                                           CORBA::Double theDZ);
154   GEOM::GEOM_Object_ptr MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
155                                           GEOM::GEOM_Object_ptr thePnt2);
156   GEOM::GEOM_Object_ptr MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
157                                         GEOM::GEOM_Object_ptr thePnt2);
158   GEOM::GEOM_Object_ptr MakeLineTwoFaces (GEOM::GEOM_Object_ptr theFace1,
159                                           GEOM::GEOM_Object_ptr theFace2);
160   GEOM::GEOM_Object_ptr MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
161                                            GEOM::GEOM_Object_ptr thePnt2,
162                                            GEOM::GEOM_Object_ptr thePnt3,
163                                            CORBA::Double theTrimSize);
164   GEOM::GEOM_Object_ptr MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
165                                          GEOM::GEOM_Object_ptr theVec,
166                                          CORBA::Double theTrimSize);
167   GEOM::GEOM_Object_ptr MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
168                                        CORBA::Double theTrimSize);
169   GEOM::GEOM_Object_ptr MakeMarker (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
170                                     CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
171                                     CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ);
172
173   GEOM::GEOM_Object_ptr MakeTangentPlaneOnFace (GEOM::GEOM_Object_ptr theFace, 
174                                                  CORBA::Double theParameterU,
175                                                  CORBA::Double theParameterV,
176                                                  CORBA::Double theTrimSize);
177
178   //-----------------------------------------------------------//
179   // Primitives Construction : 3DPrimOperations                //
180   //-----------------------------------------------------------//
181   GEOM::GEOM_Object_ptr MakeBox (CORBA::Double theX1,
182                                  CORBA::Double theY1,
183                                  CORBA::Double theZ1,
184                                  CORBA::Double theX2,
185                                  CORBA::Double theY2,
186                                  CORBA::Double theZ2);
187   GEOM::GEOM_Object_ptr MakeBoxDXDYDZ (CORBA::Double theDX, 
188                                        CORBA::Double theDY, 
189                                        CORBA::Double theDZ);
190   GEOM::GEOM_Object_ptr MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1, 
191                                        GEOM::GEOM_Object_ptr thePnt2);
192   GEOM::GEOM_Object_ptr MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
193                                               GEOM::GEOM_Object_ptr theAxis,
194                                               CORBA::Double theRadius,
195                                               CORBA::Double theHeight);
196   GEOM::GEOM_Object_ptr MakeCylinderRH (CORBA::Double theR, 
197                                         CORBA::Double theH);
198   GEOM::GEOM_Object_ptr MakeSphere (CORBA::Double theX,
199                                     CORBA::Double theY,
200                                     CORBA::Double theZ,
201                                     CORBA::Double theRadius);
202   GEOM::GEOM_Object_ptr MakeSphereR (CORBA::Double theR);
203   GEOM::GEOM_Object_ptr MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt, 
204                                         CORBA::Double theR);
205   GEOM::GEOM_Object_ptr MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
206                                            GEOM::GEOM_Object_ptr theVec,
207                                            CORBA::Double theRMajor,
208                                            CORBA::Double theRMinor);
209   GEOM::GEOM_Object_ptr MakeTorusRR (CORBA::Double theRMajor,
210                                      CORBA::Double theRMinor);
211   GEOM::GEOM_Object_ptr MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
212                                              GEOM::GEOM_Object_ptr theAxis,
213                                              CORBA::Double theR1,
214                                              CORBA::Double theR2,
215                                              CORBA::Double theHeight);
216   GEOM::GEOM_Object_ptr MakeConeR1R2H (CORBA::Double theR1, 
217                                        CORBA::Double theR2, 
218                                        CORBA::Double theHeight);
219   GEOM::GEOM_Object_ptr MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
220                                        GEOM::GEOM_Object_ptr theVec,
221                                        CORBA::Double         theH);
222   GEOM::GEOM_Object_ptr MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
223                                             GEOM::GEOM_Object_ptr theVec,
224                                             CORBA::Double         theH);
225   GEOM::GEOM_Object_ptr MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
226                                          GEOM::GEOM_Object_ptr thePoint1,
227                                          GEOM::GEOM_Object_ptr thePoint2);
228   GEOM::GEOM_Object_ptr MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
229                                               GEOM::GEOM_Object_ptr thePoint1,
230                                               GEOM::GEOM_Object_ptr thePoint2);
231   GEOM::GEOM_Object_ptr MakePipe (GEOM::GEOM_Object_ptr theBase, 
232                                   GEOM::GEOM_Object_ptr thePath);
233   GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
234                                                  GEOM::GEOM_Object_ptr theAxis,
235                                                  CORBA::Double theAngle);
236   GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
237                                                       GEOM::GEOM_Object_ptr theAxis,
238                                                       CORBA::Double theAngle);
239   GEOM::GEOM_Object_ptr MakeFilling (GEOM::GEOM_Object_ptr theShape,
240                                      CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
241                                      CORBA::Double theTol2D, CORBA::Double theTol3D,
242                                      CORBA::Long theNbIter, CORBA::Boolean theApprox);
243
244   GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
245                                          CORBA::Boolean theModeSolid,
246                                          CORBA::Double thePreci,
247                                          CORBA::Boolean theRuled);
248   
249   GEOM::GEOM_Object_ptr MakePipeWithDifferentSections(const GEOM::ListOfGO& theBases,
250                                                       const GEOM::ListOfGO& theLocations,
251                                                       GEOM::GEOM_Object_ptr thePath,
252                                                       CORBA::Boolean theWithContact,
253                                                       CORBA::Boolean theWithCorrections);
254   
255   GEOM::GEOM_Object_ptr MakePipeWithShellSections(const GEOM::ListOfGO& theBases,
256                                                   const GEOM::ListOfGO& theSubBases,
257                                                   const GEOM::ListOfGO& theLocations,
258                                                   GEOM::GEOM_Object_ptr thePath,
259                                                   CORBA::Boolean theWithContact,
260                                                   CORBA::Boolean theWithCorrections);
261
262   GEOM::GEOM_Object_ptr MakePipeShellsWithoutPath(const GEOM::ListOfGO& theBases,
263                                                   const GEOM::ListOfGO& theLocations);
264   
265   GEOM::GEOM_Object_ptr MakePipeBiNormalAlongVector (GEOM::GEOM_Object_ptr theBase,
266                                                      GEOM::GEOM_Object_ptr thePath,
267                                                      GEOM::GEOM_Object_ptr theVec);
268
269   //-----------------------------------------------------------//
270   // BooleanOperations                                         //
271   //-----------------------------------------------------------//
272   GEOM::GEOM_Object_ptr MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
273                                      GEOM::GEOM_Object_ptr theShape2,
274                                      CORBA::Long theOperation);
275   GEOM::GEOM_Object_ptr MakeFuse (GEOM::GEOM_Object_ptr theShape1,
276                                   GEOM::GEOM_Object_ptr theShape2);
277   GEOM::GEOM_Object_ptr MakePartition (GEOM::GEOM_List_ptr   theShapes,
278                                        GEOM::GEOM_List_ptr   theTools,
279                                        GEOM::GEOM_List_ptr   theKeepInside,
280                                        GEOM::GEOM_List_ptr   theRemoveInside,
281                                        CORBA::Short      theLimit,
282                                        CORBA::Boolean    theRemoveWebs,
283                                        GEOM::GEOM_List_ptr theMaterials,
284                                        CORBA::Short theKeepNonlimitShapes);
285   GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
286                                            GEOM::GEOM_Object_ptr thePlane);
287
288   //-----------------------------------------------------------//
289   // InsertOperations                                          //
290   //-----------------------------------------------------------//
291   GEOM::GEOM_Object_ptr MakeCopy (GEOM::GEOM_Object_ptr theOriginal);
292   void Export (GEOM::GEOM_Object_ptr theObject, 
293                const char*           theFileName, 
294                const char*           theFormatName);
295   GEOM::GEOM_Object_ptr Import (const char* theFileName, 
296                                 const char* theFormatName);
297   void ImportTranslators (GEOM::string_array_out theFormats,
298                           GEOM::string_array_out thePatterns);
299   void ExportTranslators (GEOM::string_array_out theFormats,
300                           GEOM::string_array_out thePatterns);
301
302   //-----------------------------------------------------------//
303   // TransformOperations                                       //
304   //-----------------------------------------------------------//
305   GEOM::GEOM_Object_ptr TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
306                                             GEOM::GEOM_Object_ptr thePoint1,
307                                             GEOM::GEOM_Object_ptr thePoint2);
308   GEOM::GEOM_Object_ptr TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
309                                                 GEOM::GEOM_Object_ptr thePoint1,
310                                                 GEOM::GEOM_Object_ptr thePoint2);
311   GEOM::GEOM_Object_ptr TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
312                                          CORBA::Double theDX, 
313                                          CORBA::Double theDY, 
314                                          CORBA::Double theDZ);
315   GEOM::GEOM_Object_ptr TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
316                                              CORBA::Double theDX, 
317                                              CORBA::Double theDY, 
318                                              CORBA::Double theDZ);
319   GEOM::GEOM_Object_ptr TranslateVector (GEOM::GEOM_Object_ptr theObject,
320                                          GEOM::GEOM_Object_ptr theVector);
321   GEOM::GEOM_Object_ptr TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
322                                              GEOM::GEOM_Object_ptr theVector);
323   GEOM::GEOM_Object_ptr TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
324                                                  GEOM::GEOM_Object_ptr theVector,
325                                                  CORBA::Double theDistance,
326                                                  CORBA::Boolean theCopy);
327   GEOM::GEOM_Object_ptr MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
328                                           GEOM::GEOM_Object_ptr theVector,
329                                           CORBA::Double theStep,
330                                           CORBA::Long theNbTimes);
331   GEOM::GEOM_Object_ptr MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
332                                           GEOM::GEOM_Object_ptr theVector1,
333                                           CORBA::Double theStep1,
334                                           CORBA::Long theNbTimes1,
335                                           GEOM::GEOM_Object_ptr theVector2,
336                                           CORBA::Double theStep2,
337                                           CORBA::Long theNbTimes2);
338   GEOM::GEOM_Object_ptr Rotate (GEOM::GEOM_Object_ptr theObject,
339                                 GEOM::GEOM_Object_ptr theAxis,
340                                 CORBA::Double theAngle);
341   GEOM::GEOM_Object_ptr RotateCopy (GEOM::GEOM_Object_ptr theObject,
342                                     GEOM::GEOM_Object_ptr theAxis,
343                                     CORBA::Double theAngle);
344
345   GEOM::GEOM_Object_ptr RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
346                                            GEOM::GEOM_Object_ptr theCentPoint,
347                                            GEOM::GEOM_Object_ptr thePoint1,
348                                            GEOM::GEOM_Object_ptr thePoint2);
349
350   GEOM::GEOM_Object_ptr RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
351                                                GEOM::GEOM_Object_ptr theCentPoint,
352                                                GEOM::GEOM_Object_ptr thePoint1,
353                                                GEOM::GEOM_Object_ptr thePoint2);
354
355   GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
356                                        GEOM::GEOM_Object_ptr theAxis,
357                                        CORBA::Long theNbTimes);
358   GEOM::GEOM_Object_ptr MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
359                                        GEOM::GEOM_Object_ptr theAxis,
360                                        CORBA::Double theAngle,
361                                        CORBA::Long theNbTimes1,
362                                        CORBA::Double theStep,
363                                        CORBA::Long theNbTimes2);
364   GEOM::GEOM_Object_ptr MirrorPlane (GEOM::GEOM_Object_ptr theObject, 
365                                      GEOM::GEOM_Object_ptr thePlane);
366   GEOM::GEOM_Object_ptr MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject, 
367                                          GEOM::GEOM_Object_ptr thePlane);
368   GEOM::GEOM_Object_ptr MirrorAxis (GEOM::GEOM_Object_ptr theObject, 
369                                     GEOM::GEOM_Object_ptr theAxis);
370   GEOM::GEOM_Object_ptr MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject, 
371                                         GEOM::GEOM_Object_ptr theAxis);
372   GEOM::GEOM_Object_ptr MirrorPoint (GEOM::GEOM_Object_ptr theObject, 
373                                      GEOM::GEOM_Object_ptr thePoint);
374   GEOM::GEOM_Object_ptr MirrorPointCopy (GEOM::GEOM_Object_ptr theObject, 
375                                          GEOM::GEOM_Object_ptr thePoint);
376   GEOM::GEOM_Object_ptr OffsetShape (GEOM::GEOM_Object_ptr theObject, 
377                                      CORBA::Double theOffset);
378   GEOM::GEOM_Object_ptr OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject, 
379                                          CORBA::Double theOffset);
380   GEOM::GEOM_Object_ptr ScaleShape (GEOM::GEOM_Object_ptr theObject, 
381                                     GEOM::GEOM_Object_ptr thePoint,
382                                     CORBA::Double theFactor);
383   GEOM::GEOM_Object_ptr ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject, 
384                                         GEOM::GEOM_Object_ptr thePoint,
385                                         CORBA::Double theFactor);
386   GEOM::GEOM_Object_ptr ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject,
387                                              GEOM::GEOM_Object_ptr thePoint,
388                                              CORBA::Double theFactorX,
389                                              CORBA::Double theFactorY,
390                                              CORBA::Double theFactorZ);
391   GEOM::GEOM_Object_ptr ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject,
392                                                  GEOM::GEOM_Object_ptr thePoint,
393                                                  CORBA::Double theFactorX,
394                                                  CORBA::Double theFactorY,
395                                                  CORBA::Double theFactorZ);
396   GEOM::GEOM_Object_ptr PositionShape (GEOM::GEOM_Object_ptr theObject,
397                                        GEOM::GEOM_Object_ptr theStartLCS,
398                                        GEOM::GEOM_Object_ptr theEndLCS);
399   GEOM::GEOM_Object_ptr PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
400                                            GEOM::GEOM_Object_ptr theStartLCS,
401                                            GEOM::GEOM_Object_ptr theEndLCS);
402
403   //-----------------------------------------------------------//
404   // ShapesOperations                                          //
405   //-----------------------------------------------------------//
406   GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
407                                   GEOM::GEOM_Object_ptr thePnt2);
408   GEOM::GEOM_Object_ptr MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires);
409   GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
410                                   CORBA::Boolean isPlanarWanted);
411   GEOM::GEOM_Object_ptr MakeFaceWires (GEOM::GEOM_List_ptr theWires,
412                                        CORBA::Boolean isPlanarWanted);
413   GEOM::GEOM_Object_ptr MakeShell (GEOM::GEOM_List_ptr theFacesAndShells);
414   GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
415   GEOM::GEOM_Object_ptr MakeSolidShells (GEOM::GEOM_List_ptr theShells);
416   GEOM::GEOM_Object_ptr MakeCompound (GEOM::GEOM_List_ptr theShapes);
417   GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
418                                        CORBA::Double theTolerance,
419                                        CORBA::Boolean doKeepNonSolids);
420   GEOM::GEOM_List_ptr GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
421                                     CORBA::Double theTolerance);
422   GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
423                                              CORBA::Double theTolerance,
424                                              const GEOM::ListOfGO& theFaces,
425                                              CORBA::Boolean doKeepNonSolids);
426   GEOM::GEOM_List_ptr MakeExplode (GEOM::GEOM_Object_ptr theShape,
427                                        CORBA::Long theShapeType,
428                                        CORBA::Boolean isSorted);
429   CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
430   CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
431   GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
432
433   GEOM::GEOM_List_ptr GetShapesOnShape (GEOM::GEOM_Object_ptr theCheckShape,
434                                         GEOM::GEOM_Object_ptr theShape,
435                                         CORBA::Short theShapeType,
436                                         GEOM::shape_state theState);
437   GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
438                                        (GEOM::GEOM_Object_ptr theCheckShape,
439                                         GEOM::GEOM_Object_ptr theShape,
440                                         CORBA::Short theShapeType,
441                                         GEOM::shape_state theState);
442
443
444   //-----------------------------------------------------------//
445   // BlocksOperations                                          //
446   //-----------------------------------------------------------//
447   GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
448                                            GEOM::GEOM_Object_ptr thePnt2,
449                                            GEOM::GEOM_Object_ptr thePnt3,
450                                            GEOM::GEOM_Object_ptr thePnt4);
451   GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
452                                   GEOM::GEOM_Object_ptr theEdge2,
453                                   GEOM::GEOM_Object_ptr theEdge3,
454                                   GEOM::GEOM_Object_ptr theEdge4);
455   GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
456                                         GEOM::GEOM_Object_ptr theEdge2);
457   GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1,
458                                   GEOM::GEOM_Object_ptr theFace2,
459                                   GEOM::GEOM_Object_ptr theFace3,
460                                   GEOM::GEOM_Object_ptr theFace4,
461                                   GEOM::GEOM_Object_ptr theFace5,
462                                   GEOM::GEOM_Object_ptr theFace6);
463   GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
464                                         GEOM::GEOM_Object_ptr theFace2);
465   GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape,
466                                   CORBA::Double   theX,
467                                   CORBA::Double   theY,
468                                   CORBA::Double   theZ,
469                                   CORBA::Double   theEpsilon);
470   GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape,
471                                  GEOM::GEOM_Object_ptr thePoint1,
472                                  GEOM::GEOM_Object_ptr thePoint2);
473   GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
474                                           GEOM::GEOM_Object_ptr thePoint);
475   GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
476                                          GEOM::GEOM_Object_ptr thePoint1,
477                                          GEOM::GEOM_Object_ptr thePoint2,
478                                          GEOM::GEOM_Object_ptr thePoint3,
479                                          GEOM::GEOM_Object_ptr thePoint4);
480   GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
481                                         GEOM::GEOM_Object_ptr theEdge1,
482                                         GEOM::GEOM_Object_ptr theEdge2);
483   GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
484                                          GEOM::GEOM_Object_ptr theFace);
485   GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
486                                           GEOM::GEOM_Object_ptr thePoint);
487   GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
488                                           GEOM::GEOM_Object_ptr theVector);
489   CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
490                                      CORBA::Long     theMinNbFaces,
491                                      CORBA::Long     theMaxNbFaces,
492                                      CORBA::Long&          theNbBlocks);
493   CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
494                                         GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors);
495   char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
496                        const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors);
497   GEOM::GEOM_List_ptr ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
498                                                    CORBA::Long     theMinNbFaces,
499                                                    CORBA::Long     theMaxNbFaces);
500   GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
501                                            GEOM::GEOM_Object_ptr thePoint);
502   GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
503                                          GEOM::GEOM_List_ptr theParts);
504   GEOM::GEOM_List_ptr GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
505                                             GEOM::GEOM_List_ptr theParts);
506   GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
507                                                    CORBA::Long     theDirFace1,
508                                                    CORBA::Long     theDirFace2,
509                                                    CORBA::Long     theNbTimes);
510   GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock,
511                                                    CORBA::Long     theDirFace1U,
512                                                    CORBA::Long     theDirFace2U,
513                                                    CORBA::Long     theNbTimesU,
514                                                    CORBA::Long     theDirFace1V,
515                                                    CORBA::Long     theDirFace2V,
516                                                    CORBA::Long     theNbTimesV);
517
518   //-----------------------------------------------------------//
519   // CurvesOperations                                          //
520   //-----------------------------------------------------------//
521   GEOM::GEOM_Object_ptr MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
522                                            GEOM::GEOM_Object_ptr theVector,
523                                            CORBA::Double theR);
524   GEOM::GEOM_Object_ptr MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
525                                             GEOM::GEOM_Object_ptr thePnt2,
526                                             GEOM::GEOM_Object_ptr thePnt3);
527   GEOM::GEOM_Object_ptr MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
528                                               GEOM::GEOM_Object_ptr thePnt2,
529                                               GEOM::GEOM_Object_ptr thePnt3);
530   GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
531                                      GEOM::GEOM_Object_ptr theVector,
532                                      CORBA::Double theRMajor, CORBA::Double theRMinor);
533   GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1,
534                                  GEOM::GEOM_Object_ptr thePnt2,
535                                  GEOM::GEOM_Object_ptr thePnt3);
536   GEOM::GEOM_Object_ptr MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
537                                        GEOM::GEOM_Object_ptr thePnt1,
538                                        GEOM::GEOM_Object_ptr thePnt2,
539                                        CORBA::Boolean theSense);
540   GEOM::GEOM_Object_ptr MakePolyline (GEOM::GEOM_List_ptr thePoints);
541   GEOM::GEOM_Object_ptr MakeSplineBezier (GEOM::GEOM_List_ptr thePoints);
542   GEOM::GEOM_Object_ptr MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints);
543   GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand, 
544                                                 GEOM::GEOM_List_ptr theWorkingPlane);
545
546   //-----------------------------------------------------------//
547   // LocalOperations                                           //
548   //-----------------------------------------------------------//
549   GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
550                                        CORBA::Double theR);
551   GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
552                                          GEOM::GEOM_List_ptr theEdges);
553   GEOM::GEOM_Object_ptr MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
554                                              CORBA::Double theR2, GEOM::GEOM_List_ptr theEdges);
555   GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
556                                          GEOM::GEOM_List_ptr theFaces);
557   GEOM::GEOM_Object_ptr MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
558                                              CORBA::Double theR2, GEOM::GEOM_List_ptr theFaces);
559   GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
560   GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
561                                          CORBA::Double theD1, CORBA::Double theD2,
562                                          CORBA::Long theFace1, CORBA::Long theFace2);
563   GEOM::GEOM_Object_ptr MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
564                                            CORBA::Double theD, CORBA::Double theAngle,
565                                            CORBA::Long theFace1, CORBA::Long theFace2);
566   GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
567                                           CORBA::Double theD1, CORBA::Double theD2,
568                                           GEOM::GEOM_List_ptr theFaces);
569   GEOM::GEOM_Object_ptr MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
570                                             CORBA::Double theD, CORBA::Double theAngle,
571                                             GEOM::GEOM_List_ptr theFaces);
572   GEOM::GEOM_Object_ptr MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
573                                           CORBA::Double theD1, CORBA::Double theD2,
574                                           GEOM::GEOM_List_ptr theEdges);
575   GEOM::GEOM_Object_ptr MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
576                                             CORBA::Double theD, CORBA::Double theAngle,
577                                             GEOM::GEOM_List_ptr theEdges);
578   GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
579                                        CORBA::Double theWeight,
580                                        CORBA::Double theWaterDensity,
581                                        CORBA::Double theMeshingDeflection);
582   CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
583                                 GEOM::GEOM_Object_ptr theSubShape);
584
585   //-----------------------------------------------------------//
586   // GroupOperations                                           //
587   //-----------------------------------------------------------//
588   GEOM::GEOM_Object_ptr CreateGroup (GEOM::GEOM_Object_ptr theMainShape, 
589                                      CORBA::Long theShapeType);
590   void AddObject (GEOM::GEOM_Object_ptr theGroup, 
591                   CORBA::Long theSubShapeId);
592   void RemoveObject (GEOM::GEOM_Object_ptr theGroup, 
593                      CORBA::Long theSubShapeId);
594   CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup);
595   GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup);
596   GEOM::GEOM_List_ptr GetObjects (GEOM::GEOM_Object_ptr theGroup);
597   
598 private:
599   SALOME_NamingService *  name_service; 
600   GEOM::GEOM_Gen_var      myGeomEngine;
601   CORBA::Long             myStudyID;
602   CORBA::Long             myLastStudyID; // mkr : PAL10770
603   PortableServer::POA_var myPOA;
604   
605   GEOM::GEOM_IBasicOperations_var     myBasicOp;
606   GEOM::GEOM_I3DPrimOperations_var    my3DPrimOp;
607   GEOM::GEOM_IBooleanOperations_var   myBoolOp;
608   GEOM::GEOM_IInsertOperations_var    myInsOp;
609   GEOM::GEOM_ITransformOperations_var myTransfOp;
610   GEOM::GEOM_IShapesOperations_var    myShapesOp;
611   GEOM::GEOM_IBlocksOperations_var    myBlocksOp;
612   GEOM::GEOM_ICurvesOperations_var    myCurvesOp;
613   GEOM::GEOM_ILocalOperations_var     myLocalOp;
614   GEOM::GEOM_IGroupOperations_var     myGroupOp;
615
616 };
617
618 #endif