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