Salome HOME
b34c13214be5b0fc316bedb1fa6ca172d9e334e3
[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 MakeFaceHW (CORBA::Double theH,
193                                     CORBA::Double theW,
194                                     CORBA::Short  theOrientation);
195   GEOM::GEOM_Object_ptr MakeFaceObjHW (GEOM::GEOM_Object_ptr theObj, 
196                                        CORBA::Double theH,
197                                        CORBA::Double theW);
198   GEOM::GEOM_Object_ptr MakeDiskPntVecR (GEOM::GEOM_Object_ptr theCenter,
199                                          GEOM::GEOM_Object_ptr theVector,
200                                          CORBA::Double theR);
201   GEOM::GEOM_Object_ptr MakeDiskThreePnt (GEOM::GEOM_Object_ptr thePnt1,
202                                           GEOM::GEOM_Object_ptr thePnt2,
203                                           GEOM::GEOM_Object_ptr thePnt3);
204   GEOM::GEOM_Object_ptr MakeDiskR (CORBA::Double theR,
205                                    CORBA::Short  theOrientation);
206   GEOM::GEOM_Object_ptr MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
207                                               GEOM::GEOM_Object_ptr theAxis,
208                                               CORBA::Double theRadius,
209                                               CORBA::Double theHeight);
210   GEOM::GEOM_Object_ptr MakeCylinderRH (CORBA::Double theR, 
211                                         CORBA::Double theH);
212   GEOM::GEOM_Object_ptr MakeSphere (CORBA::Double theX,
213                                     CORBA::Double theY,
214                                     CORBA::Double theZ,
215                                     CORBA::Double theRadius);
216   GEOM::GEOM_Object_ptr MakeSphereR (CORBA::Double theR);
217   GEOM::GEOM_Object_ptr MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt, 
218                                         CORBA::Double theR);
219   GEOM::GEOM_Object_ptr MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
220                                            GEOM::GEOM_Object_ptr theVec,
221                                            CORBA::Double theRMajor,
222                                            CORBA::Double theRMinor);
223   GEOM::GEOM_Object_ptr MakeTorusRR (CORBA::Double theRMajor,
224                                      CORBA::Double theRMinor);
225   GEOM::GEOM_Object_ptr MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
226                                              GEOM::GEOM_Object_ptr theAxis,
227                                              CORBA::Double theR1,
228                                              CORBA::Double theR2,
229                                              CORBA::Double theHeight);
230   GEOM::GEOM_Object_ptr MakeConeR1R2H (CORBA::Double theR1, 
231                                        CORBA::Double theR2, 
232                                        CORBA::Double theHeight);
233   GEOM::GEOM_Object_ptr MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
234                                        GEOM::GEOM_Object_ptr theVec,
235                                        CORBA::Double         theH);
236   GEOM::GEOM_Object_ptr MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
237                                             GEOM::GEOM_Object_ptr theVec,
238                                             CORBA::Double         theH);
239   GEOM::GEOM_Object_ptr MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
240                                          GEOM::GEOM_Object_ptr thePoint1,
241                                          GEOM::GEOM_Object_ptr thePoint2);
242   GEOM::GEOM_Object_ptr MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
243                                               GEOM::GEOM_Object_ptr thePoint1,
244                                               GEOM::GEOM_Object_ptr thePoint2);
245   GEOM::GEOM_Object_ptr MakePrismDXDYDZ (GEOM::GEOM_Object_ptr theBase,
246                                          CORBA::Double         theDX,
247                                          CORBA::Double         theDY,
248                                          CORBA::Double         theDZ);
249   GEOM::GEOM_Object_ptr MakePrismDXDYDZ2Ways (GEOM::GEOM_Object_ptr theBase,
250                                               CORBA::Double         theDX,
251                                               CORBA::Double         theDY,
252                                               CORBA::Double         theDZ);
253   GEOM::GEOM_Object_ptr MakePipe (GEOM::GEOM_Object_ptr theBase, 
254                                   GEOM::GEOM_Object_ptr thePath);
255   GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
256                                                  GEOM::GEOM_Object_ptr theAxis,
257                                                  CORBA::Double theAngle);
258   GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
259                                                       GEOM::GEOM_Object_ptr theAxis,
260                                                       CORBA::Double theAngle);
261   GEOM::GEOM_Object_ptr MakeFilling (GEOM::GEOM_Object_ptr theShape,
262                                      CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
263                                      CORBA::Double theTol2D, CORBA::Double theTol3D,
264                                      CORBA::Long theNbIter, CORBA::Boolean theApprox);
265
266   GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
267                                          CORBA::Boolean theModeSolid,
268                                          CORBA::Double thePreci,
269                                          CORBA::Boolean theRuled);
270   
271   GEOM::GEOM_Object_ptr MakePipeWithDifferentSections(const GEOM::ListOfGO& theBases,
272                                                       const GEOM::ListOfGO& theLocations,
273                                                       GEOM::GEOM_Object_ptr thePath,
274                                                       CORBA::Boolean theWithContact,
275                                                       CORBA::Boolean theWithCorrections);
276   
277   GEOM::GEOM_Object_ptr MakePipeWithShellSections(const GEOM::ListOfGO& theBases,
278                                                   const GEOM::ListOfGO& theSubBases,
279                                                   const GEOM::ListOfGO& theLocations,
280                                                   GEOM::GEOM_Object_ptr thePath,
281                                                   CORBA::Boolean theWithContact,
282                                                   CORBA::Boolean theWithCorrections);
283
284   GEOM::GEOM_Object_ptr MakePipeShellsWithoutPath(const GEOM::ListOfGO& theBases,
285                                                   const GEOM::ListOfGO& theLocations);
286   
287   GEOM::GEOM_Object_ptr MakePipeBiNormalAlongVector (GEOM::GEOM_Object_ptr theBase,
288                                                      GEOM::GEOM_Object_ptr thePath,
289                                                      GEOM::GEOM_Object_ptr theVec);
290
291   //-----------------------------------------------------------//
292   // BooleanOperations                                         //
293   //-----------------------------------------------------------//
294   GEOM::GEOM_Object_ptr MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
295                                      GEOM::GEOM_Object_ptr theShape2,
296                                      CORBA::Long theOperation);
297   GEOM::GEOM_Object_ptr MakeFuse (GEOM::GEOM_Object_ptr theShape1,
298                                   GEOM::GEOM_Object_ptr theShape2);
299   GEOM::GEOM_Object_ptr MakePartition (GEOM::GEOM_List_ptr   theShapes,
300                                        GEOM::GEOM_List_ptr   theTools,
301                                        GEOM::GEOM_List_ptr   theKeepInside,
302                                        GEOM::GEOM_List_ptr   theRemoveInside,
303                                        CORBA::Short      theLimit,
304                                        CORBA::Boolean    theRemoveWebs,
305                                        GEOM::GEOM_List_ptr theMaterials,
306                                        CORBA::Short theKeepNonlimitShapes);
307   GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
308                                            GEOM::GEOM_Object_ptr thePlane);
309
310   //-----------------------------------------------------------//
311   // InsertOperations                                          //
312   //-----------------------------------------------------------//
313   GEOM::GEOM_Object_ptr MakeCopy (GEOM::GEOM_Object_ptr theOriginal);
314   void Export (GEOM::GEOM_Object_ptr theObject, 
315                const char*           theFileName, 
316                const char*           theFormatName);
317   GEOM::GEOM_Object_ptr Import (const char* theFileName, 
318                                 const char* theFormatName);
319   void ImportTranslators (GEOM::string_array_out theFormats,
320                           GEOM::string_array_out thePatterns);
321   void ExportTranslators (GEOM::string_array_out theFormats,
322                           GEOM::string_array_out thePatterns);
323
324   //-----------------------------------------------------------//
325   // TransformOperations                                       //
326   //-----------------------------------------------------------//
327   GEOM::GEOM_Object_ptr TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
328                                             GEOM::GEOM_Object_ptr thePoint1,
329                                             GEOM::GEOM_Object_ptr thePoint2);
330   GEOM::GEOM_Object_ptr TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
331                                                 GEOM::GEOM_Object_ptr thePoint1,
332                                                 GEOM::GEOM_Object_ptr thePoint2);
333   GEOM::GEOM_Object_ptr TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
334                                          CORBA::Double theDX, 
335                                          CORBA::Double theDY, 
336                                          CORBA::Double theDZ);
337   GEOM::GEOM_Object_ptr TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
338                                              CORBA::Double theDX, 
339                                              CORBA::Double theDY, 
340                                              CORBA::Double theDZ);
341   GEOM::GEOM_Object_ptr TranslateVector (GEOM::GEOM_Object_ptr theObject,
342                                          GEOM::GEOM_Object_ptr theVector);
343   GEOM::GEOM_Object_ptr TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
344                                              GEOM::GEOM_Object_ptr theVector);
345   GEOM::GEOM_Object_ptr TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
346                                                  GEOM::GEOM_Object_ptr theVector,
347                                                  CORBA::Double theDistance,
348                                                  CORBA::Boolean theCopy);
349   GEOM::GEOM_Object_ptr MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
350                                           GEOM::GEOM_Object_ptr theVector,
351                                           CORBA::Double theStep,
352                                           CORBA::Long theNbTimes);
353   GEOM::GEOM_Object_ptr MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
354                                           GEOM::GEOM_Object_ptr theVector1,
355                                           CORBA::Double theStep1,
356                                           CORBA::Long theNbTimes1,
357                                           GEOM::GEOM_Object_ptr theVector2,
358                                           CORBA::Double theStep2,
359                                           CORBA::Long theNbTimes2);
360   GEOM::GEOM_Object_ptr Rotate (GEOM::GEOM_Object_ptr theObject,
361                                 GEOM::GEOM_Object_ptr theAxis,
362                                 CORBA::Double theAngle);
363   GEOM::GEOM_Object_ptr RotateCopy (GEOM::GEOM_Object_ptr theObject,
364                                     GEOM::GEOM_Object_ptr theAxis,
365                                     CORBA::Double theAngle);
366
367   GEOM::GEOM_Object_ptr RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
368                                            GEOM::GEOM_Object_ptr theCentPoint,
369                                            GEOM::GEOM_Object_ptr thePoint1,
370                                            GEOM::GEOM_Object_ptr thePoint2);
371
372   GEOM::GEOM_Object_ptr RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
373                                                GEOM::GEOM_Object_ptr theCentPoint,
374                                                GEOM::GEOM_Object_ptr thePoint1,
375                                                GEOM::GEOM_Object_ptr thePoint2);
376
377   GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
378                                        GEOM::GEOM_Object_ptr theAxis,
379                                        CORBA::Long theNbTimes);
380   GEOM::GEOM_Object_ptr MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
381                                        GEOM::GEOM_Object_ptr theAxis,
382                                        CORBA::Double theAngle,
383                                        CORBA::Long theNbTimes1,
384                                        CORBA::Double theStep,
385                                        CORBA::Long theNbTimes2);
386   GEOM::GEOM_Object_ptr MirrorPlane (GEOM::GEOM_Object_ptr theObject, 
387                                      GEOM::GEOM_Object_ptr thePlane);
388   GEOM::GEOM_Object_ptr MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject, 
389                                          GEOM::GEOM_Object_ptr thePlane);
390   GEOM::GEOM_Object_ptr MirrorAxis (GEOM::GEOM_Object_ptr theObject, 
391                                     GEOM::GEOM_Object_ptr theAxis);
392   GEOM::GEOM_Object_ptr MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject, 
393                                         GEOM::GEOM_Object_ptr theAxis);
394   GEOM::GEOM_Object_ptr MirrorPoint (GEOM::GEOM_Object_ptr theObject, 
395                                      GEOM::GEOM_Object_ptr thePoint);
396   GEOM::GEOM_Object_ptr MirrorPointCopy (GEOM::GEOM_Object_ptr theObject, 
397                                          GEOM::GEOM_Object_ptr thePoint);
398   GEOM::GEOM_Object_ptr OffsetShape (GEOM::GEOM_Object_ptr theObject, 
399                                      CORBA::Double theOffset);
400   GEOM::GEOM_Object_ptr OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject, 
401                                          CORBA::Double theOffset);
402   GEOM::GEOM_Object_ptr ScaleShape (GEOM::GEOM_Object_ptr theObject, 
403                                     GEOM::GEOM_Object_ptr thePoint,
404                                     CORBA::Double theFactor);
405   GEOM::GEOM_Object_ptr ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject, 
406                                         GEOM::GEOM_Object_ptr thePoint,
407                                         CORBA::Double theFactor);
408   GEOM::GEOM_Object_ptr ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject,
409                                              GEOM::GEOM_Object_ptr thePoint,
410                                              CORBA::Double theFactorX,
411                                              CORBA::Double theFactorY,
412                                              CORBA::Double theFactorZ);
413   GEOM::GEOM_Object_ptr ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject,
414                                                  GEOM::GEOM_Object_ptr thePoint,
415                                                  CORBA::Double theFactorX,
416                                                  CORBA::Double theFactorY,
417                                                  CORBA::Double theFactorZ);
418   GEOM::GEOM_Object_ptr PositionShape (GEOM::GEOM_Object_ptr theObject,
419                                        GEOM::GEOM_Object_ptr theStartLCS,
420                                        GEOM::GEOM_Object_ptr theEndLCS);
421   GEOM::GEOM_Object_ptr PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
422                                            GEOM::GEOM_Object_ptr theStartLCS,
423                                            GEOM::GEOM_Object_ptr theEndLCS);
424   GEOM::GEOM_Object_ptr PositionAlongPath (GEOM::GEOM_Object_ptr theObject,
425                                            GEOM::GEOM_Object_ptr thePath,
426                                            CORBA::Double         theDistance,
427                                            CORBA::Boolean        theCopy,
428                                            CORBA::Boolean        theReverse);
429
430   //-----------------------------------------------------------//
431   // ShapesOperations                                          //
432   //-----------------------------------------------------------//
433   GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
434                                   GEOM::GEOM_Object_ptr thePnt2);
435   GEOM::GEOM_Object_ptr MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires);
436   GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
437                                   CORBA::Boolean isPlanarWanted);
438   GEOM::GEOM_Object_ptr MakeFaceWires (GEOM::GEOM_List_ptr theWires,
439                                        CORBA::Boolean isPlanarWanted);
440   GEOM::GEOM_Object_ptr MakeShell (GEOM::GEOM_List_ptr theFacesAndShells);
441   GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
442   GEOM::GEOM_Object_ptr MakeSolidShells (GEOM::GEOM_List_ptr theShells);
443   GEOM::GEOM_Object_ptr MakeCompound (GEOM::GEOM_List_ptr theShapes);
444   GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
445                                        CORBA::Double theTolerance,
446                                        CORBA::Boolean doKeepNonSolids);
447   GEOM::GEOM_List_ptr GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
448                                     CORBA::Double theTolerance);
449   GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
450                                              CORBA::Double theTolerance,
451                                              const GEOM::ListOfGO& theFaces,
452                                              CORBA::Boolean doKeepNonSolids);
453   GEOM::GEOM_List_ptr MakeExplode (GEOM::GEOM_Object_ptr theShape,
454                                        CORBA::Long theShapeType,
455                                        CORBA::Boolean isSorted);
456   CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
457   CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
458   GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
459
460   GEOM::GEOM_List_ptr GetShapesOnShape (GEOM::GEOM_Object_ptr theCheckShape,
461                                         GEOM::GEOM_Object_ptr theShape,
462                                         CORBA::Short theShapeType,
463                                         GEOM::shape_state theState);
464   GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
465                                        (GEOM::GEOM_Object_ptr theCheckShape,
466                                         GEOM::GEOM_Object_ptr theShape,
467                                         CORBA::Short theShapeType,
468                                         GEOM::shape_state theState);
469
470
471   //-----------------------------------------------------------//
472   // BlocksOperations                                          //
473   //-----------------------------------------------------------//
474   GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
475                                            GEOM::GEOM_Object_ptr thePnt2,
476                                            GEOM::GEOM_Object_ptr thePnt3,
477                                            GEOM::GEOM_Object_ptr thePnt4);
478   GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
479                                   GEOM::GEOM_Object_ptr theEdge2,
480                                   GEOM::GEOM_Object_ptr theEdge3,
481                                   GEOM::GEOM_Object_ptr theEdge4);
482   GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
483                                         GEOM::GEOM_Object_ptr theEdge2);
484   GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1,
485                                   GEOM::GEOM_Object_ptr theFace2,
486                                   GEOM::GEOM_Object_ptr theFace3,
487                                   GEOM::GEOM_Object_ptr theFace4,
488                                   GEOM::GEOM_Object_ptr theFace5,
489                                   GEOM::GEOM_Object_ptr theFace6);
490   GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
491                                         GEOM::GEOM_Object_ptr theFace2);
492   GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape,
493                                   CORBA::Double   theX,
494                                   CORBA::Double   theY,
495                                   CORBA::Double   theZ,
496                                   CORBA::Double   theEpsilon);
497   GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape,
498                                  GEOM::GEOM_Object_ptr thePoint1,
499                                  GEOM::GEOM_Object_ptr thePoint2);
500   GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
501                                           GEOM::GEOM_Object_ptr thePoint);
502   GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
503                                          GEOM::GEOM_Object_ptr thePoint1,
504                                          GEOM::GEOM_Object_ptr thePoint2,
505                                          GEOM::GEOM_Object_ptr thePoint3,
506                                          GEOM::GEOM_Object_ptr thePoint4);
507   GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
508                                         GEOM::GEOM_Object_ptr theEdge1,
509                                         GEOM::GEOM_Object_ptr theEdge2);
510   GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
511                                          GEOM::GEOM_Object_ptr theFace);
512   GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
513                                           GEOM::GEOM_Object_ptr thePoint);
514   GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
515                                           GEOM::GEOM_Object_ptr theVector);
516   CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
517                                      CORBA::Long     theMinNbFaces,
518                                      CORBA::Long     theMaxNbFaces,
519                                      CORBA::Long&          theNbBlocks);
520   CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
521                                         GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors);
522   char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
523                        const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors);
524   GEOM::GEOM_List_ptr ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
525                                                    CORBA::Long     theMinNbFaces,
526                                                    CORBA::Long     theMaxNbFaces);
527   GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
528                                            GEOM::GEOM_Object_ptr thePoint);
529   GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
530                                          GEOM::GEOM_List_ptr theParts);
531   GEOM::GEOM_List_ptr GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
532                                             GEOM::GEOM_List_ptr theParts);
533   GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
534                                                    CORBA::Long     theDirFace1,
535                                                    CORBA::Long     theDirFace2,
536                                                    CORBA::Long     theNbTimes);
537   GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock,
538                                                    CORBA::Long     theDirFace1U,
539                                                    CORBA::Long     theDirFace2U,
540                                                    CORBA::Long     theNbTimesU,
541                                                    CORBA::Long     theDirFace1V,
542                                                    CORBA::Long     theDirFace2V,
543                                                    CORBA::Long     theNbTimesV);
544
545   //-----------------------------------------------------------//
546   // CurvesOperations                                          //
547   //-----------------------------------------------------------//
548   GEOM::GEOM_Object_ptr MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
549                                            GEOM::GEOM_Object_ptr theVector,
550                                            CORBA::Double theR);
551   GEOM::GEOM_Object_ptr MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
552                                             GEOM::GEOM_Object_ptr thePnt2,
553                                             GEOM::GEOM_Object_ptr thePnt3);
554   GEOM::GEOM_Object_ptr MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
555                                               GEOM::GEOM_Object_ptr thePnt2,
556                                               GEOM::GEOM_Object_ptr thePnt3);
557   GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
558                                      GEOM::GEOM_Object_ptr theVector,
559                                      CORBA::Double theRMajor, CORBA::Double theRMinor);
560   GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1,
561                                  GEOM::GEOM_Object_ptr thePnt2,
562                                  GEOM::GEOM_Object_ptr thePnt3);
563   GEOM::GEOM_Object_ptr MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
564                                        GEOM::GEOM_Object_ptr thePnt1,
565                                        GEOM::GEOM_Object_ptr thePnt2,
566                                        CORBA::Boolean theSense);
567   GEOM::GEOM_Object_ptr MakeArcOfEllipse (GEOM::GEOM_Object_ptr thePnt1,
568                                           GEOM::GEOM_Object_ptr thePnt2,
569                                           GEOM::GEOM_Object_ptr thePnt3);
570   GEOM::GEOM_Object_ptr MakePolyline (GEOM::GEOM_List_ptr thePoints);
571   GEOM::GEOM_Object_ptr MakeSplineBezier (GEOM::GEOM_List_ptr thePoints);
572   GEOM::GEOM_Object_ptr MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints);
573   GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand, 
574                                                 GEOM::GEOM_List_ptr theWorkingPlane);
575   GEOM::GEOM_Object_ptr Make3DSketcher (GEOM::GEOM_List_ptr theCoordinates);
576
577   //-----------------------------------------------------------//
578   // LocalOperations                                           //
579   //-----------------------------------------------------------//
580   GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
581                                        CORBA::Double theR);
582   GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
583                                          GEOM::GEOM_List_ptr theEdges);
584   GEOM::GEOM_Object_ptr MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
585                                              CORBA::Double theR2, GEOM::GEOM_List_ptr theEdges);
586   GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
587                                          GEOM::GEOM_List_ptr theFaces);
588   GEOM::GEOM_Object_ptr MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
589                                              CORBA::Double theR2, GEOM::GEOM_List_ptr theFaces);
590   GEOM::GEOM_Object_ptr MakeFillet2D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
591                                       GEOM::GEOM_List_ptr theVertexes);
592   GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
593   GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
594                                          CORBA::Double theD1, CORBA::Double theD2,
595                                          CORBA::Long theFace1, CORBA::Long theFace2);
596   GEOM::GEOM_Object_ptr MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
597                                            CORBA::Double theD, CORBA::Double theAngle,
598                                            CORBA::Long theFace1, CORBA::Long theFace2);
599   GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
600                                           CORBA::Double theD1, CORBA::Double theD2,
601                                           GEOM::GEOM_List_ptr theFaces);
602   GEOM::GEOM_Object_ptr MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
603                                             CORBA::Double theD, CORBA::Double theAngle,
604                                             GEOM::GEOM_List_ptr theFaces);
605   GEOM::GEOM_Object_ptr MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
606                                           CORBA::Double theD1, CORBA::Double theD2,
607                                           GEOM::GEOM_List_ptr theEdges);
608   GEOM::GEOM_Object_ptr MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
609                                             CORBA::Double theD, CORBA::Double theAngle,
610                                             GEOM::GEOM_List_ptr theEdges);
611   GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
612                                        CORBA::Double theWeight,
613                                        CORBA::Double theWaterDensity,
614                                        CORBA::Double theMeshingDeflection);
615   CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
616                                 GEOM::GEOM_Object_ptr theSubShape);
617
618   //-----------------------------------------------------------//
619   // GroupOperations                                           //
620   //-----------------------------------------------------------//
621   GEOM::GEOM_Object_ptr CreateGroup (GEOM::GEOM_Object_ptr theMainShape, 
622                                      CORBA::Long theShapeType);
623   void AddObject (GEOM::GEOM_Object_ptr theGroup, 
624                   CORBA::Long theSubShapeId);
625   void RemoveObject (GEOM::GEOM_Object_ptr theGroup, 
626                      CORBA::Long theSubShapeId);
627   CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup);
628   GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup);
629   GEOM::GEOM_List_ptr GetObjects (GEOM::GEOM_Object_ptr theGroup);
630   
631 private:
632   SALOME_NamingService *  name_service; 
633   GEOM::GEOM_Gen_var      myGeomEngine;
634   CORBA::Long             myStudyID;
635   CORBA::Long             myLastStudyID; // mkr : PAL10770
636   PortableServer::POA_var myPOA;
637   
638   GEOM::GEOM_IBasicOperations_var     myBasicOp;
639   GEOM::GEOM_I3DPrimOperations_var    my3DPrimOp;
640   GEOM::GEOM_IBooleanOperations_var   myBoolOp;
641   GEOM::GEOM_IInsertOperations_var    myInsOp;
642   GEOM::GEOM_ITransformOperations_var myTransfOp;
643   GEOM::GEOM_IShapesOperations_var    myShapesOp;
644   GEOM::GEOM_IBlocksOperations_var    myBlocksOp;
645   GEOM::GEOM_ICurvesOperations_var    myCurvesOp;
646   GEOM::GEOM_ILocalOperations_var     myLocalOp;
647   GEOM::GEOM_IGroupOperations_var     myGroupOp;
648
649 };
650
651 #endif