Salome HOME
0020695: EDF 1076 GEOM: Add a new shape in GEOM: T-shape
[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   void getAdvancedOp();
58
59   PortableServer::ServantBase_var GetServant(CORBA::Object_ptr       theObject,
60                                              PortableServer::POA_ptr thePOA);
61
62   //-----------------------------------------------------------------------//
63   // Set current stydy ID                                                  //
64   //-----------------------------------------------------------------------//
65   void SetStudyID( CORBA::Long theId );      
66
67   //-----------------------------------------------------------//
68   // Create ListOfGO and add items to it                       // 
69   //-----------------------------------------------------------//
70   GEOM::GEOM_List_ptr CreateListOfGO();
71   void AddItemToListOfGO(GEOM::GEOM_List_ptr& theList, 
72                          GEOM::GEOM_Object_ptr theObject);
73
74   //-----------------------------------------------------------//
75   // Create ListOfLong and add items to it                     // 
76   //-----------------------------------------------------------//
77   GEOM::GEOM_List_ptr CreateListOfLong();
78   void AddItemToListOfLong(GEOM::GEOM_List_ptr& theList, 
79                            CORBA::Long theObject);
80   
81   //-----------------------------------------------------------//
82   // Create ListOfDouble and add items to it                   // 
83   //-----------------------------------------------------------//
84   GEOM::GEOM_List_ptr CreateListOfDouble();
85   void AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList, 
86                              CORBA::Double theObject);
87
88   //-----------------------------------------------------------------------//
89   // Inherited methods from SALOMEDS::Driver                               //
90   //-----------------------------------------------------------------------//    
91
92   SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
93                           const char* theURL,
94                           CORBA::Boolean isMultiFile);
95
96   SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
97                                const char* theURL,
98                                CORBA::Boolean isMultiFile);
99   
100   CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
101                       const SALOMEDS::TMPFile& theStream,
102                       const char* theURL,
103                       CORBA::Boolean isMultiFile);
104
105   CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent,
106                            const SALOMEDS::TMPFile& theStream,
107                            const char* theURL,
108                            CORBA::Boolean isMultiFile);
109
110   void Close(SALOMEDS::SComponent_ptr theComponent);
111   char* ComponentDataType();
112
113
114   char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
115                                const char* IORString,
116                                CORBA::Boolean isMultiFile,
117                                CORBA::Boolean isASCII);
118   char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
119                                const char* aLocalPersistentID,
120                                CORBA::Boolean isMultiFile,
121                                CORBA::Boolean isASCII);
122
123   CORBA::Boolean CanPublishInStudy(CORBA::Object_ptr theIOR);
124   SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
125                                        SALOMEDS::SObject_ptr theSObject,
126                                        CORBA::Object_ptr theObject,
127                                        const char* theName) throw (SALOME::SALOME_Exception) ;
128
129   GEOM::ListOfGO* PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
130                                             //SALOMEDS::SObject_ptr theSObject,
131                                             CORBA::Object_ptr theObject);
132
133   CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
134   SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
135   CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
136   SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
137                                   CORBA::Long theObjectID,
138                                   SALOMEDS::SObject_ptr theObject);
139
140   //-----------------------------------------------------------//
141   // Primitives Construction : BasicOperations                 // 
142   //-----------------------------------------------------------//
143   GEOM::GEOM_Object_ptr MakePointXYZ (CORBA::Double theX,
144                                       CORBA::Double theY,
145                                       CORBA::Double theZ);
146   GEOM::GEOM_Object_ptr MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
147                                                 CORBA::Double theX, 
148                                                 CORBA::Double theY, 
149                                                 CORBA::Double theZ);
150   GEOM::GEOM_Object_ptr MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
151                                           CORBA::Double theParameter);
152   GEOM::GEOM_Object_ptr MakePointOnCurveByCoord (GEOM::GEOM_Object_ptr theRefCurve,
153                                                  CORBA::Double theXParameter,
154                                                  CORBA::Double theYParameter,
155                                                  CORBA::Double theZParameter);
156   GEOM::GEOM_Object_ptr MakePointOnSurface (GEOM::GEOM_Object_ptr theRefSurface,
157                                             CORBA::Double theUParameter,
158                                             CORBA::Double theVParameter);
159   GEOM::GEOM_Object_ptr MakePointOnSurfaceByCoord (GEOM::GEOM_Object_ptr theRefSurface,
160                                                    CORBA::Double theXParameter,
161                                                    CORBA::Double theYParameter,
162                                                    CORBA::Double theZParameter);
163   GEOM::GEOM_Object_ptr MakePointOnLinesIntersection (GEOM::GEOM_Object_ptr theRefLine1,
164                                                       GEOM::GEOM_Object_ptr theRefLine2);
165   GEOM::GEOM_Object_ptr MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
166                                              CORBA::Double theParameter);
167   GEOM::GEOM_Object_ptr MakeVectorDXDYDZ (CORBA::Double theDX,
168                                           CORBA::Double theDY,
169                                           CORBA::Double theDZ);
170   GEOM::GEOM_Object_ptr MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
171                                           GEOM::GEOM_Object_ptr thePnt2);
172   GEOM::GEOM_Object_ptr MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
173                                         GEOM::GEOM_Object_ptr thePnt2);
174   GEOM::GEOM_Object_ptr MakeLineTwoFaces (GEOM::GEOM_Object_ptr theFace1,
175                                           GEOM::GEOM_Object_ptr theFace2);
176   GEOM::GEOM_Object_ptr MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
177                                            GEOM::GEOM_Object_ptr thePnt2,
178                                            GEOM::GEOM_Object_ptr thePnt3,
179                                            CORBA::Double theTrimSize);
180   GEOM::GEOM_Object_ptr MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
181                                          GEOM::GEOM_Object_ptr theVec,
182                                          CORBA::Double theTrimSize);
183   GEOM::GEOM_Object_ptr MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
184                                        CORBA::Double theTrimSize);
185   GEOM::GEOM_Object_ptr MakePlane2Vec (GEOM::GEOM_Object_ptr theVec1,
186                                        GEOM::GEOM_Object_ptr theVec2,
187                                        CORBA::Double theTrimSize);
188   GEOM::GEOM_Object_ptr MakePlaneLCS (GEOM::GEOM_Object_ptr theLCS,
189                                       CORBA::Double theTrimSize,
190                                       CORBA::Double theOrientation);
191   GEOM::GEOM_Object_ptr MakeMarker (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
192                                     CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
193                                     CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ);
194
195   GEOM::GEOM_Object_ptr MakeMarkerFromShape (GEOM::GEOM_Object_ptr theShape);
196
197   GEOM::GEOM_Object_ptr MakeMarkerPntTwoVec (GEOM::GEOM_Object_ptr theOrigin,
198                                              GEOM::GEOM_Object_ptr theXVec,
199                                              GEOM::GEOM_Object_ptr theYVec);
200     
201   GEOM::GEOM_Object_ptr MakeTangentPlaneOnFace (GEOM::GEOM_Object_ptr theFace, 
202                                                  CORBA::Double theParameterU,
203                                                  CORBA::Double theParameterV,
204                                                  CORBA::Double theTrimSize);
205
206   //-----------------------------------------------------------//
207   // Primitives Construction : 3DPrimOperations                //
208   //-----------------------------------------------------------//
209   GEOM::GEOM_Object_ptr MakeBox (CORBA::Double theX1,
210                                  CORBA::Double theY1,
211                                  CORBA::Double theZ1,
212                                  CORBA::Double theX2,
213                                  CORBA::Double theY2,
214                                  CORBA::Double theZ2);
215   GEOM::GEOM_Object_ptr MakeBoxDXDYDZ (CORBA::Double theDX, 
216                                        CORBA::Double theDY, 
217                                        CORBA::Double theDZ);
218   GEOM::GEOM_Object_ptr MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1, 
219                                        GEOM::GEOM_Object_ptr thePnt2);
220   GEOM::GEOM_Object_ptr MakeFaceHW (CORBA::Double theH,
221                                     CORBA::Double theW,
222                                     CORBA::Short  theOrientation);
223   GEOM::GEOM_Object_ptr MakeFaceObjHW (GEOM::GEOM_Object_ptr theObj, 
224                                        CORBA::Double theH,
225                                        CORBA::Double theW);
226   GEOM::GEOM_Object_ptr MakeDiskPntVecR (GEOM::GEOM_Object_ptr theCenter,
227                                          GEOM::GEOM_Object_ptr theVector,
228                                          CORBA::Double theR);
229   GEOM::GEOM_Object_ptr MakeDiskThreePnt (GEOM::GEOM_Object_ptr thePnt1,
230                                           GEOM::GEOM_Object_ptr thePnt2,
231                                           GEOM::GEOM_Object_ptr thePnt3);
232   GEOM::GEOM_Object_ptr MakeDiskR (CORBA::Double theR,
233                                    CORBA::Short  theOrientation);
234   GEOM::GEOM_Object_ptr MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
235                                               GEOM::GEOM_Object_ptr theAxis,
236                                               CORBA::Double theRadius,
237                                               CORBA::Double theHeight);
238   GEOM::GEOM_Object_ptr MakeCylinderRH (CORBA::Double theR, 
239                                         CORBA::Double theH);
240   GEOM::GEOM_Object_ptr MakeSphere (CORBA::Double theX,
241                                     CORBA::Double theY,
242                                     CORBA::Double theZ,
243                                     CORBA::Double theRadius);
244   GEOM::GEOM_Object_ptr MakeSphereR (CORBA::Double theR);
245   GEOM::GEOM_Object_ptr MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt, 
246                                         CORBA::Double theR);
247   GEOM::GEOM_Object_ptr MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
248                                            GEOM::GEOM_Object_ptr theVec,
249                                            CORBA::Double theRMajor,
250                                            CORBA::Double theRMinor);
251   GEOM::GEOM_Object_ptr MakeTorusRR (CORBA::Double theRMajor,
252                                      CORBA::Double theRMinor);
253   GEOM::GEOM_Object_ptr MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
254                                              GEOM::GEOM_Object_ptr theAxis,
255                                              CORBA::Double theR1,
256                                              CORBA::Double theR2,
257                                              CORBA::Double theHeight);
258   GEOM::GEOM_Object_ptr MakeConeR1R2H (CORBA::Double theR1, 
259                                        CORBA::Double theR2, 
260                                        CORBA::Double theHeight);
261   GEOM::GEOM_Object_ptr MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
262                                        GEOM::GEOM_Object_ptr theVec,
263                                        CORBA::Double         theH);
264   GEOM::GEOM_Object_ptr MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
265                                             GEOM::GEOM_Object_ptr theVec,
266                                             CORBA::Double         theH);
267   GEOM::GEOM_Object_ptr MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
268                                          GEOM::GEOM_Object_ptr thePoint1,
269                                          GEOM::GEOM_Object_ptr thePoint2);
270   GEOM::GEOM_Object_ptr MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
271                                               GEOM::GEOM_Object_ptr thePoint1,
272                                               GEOM::GEOM_Object_ptr thePoint2);
273   GEOM::GEOM_Object_ptr MakePrismDXDYDZ (GEOM::GEOM_Object_ptr theBase,
274                                          CORBA::Double         theDX,
275                                          CORBA::Double         theDY,
276                                          CORBA::Double         theDZ);
277   GEOM::GEOM_Object_ptr MakePrismDXDYDZ2Ways (GEOM::GEOM_Object_ptr theBase,
278                                               CORBA::Double         theDX,
279                                               CORBA::Double         theDY,
280                                               CORBA::Double         theDZ);
281   GEOM::GEOM_Object_ptr MakePipe (GEOM::GEOM_Object_ptr theBase, 
282                                   GEOM::GEOM_Object_ptr thePath);
283   GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
284                                                  GEOM::GEOM_Object_ptr theAxis,
285                                                  CORBA::Double theAngle);
286   GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
287                                                       GEOM::GEOM_Object_ptr theAxis,
288                                                       CORBA::Double theAngle);
289   GEOM::GEOM_Object_ptr MakeFilling (GEOM::GEOM_Object_ptr theShape,
290                                      CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
291                                      CORBA::Double theTol2D, CORBA::Double theTol3D,
292                                      CORBA::Long theNbIter,
293                                      GEOM::filling_oper_method theMethod,
294                                      CORBA::Boolean theApprox);
295
296   GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
297                                          CORBA::Boolean theModeSolid,
298                                          CORBA::Double thePreci,
299                                          CORBA::Boolean theRuled);
300   
301   GEOM::GEOM_Object_ptr MakePipeWithDifferentSections(const GEOM::ListOfGO& theBases,
302                                                       const GEOM::ListOfGO& theLocations,
303                                                       GEOM::GEOM_Object_ptr thePath,
304                                                       CORBA::Boolean theWithContact,
305                                                       CORBA::Boolean theWithCorrections);
306   
307   GEOM::GEOM_Object_ptr MakePipeWithShellSections(const GEOM::ListOfGO& theBases,
308                                                   const GEOM::ListOfGO& theSubBases,
309                                                   const GEOM::ListOfGO& theLocations,
310                                                   GEOM::GEOM_Object_ptr thePath,
311                                                   CORBA::Boolean theWithContact,
312                                                   CORBA::Boolean theWithCorrections);
313
314   GEOM::GEOM_Object_ptr MakePipeShellsWithoutPath(const GEOM::ListOfGO& theBases,
315                                                   const GEOM::ListOfGO& theLocations);
316   
317   GEOM::GEOM_Object_ptr MakePipeBiNormalAlongVector (GEOM::GEOM_Object_ptr theBase,
318                                                      GEOM::GEOM_Object_ptr thePath,
319                                                      GEOM::GEOM_Object_ptr theVec);
320
321   //-----------------------------------------------------------//
322   // BooleanOperations                                         //
323   //-----------------------------------------------------------//
324   GEOM::GEOM_Object_ptr MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
325                                      GEOM::GEOM_Object_ptr theShape2,
326                                      CORBA::Long theOperation);
327   GEOM::GEOM_Object_ptr MakeFuse (GEOM::GEOM_Object_ptr theShape1,
328                                   GEOM::GEOM_Object_ptr theShape2);
329   GEOM::GEOM_Object_ptr MakePartition (GEOM::GEOM_List_ptr   theShapes,
330                                        GEOM::GEOM_List_ptr   theTools,
331                                        GEOM::GEOM_List_ptr   theKeepInside,
332                                        GEOM::GEOM_List_ptr   theRemoveInside,
333                                        CORBA::Short      theLimit,
334                                        CORBA::Boolean    theRemoveWebs,
335                                        GEOM::GEOM_List_ptr theMaterials,
336                                        CORBA::Short theKeepNonlimitShapes);
337   GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
338                                            GEOM::GEOM_Object_ptr thePlane);
339
340   //-----------------------------------------------------------//
341   // InsertOperations                                          //
342   //-----------------------------------------------------------//
343   GEOM::GEOM_Object_ptr MakeCopy (GEOM::GEOM_Object_ptr theOriginal);
344   void Export (GEOM::GEOM_Object_ptr theObject, 
345                const char*           theFileName, 
346                const char*           theFormatName);
347   GEOM::GEOM_Object_ptr Import (const char* theFileName, 
348                                 const char* theFormatName);
349   void ImportTranslators (GEOM::string_array_out theFormats,
350                           GEOM::string_array_out thePatterns);
351   void ExportTranslators (GEOM::string_array_out theFormats,
352                           GEOM::string_array_out thePatterns);
353
354   //-----------------------------------------------------------//
355   // TransformOperations                                       //
356   //-----------------------------------------------------------//
357   GEOM::GEOM_Object_ptr TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
358                                             GEOM::GEOM_Object_ptr thePoint1,
359                                             GEOM::GEOM_Object_ptr thePoint2);
360   GEOM::GEOM_Object_ptr TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
361                                                 GEOM::GEOM_Object_ptr thePoint1,
362                                                 GEOM::GEOM_Object_ptr thePoint2);
363   GEOM::GEOM_Object_ptr TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
364                                          CORBA::Double theDX, 
365                                          CORBA::Double theDY, 
366                                          CORBA::Double theDZ);
367   GEOM::GEOM_Object_ptr TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
368                                              CORBA::Double theDX, 
369                                              CORBA::Double theDY, 
370                                              CORBA::Double theDZ);
371   GEOM::GEOM_Object_ptr TranslateVector (GEOM::GEOM_Object_ptr theObject,
372                                          GEOM::GEOM_Object_ptr theVector);
373   GEOM::GEOM_Object_ptr TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
374                                              GEOM::GEOM_Object_ptr theVector);
375   GEOM::GEOM_Object_ptr TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
376                                                  GEOM::GEOM_Object_ptr theVector,
377                                                  CORBA::Double theDistance,
378                                                  CORBA::Boolean theCopy);
379   GEOM::GEOM_Object_ptr MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
380                                           GEOM::GEOM_Object_ptr theVector,
381                                           CORBA::Double theStep,
382                                           CORBA::Long theNbTimes);
383   GEOM::GEOM_Object_ptr MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
384                                           GEOM::GEOM_Object_ptr theVector1,
385                                           CORBA::Double theStep1,
386                                           CORBA::Long theNbTimes1,
387                                           GEOM::GEOM_Object_ptr theVector2,
388                                           CORBA::Double theStep2,
389                                           CORBA::Long theNbTimes2);
390   GEOM::GEOM_Object_ptr Rotate (GEOM::GEOM_Object_ptr theObject,
391                                 GEOM::GEOM_Object_ptr theAxis,
392                                 CORBA::Double theAngle);
393   GEOM::GEOM_Object_ptr RotateCopy (GEOM::GEOM_Object_ptr theObject,
394                                     GEOM::GEOM_Object_ptr theAxis,
395                                     CORBA::Double theAngle);
396
397   GEOM::GEOM_Object_ptr RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
398                                            GEOM::GEOM_Object_ptr theCentPoint,
399                                            GEOM::GEOM_Object_ptr thePoint1,
400                                            GEOM::GEOM_Object_ptr thePoint2);
401
402   GEOM::GEOM_Object_ptr RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
403                                                GEOM::GEOM_Object_ptr theCentPoint,
404                                                GEOM::GEOM_Object_ptr thePoint1,
405                                                GEOM::GEOM_Object_ptr thePoint2);
406
407   GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
408                                        GEOM::GEOM_Object_ptr theAxis,
409                                        CORBA::Long theNbTimes);
410   GEOM::GEOM_Object_ptr MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
411                                        GEOM::GEOM_Object_ptr theAxis,
412                                        CORBA::Double theAngle,
413                                        CORBA::Long theNbTimes1,
414                                        CORBA::Double theStep,
415                                        CORBA::Long theNbTimes2);
416   GEOM::GEOM_Object_ptr MirrorPlane (GEOM::GEOM_Object_ptr theObject, 
417                                      GEOM::GEOM_Object_ptr thePlane);
418   GEOM::GEOM_Object_ptr MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject, 
419                                          GEOM::GEOM_Object_ptr thePlane);
420   GEOM::GEOM_Object_ptr MirrorAxis (GEOM::GEOM_Object_ptr theObject, 
421                                     GEOM::GEOM_Object_ptr theAxis);
422   GEOM::GEOM_Object_ptr MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject, 
423                                         GEOM::GEOM_Object_ptr theAxis);
424   GEOM::GEOM_Object_ptr MirrorPoint (GEOM::GEOM_Object_ptr theObject, 
425                                      GEOM::GEOM_Object_ptr thePoint);
426   GEOM::GEOM_Object_ptr MirrorPointCopy (GEOM::GEOM_Object_ptr theObject, 
427                                          GEOM::GEOM_Object_ptr thePoint);
428   GEOM::GEOM_Object_ptr OffsetShape (GEOM::GEOM_Object_ptr theObject, 
429                                      CORBA::Double theOffset);
430   GEOM::GEOM_Object_ptr OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject, 
431                                          CORBA::Double theOffset);
432   GEOM::GEOM_Object_ptr ScaleShape (GEOM::GEOM_Object_ptr theObject, 
433                                     GEOM::GEOM_Object_ptr thePoint,
434                                     CORBA::Double theFactor);
435   GEOM::GEOM_Object_ptr ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject, 
436                                         GEOM::GEOM_Object_ptr thePoint,
437                                         CORBA::Double theFactor);
438   GEOM::GEOM_Object_ptr ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject,
439                                              GEOM::GEOM_Object_ptr thePoint,
440                                              CORBA::Double theFactorX,
441                                              CORBA::Double theFactorY,
442                                              CORBA::Double theFactorZ);
443   GEOM::GEOM_Object_ptr ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject,
444                                                  GEOM::GEOM_Object_ptr thePoint,
445                                                  CORBA::Double theFactorX,
446                                                  CORBA::Double theFactorY,
447                                                  CORBA::Double theFactorZ);
448   GEOM::GEOM_Object_ptr PositionShape (GEOM::GEOM_Object_ptr theObject,
449                                        GEOM::GEOM_Object_ptr theStartLCS,
450                                        GEOM::GEOM_Object_ptr theEndLCS);
451   GEOM::GEOM_Object_ptr PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
452                                            GEOM::GEOM_Object_ptr theStartLCS,
453                                            GEOM::GEOM_Object_ptr theEndLCS);
454   GEOM::GEOM_Object_ptr PositionAlongPath (GEOM::GEOM_Object_ptr theObject,
455                                            GEOM::GEOM_Object_ptr thePath,
456                                            CORBA::Double         theDistance,
457                                            CORBA::Boolean        theCopy,
458                                            CORBA::Boolean        theReverse);
459
460   //-----------------------------------------------------------//
461   // ShapesOperations                                          //
462   //-----------------------------------------------------------//
463   GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
464                                   GEOM::GEOM_Object_ptr thePnt2);
465   GEOM::GEOM_Object_ptr MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires,
466                                   CORBA::Double       theTolerance);
467   GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
468                                   CORBA::Boolean isPlanarWanted);
469   GEOM::GEOM_Object_ptr MakeFaceWires (GEOM::GEOM_List_ptr theWires,
470                                        CORBA::Boolean isPlanarWanted);
471   GEOM::GEOM_Object_ptr MakeShell (GEOM::GEOM_List_ptr theFacesAndShells);
472   GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
473   GEOM::GEOM_Object_ptr MakeSolidShells (GEOM::GEOM_List_ptr theShells);
474   GEOM::GEOM_Object_ptr MakeCompound (GEOM::GEOM_List_ptr theShapes);
475   GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
476                                        CORBA::Double theTolerance,
477                                        CORBA::Boolean doKeepNonSolids);
478   GEOM::GEOM_List_ptr GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
479                                     CORBA::Double theTolerance);
480   GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
481                                              CORBA::Double theTolerance,
482                                              const GEOM::ListOfGO& theFaces,
483                                              CORBA::Boolean doKeepNonSolids);
484   GEOM::GEOM_List_ptr MakeExplode (GEOM::GEOM_Object_ptr theShape,
485                                        CORBA::Long theShapeType,
486                                        CORBA::Boolean isSorted);
487   CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
488   CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
489   GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
490
491   GEOM::GEOM_List_ptr GetShapesOnShape (GEOM::GEOM_Object_ptr theCheckShape,
492                                         GEOM::GEOM_Object_ptr theShape,
493                                         CORBA::Short theShapeType,
494                                         GEOM::shape_state theState);
495   GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
496                                        (GEOM::GEOM_Object_ptr theCheckShape,
497                                         GEOM::GEOM_Object_ptr theShape,
498                                         CORBA::Short theShapeType,
499                                         GEOM::shape_state theState);
500
501
502   //-----------------------------------------------------------//
503   // BlocksOperations                                          //
504   //-----------------------------------------------------------//
505   GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
506                                            GEOM::GEOM_Object_ptr thePnt2,
507                                            GEOM::GEOM_Object_ptr thePnt3,
508                                            GEOM::GEOM_Object_ptr thePnt4);
509   GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
510                                   GEOM::GEOM_Object_ptr theEdge2,
511                                   GEOM::GEOM_Object_ptr theEdge3,
512                                   GEOM::GEOM_Object_ptr theEdge4);
513   GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
514                                         GEOM::GEOM_Object_ptr theEdge2);
515   GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1,
516                                   GEOM::GEOM_Object_ptr theFace2,
517                                   GEOM::GEOM_Object_ptr theFace3,
518                                   GEOM::GEOM_Object_ptr theFace4,
519                                   GEOM::GEOM_Object_ptr theFace5,
520                                   GEOM::GEOM_Object_ptr theFace6);
521   GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
522                                         GEOM::GEOM_Object_ptr theFace2);
523   GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape,
524                                   CORBA::Double   theX,
525                                   CORBA::Double   theY,
526                                   CORBA::Double   theZ,
527                                   CORBA::Double   theEpsilon);
528   GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape,
529                                  GEOM::GEOM_Object_ptr thePoint1,
530                                  GEOM::GEOM_Object_ptr thePoint2);
531   GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
532                                           GEOM::GEOM_Object_ptr thePoint);
533   GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
534                                          GEOM::GEOM_Object_ptr thePoint1,
535                                          GEOM::GEOM_Object_ptr thePoint2,
536                                          GEOM::GEOM_Object_ptr thePoint3,
537                                          GEOM::GEOM_Object_ptr thePoint4);
538   GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
539                                         GEOM::GEOM_Object_ptr theEdge1,
540                                         GEOM::GEOM_Object_ptr theEdge2);
541   GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
542                                          GEOM::GEOM_Object_ptr theFace);
543   GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
544                                           GEOM::GEOM_Object_ptr thePoint);
545   GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
546                                           GEOM::GEOM_Object_ptr theVector);
547   CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
548                                      CORBA::Long     theMinNbFaces,
549                                      CORBA::Long     theMaxNbFaces,
550                                      CORBA::Long&          theNbBlocks);
551   CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
552                                         GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors);
553   char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
554                        const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors);
555   GEOM::GEOM_List_ptr ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
556                                                    CORBA::Long     theMinNbFaces,
557                                                    CORBA::Long     theMaxNbFaces);
558   GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
559                                            GEOM::GEOM_Object_ptr thePoint);
560   GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
561                                          GEOM::GEOM_List_ptr theParts);
562   GEOM::GEOM_List_ptr GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
563                                             GEOM::GEOM_List_ptr theParts);
564   GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
565                                                    CORBA::Long     theDirFace1,
566                                                    CORBA::Long     theDirFace2,
567                                                    CORBA::Long     theNbTimes);
568   GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock,
569                                                    CORBA::Long     theDirFace1U,
570                                                    CORBA::Long     theDirFace2U,
571                                                    CORBA::Long     theNbTimesU,
572                                                    CORBA::Long     theDirFace1V,
573                                                    CORBA::Long     theDirFace2V,
574                                                    CORBA::Long     theNbTimesV);
575
576   //-----------------------------------------------------------//
577   // CurvesOperations                                          //
578   //-----------------------------------------------------------//
579   GEOM::GEOM_Object_ptr MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
580                                            GEOM::GEOM_Object_ptr theVector,
581                                            CORBA::Double theR);
582   GEOM::GEOM_Object_ptr MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
583                                             GEOM::GEOM_Object_ptr thePnt2,
584                                             GEOM::GEOM_Object_ptr thePnt3);
585   GEOM::GEOM_Object_ptr MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
586                                               GEOM::GEOM_Object_ptr thePnt2,
587                                               GEOM::GEOM_Object_ptr thePnt3);
588   GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
589                                      GEOM::GEOM_Object_ptr theVector,
590                                      CORBA::Double theRMajor, CORBA::Double theRMinor);
591   GEOM::GEOM_Object_ptr MakeEllipseVec (GEOM::GEOM_Object_ptr theCenter,
592                                         GEOM::GEOM_Object_ptr theVector,
593                                         CORBA::Double theRMajor, CORBA::Double theRMinor,
594                                         GEOM::GEOM_Object_ptr theVectorMajor);
595   GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1,
596                                  GEOM::GEOM_Object_ptr thePnt2,
597                                  GEOM::GEOM_Object_ptr thePnt3);
598   GEOM::GEOM_Object_ptr MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
599                                        GEOM::GEOM_Object_ptr thePnt1,
600                                        GEOM::GEOM_Object_ptr thePnt2,
601                                        CORBA::Boolean theSense);
602   GEOM::GEOM_Object_ptr MakeArcOfEllipse (GEOM::GEOM_Object_ptr thePnt1,
603                                           GEOM::GEOM_Object_ptr thePnt2,
604                                           GEOM::GEOM_Object_ptr thePnt3);
605   GEOM::GEOM_Object_ptr MakePolyline (GEOM::GEOM_List_ptr thePoints);
606   GEOM::GEOM_Object_ptr MakeSplineBezier (GEOM::GEOM_List_ptr thePoints);
607   GEOM::GEOM_Object_ptr MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints,
608                                                  CORBA::Boolean      theIsClosed);
609   GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand, 
610                                                 GEOM::GEOM_List_ptr theWorkingPlane);
611   GEOM::GEOM_Object_ptr Make3DSketcher (GEOM::GEOM_List_ptr theCoordinates);
612
613   //-----------------------------------------------------------//
614   // LocalOperations                                           //
615   //-----------------------------------------------------------//
616   GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
617                                        CORBA::Double theR);
618   GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
619                                          GEOM::GEOM_List_ptr theEdges);
620   GEOM::GEOM_Object_ptr MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
621                                              CORBA::Double theR2, GEOM::GEOM_List_ptr theEdges);
622   GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
623                                          GEOM::GEOM_List_ptr theFaces);
624   GEOM::GEOM_Object_ptr MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
625                                              CORBA::Double theR2, GEOM::GEOM_List_ptr theFaces);
626   GEOM::GEOM_Object_ptr MakeFillet2D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
627                                       GEOM::GEOM_List_ptr theVertexes);
628   GEOM::GEOM_Object_ptr MakeFillet1D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
629                                       GEOM::GEOM_List_ptr theVertexes);
630   GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
631   GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
632                                          CORBA::Double theD1, CORBA::Double theD2,
633                                          CORBA::Long theFace1, CORBA::Long theFace2);
634   GEOM::GEOM_Object_ptr MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
635                                            CORBA::Double theD, CORBA::Double theAngle,
636                                            CORBA::Long theFace1, CORBA::Long theFace2);
637   GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
638                                           CORBA::Double theD1, CORBA::Double theD2,
639                                           GEOM::GEOM_List_ptr theFaces);
640   GEOM::GEOM_Object_ptr MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
641                                             CORBA::Double theD, CORBA::Double theAngle,
642                                             GEOM::GEOM_List_ptr theFaces);
643   GEOM::GEOM_Object_ptr MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
644                                           CORBA::Double theD1, CORBA::Double theD2,
645                                           GEOM::GEOM_List_ptr theEdges);
646   GEOM::GEOM_Object_ptr MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
647                                             CORBA::Double theD, CORBA::Double theAngle,
648                                             GEOM::GEOM_List_ptr theEdges);
649   GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
650                                        CORBA::Double theWeight,
651                                        CORBA::Double theWaterDensity,
652                                        CORBA::Double theMeshingDeflection);
653   CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
654                                 GEOM::GEOM_Object_ptr theSubShape);
655
656   //-----------------------------------------------------------//
657   // GroupOperations                                           //
658   //-----------------------------------------------------------//
659   GEOM::GEOM_Object_ptr CreateGroup (GEOM::GEOM_Object_ptr theMainShape, 
660                                      CORBA::Long theShapeType);
661   void AddObject (GEOM::GEOM_Object_ptr theGroup, 
662                   CORBA::Long theSubShapeId);
663   void RemoveObject (GEOM::GEOM_Object_ptr theGroup, 
664                      CORBA::Long theSubShapeId);
665   CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup);
666   GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup);
667   GEOM::GEOM_List_ptr GetObjects (GEOM::GEOM_Object_ptr theGroup);
668   
669   //-----------------------------------------------------------//
670   // Advanced Operations                                       //
671   //-----------------------------------------------------------//
672   GEOM::GEOM_List_ptr MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, 
673                   CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
674                   CORBA::Boolean theHexMesh);
675   GEOM::GEOM_List_ptr MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, 
676                           CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
677                           CORBA::Boolean theHexMesh,
678                           GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
679   GEOM::GEOM_List_ptr MakePipeTShapeChamfer (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, 
680                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
681                      CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh);
682   GEOM::GEOM_List_ptr MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, 
683                              CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
684                              CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
685                              GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
686   GEOM::GEOM_List_ptr MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, 
687                         CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, 
688                         CORBA::Double theRF, CORBA::Boolean theHexMesh);
689   GEOM::GEOM_List_ptr MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, 
690                             CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, 
691                             CORBA::Double theRF, CORBA::Boolean theHexMesh,
692                             GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
693   
694 private:
695   SALOME_NamingService *  name_service; 
696   GEOM::GEOM_Gen_var      myGeomEngine;
697   CORBA::Long             myStudyID;
698   CORBA::Long             myLastStudyID; // mkr : PAL10770
699   PortableServer::POA_var myPOA;
700   
701   GEOM::GEOM_IBasicOperations_var     myBasicOp;
702   GEOM::GEOM_I3DPrimOperations_var    my3DPrimOp;
703   GEOM::GEOM_IBooleanOperations_var   myBoolOp;
704   GEOM::GEOM_IInsertOperations_var    myInsOp;
705   GEOM::GEOM_ITransformOperations_var myTransfOp;
706   GEOM::GEOM_IShapesOperations_var    myShapesOp;
707   GEOM::GEOM_IBlocksOperations_var    myBlocksOp;
708   GEOM::GEOM_ICurvesOperations_var    myCurvesOp;
709   GEOM::GEOM_ILocalOperations_var     myLocalOp;
710   GEOM::GEOM_IGroupOperations_var     myGroupOp;
711   GEOM::GEOM_IAdvancedOperations_var  myAdvancedOp;
712
713 };
714
715 #endif