Salome HOME
NPAL 12483 Translate an object vector distance
[modules/geom.git] / src / GEOM_I_Superv / GEOM_Superv_i.cc
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20
21 #include "GEOM_Superv_i.hh"
22 #include "SALOME_LifeCycleCORBA.hxx"
23
24 #include CORBA_SERVER_HEADER(SALOME_Session)
25 #include "SALOMEDSClient_ClientFactory.hxx"
26
27 #define isNewStudy(a,b) (a > 0 && a != b)
28
29 using namespace std;
30 //=============================================================================
31 //  constructor:
32 //=============================================================================
33 GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
34                              PortableServer::POA_ptr poa,
35                              PortableServer::ObjectId * contId, 
36                              const char *instanceName, 
37                              const char *interfaceName) :
38   Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
39 {
40   MESSAGE("GEOM_Superv_i::GEOM_Superv_i");
41
42   _thisObj = this ;
43   _id = _poa->activate_object(_thisObj);
44   name_service = new SALOME_NamingService(_orb);
45   //get RootPOA (the default)
46   //myPOA = PortableServer::RefCountServantBase::_default_POA();
47   CORBA::Object_var anObj = _orb->resolve_initial_references("RootPOA");
48   myPOA = PortableServer::POA::_narrow(anObj);
49
50   setGeomEngine();
51
52   myStudyID = -1;
53   myLastStudyID = -1;
54
55   myBasicOp = GEOM::GEOM_IBasicOperations::_nil();
56   my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil();
57   myBoolOp = GEOM::GEOM_IBooleanOperations::_nil();
58   myInsOp = GEOM::GEOM_IInsertOperations::_nil();
59   myTransfOp = GEOM::GEOM_ITransformOperations::_nil();
60   myShapesOp = GEOM::GEOM_IShapesOperations::_nil();
61   myBlocksOp = GEOM::GEOM_IBlocksOperations::_nil();
62   myCurvesOp = GEOM::GEOM_ICurvesOperations::_nil();
63   myLocalOp = GEOM::GEOM_ILocalOperations::_nil();
64   myGroupOp = GEOM::GEOM_IGroupOperations::_nil();
65 }
66
67 //=============================================================================
68 //  destructor
69 //=============================================================================
70 GEOM_Superv_i::~GEOM_Superv_i()
71 {
72   MESSAGE("GEOM_Superv_i::~GEOM_Superv_i");
73   if (!CORBA::is_nil(myBasicOp))
74     myBasicOp->Destroy();
75   if (!CORBA::is_nil(myBoolOp))
76     myBoolOp->Destroy();
77   if (!CORBA::is_nil(my3DPrimOp))
78     my3DPrimOp->Destroy();
79   delete name_service;
80 }
81
82 //============================================================================
83 // function : register() 
84 // purpose  : register 'name' in 'name_service'
85 //============================================================================
86 void GEOM_Superv_i::register_name(char * name)
87 {
88   GEOM::GEOM_Superv_var g = _this();
89   name_service->Register(g, name); 
90 }
91
92 //=============================================================================
93 //  setGEOMEngine:
94 //=============================================================================
95 void GEOM_Superv_i::setGeomEngine()
96 {
97   if ( !CORBA::is_nil(myGeomEngine) ) 
98     return;
99
100   // get GEOM_Gen engine
101   Engines::Container_var cont=GetContainerRef();
102   CORBA::String_var container_name=cont->name();
103   std::string shortName=container_name.in();
104   shortName=shortName.substr(12); // substract "/Containers/"
105   SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
106   Engines::Component_var comp = lcc->FindOrLoad_Component( shortName.c_str(), "GEOM" );
107   delete lcc;
108
109   myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
110 }
111
112 //=============================================================================
113 //  SetStudyID:
114 //=============================================================================
115 void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
116 {
117   // mkr : PAL10770 -->
118   myLastStudyID = myStudyID;
119
120   CORBA::Object_ptr anObject = name_service->Resolve("/Kernel/Session");
121   if ( !CORBA::is_nil(anObject) ) {
122     SALOME::Session_var aSession = SALOME::Session::_narrow(anObject);
123     if ( !CORBA::is_nil(aSession) ) {
124       int aStudyID = aSession->GetActiveStudyId();
125       if ( theId != aStudyID && aStudyID > 0) { // mkr : IPAL12128
126         MESSAGE("Warning : given study ID theId="<<theId<<" is wrong and will be replaced by the value "<<aStudyID);
127         myStudyID = aStudyID;
128       }
129       else
130         myStudyID = theId; // mkr : IPAL12128
131     }
132   }
133   
134   if ( isNewStudy(myLastStudyID,myStudyID) ) {
135     if (CORBA::is_nil(myGeomEngine)) setGeomEngine();
136     string anEngine = _orb->object_to_string( myGeomEngine );
137     
138     CORBA::Object_var anObj = name_service->Resolve("/myStudyManager");
139     if ( !CORBA::is_nil(anObj) ) {
140       SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(anObj);
141       if ( !CORBA::is_nil(aStudyManager) ) {
142         _PTR(Study) aDSStudy = ClientFactory::Study(aStudyManager->GetStudyByID(myStudyID));
143         if ( aDSStudy ) {
144           _PTR(SComponent) aSCO = aDSStudy->FindComponent(myGeomEngine->ComponentDataType());
145           if ( aSCO ) {
146             _PTR(StudyBuilder) aBuilder = aDSStudy->NewBuilder();
147             if ( aBuilder ) aBuilder->LoadWith( aSCO, anEngine );
148           }
149         }
150       }
151     }
152   }
153   // mkr : PAL10770 <--
154 }
155
156 //=============================================================================
157 //  CreateListOfGO:
158 //=============================================================================
159 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfGO()
160 {
161   MESSAGE("GEOM_Superv_i::CreateListOfGO()");
162   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>();
163   return aListPtr->_this();
164 }
165
166 //=============================================================================
167 //  AddItemToListOfGO:
168 //=============================================================================
169 void GEOM_Superv_i::AddItemToListOfGO(GEOM::GEOM_List_ptr& theList, 
170                                       GEOM::GEOM_Object_ptr    theObject)
171 {
172   MESSAGE("GEOM_Superv_i::AddItemToListOfGO(...)");
173   if (GEOM_List_i<GEOM::ListOfGO>* aList = 
174       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theList, myPOA).in())) {
175     aList->AddObject(theObject);
176     MESSAGE(" NewLength = "<<aList->GetList().length());
177   }
178 }
179
180 //=============================================================================
181 //  CreateListOfLong:
182 //=============================================================================
183 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfLong()
184 {
185   MESSAGE("GEOM_Superv_i::CreateListOfLong()");
186   GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>();
187   return aListPtr->_this();
188 }
189
190 //=============================================================================
191 //  AddItemToListOfLong:
192 //=============================================================================
193 void GEOM_Superv_i::AddItemToListOfLong(GEOM::GEOM_List_ptr& theList, 
194                                         CORBA::Long theObject)
195 {
196   MESSAGE("GEOM_Superv_i::AddItemToListOfLong(...)");
197   if (GEOM_List_i<GEOM::ListOfLong>* aList = 
198       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theList, myPOA).in())) {
199     aList->AddObject(theObject);
200     MESSAGE(" NewLength = "<<aList->GetList().length());
201   }
202 }
203
204 //=============================================================================
205 //  CreateListOfDouble:
206 //=============================================================================
207 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfDouble()
208 {
209   MESSAGE("GEOM_Superv_i::CreateListOfDouble()");
210   GEOM_List_i<GEOM::ListOfDouble>* aListPtr = new GEOM_List_i<GEOM::ListOfDouble>();
211   return aListPtr->_this();
212 }
213
214 //=============================================================================
215 //  AddItemToListOfDouble:
216 //=============================================================================
217 void GEOM_Superv_i::AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList, 
218                                           CORBA::Double theObject)
219 {
220   MESSAGE("GEOM_Superv_i::AddItemToListOfDouble(...)");
221   if (GEOM_List_i<GEOM::ListOfDouble>* aList = 
222       dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theList, myPOA).in())) {
223     aList->AddObject(theObject);
224     MESSAGE(" NewLength = "<<aList->GetList().length());
225   }
226 }
227
228 //=============================================================================
229 //  getBasicOp:
230 //=============================================================================
231 void GEOM_Superv_i::getBasicOp()
232 {
233   if (CORBA::is_nil(myGeomEngine))
234     setGeomEngine();
235   // get GEOM_IBasicOperations interface
236   if (CORBA::is_nil(myBasicOp) || isNewStudy(myLastStudyID,myStudyID))
237     myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
238 }
239
240 //=============================================================================
241 //  get3DPrimOp:
242 //=============================================================================
243 void GEOM_Superv_i::get3DPrimOp()
244 {
245   if (CORBA::is_nil(myGeomEngine))
246     setGeomEngine();
247   // get GEOM_I3DPrimOperations interface
248   if (CORBA::is_nil(my3DPrimOp) || isNewStudy(myLastStudyID,myStudyID))
249     my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
250 }
251
252 //=============================================================================
253 //  getBoolOp:
254 //=============================================================================
255 void GEOM_Superv_i::getBoolOp()
256 {
257   if (CORBA::is_nil(myGeomEngine))
258     setGeomEngine();
259   // get GEOM_IBooleanOperations interface
260   if (CORBA::is_nil(myBoolOp) || isNewStudy(myLastStudyID,myStudyID))
261     myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
262 }
263
264 //=============================================================================
265 //  getInsOp:
266 //=============================================================================
267 void GEOM_Superv_i::getInsOp()
268 {
269   if (CORBA::is_nil(myGeomEngine))
270     setGeomEngine();
271   // get GEOM_IInsertOperations interface
272   if (CORBA::is_nil(myInsOp) || isNewStudy(myLastStudyID,myStudyID))
273     myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
274 }
275
276 //=============================================================================
277 //  getTransfOp:
278 //=============================================================================
279 void GEOM_Superv_i::getTransfOp()
280 {
281   if (CORBA::is_nil(myGeomEngine))
282     setGeomEngine();
283   // get GEOM_ITransformOperations interface
284   if (CORBA::is_nil(myTransfOp) || isNewStudy(myLastStudyID,myStudyID))
285     myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
286 }
287
288 //=============================================================================
289 //  getShapesOp:
290 //=============================================================================
291 void GEOM_Superv_i::getShapesOp()
292 {
293   if (CORBA::is_nil(myGeomEngine))
294     setGeomEngine();
295   // get GEOM_IShapesOperations interface
296   if (CORBA::is_nil(myShapesOp) || isNewStudy(myLastStudyID,myStudyID))
297     myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
298 }
299
300 //=============================================================================
301 //  getBlocksOp:
302 //=============================================================================
303 void GEOM_Superv_i::getBlocksOp()
304 {
305   if (CORBA::is_nil(myGeomEngine))
306     setGeomEngine();
307   // get GEOM_IBlocksOperations interface
308   if (CORBA::is_nil(myBlocksOp) || isNewStudy(myLastStudyID,myStudyID))
309     myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
310 }
311
312 //=============================================================================
313 //  getCurvesOp:
314 //=============================================================================
315 void GEOM_Superv_i::getCurvesOp()
316 {
317   if (CORBA::is_nil(myGeomEngine))
318     setGeomEngine();
319   // get GEOM_ICurvesOperations interface
320   if (CORBA::is_nil(myCurvesOp) || isNewStudy(myLastStudyID,myStudyID))
321     myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
322 }
323
324 //=============================================================================
325 //  getLocalOp:
326 //=============================================================================
327 void GEOM_Superv_i::getLocalOp()
328 {
329   if (CORBA::is_nil(myGeomEngine))
330     setGeomEngine();
331   // get GEOM_ILocalOperations interface
332   if (CORBA::is_nil(myLocalOp) || isNewStudy(myLastStudyID,myStudyID))
333     myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
334 }
335
336 //=============================================================================
337 //  getGroupOp:
338 //=============================================================================
339 void GEOM_Superv_i::getGroupOp()
340 {
341   if (CORBA::is_nil(myGeomEngine))
342     setGeomEngine();
343   // get GEOM_IGroupOperations interface
344   if (CORBA::is_nil(myGroupOp) || isNewStudy(myLastStudyID,myStudyID))
345     myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
346 }
347
348 //=============================================================================
349 //  GetServant:
350 //=============================================================================
351 PortableServer::ServantBase_var GEOM_Superv_i::GetServant(CORBA::Object_ptr       theObject,
352                                                           PortableServer::POA_ptr thePOA)
353 {
354   if(CORBA::is_nil(theObject))  return NULL;
355   PortableServer::Servant aServant = thePOA->reference_to_servant(theObject);
356   return aServant;
357 }
358
359 //============================================================================
360 // function : Save()
361 // purpose  : save OCAF/Geom document
362 //============================================================================
363 SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
364                                        const char* theURL,
365                                        CORBA::Boolean isMultiFile)
366 {
367   SALOMEDS::TMPFile_var aStreamFile;
368   return aStreamFile._retn();
369 }
370
371 //============================================================================
372 // function : SaveASCII()
373 // purpose  :
374 //============================================================================ 
375 SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
376                                             const char* theURL,
377                                             CORBA::Boolean isMultiFile)
378 {
379   SALOMEDS::TMPFile_var aStreamFile;
380   return aStreamFile._retn();
381 }
382
383 //============================================================================
384 // function : Load()
385 // purpose  :
386 //============================================================================ 
387 CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
388                                    const SALOMEDS::TMPFile& theStream,
389                                    const char* theURL,
390                                    CORBA::Boolean isMultiFile)
391 {
392   return false;
393 }
394
395 //============================================================================
396 // function : LoadASCII()
397 // purpose  :
398 //============================================================================ 
399 CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
400                                         const SALOMEDS::TMPFile& theStream,
401                                         const char* theURL,
402                                         CORBA::Boolean isMultiFile)
403 {
404   return false;
405 }
406
407 //============================================================================
408 // function : Close()
409 // purpose  :
410 //============================================================================
411 void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr theComponent)
412 {
413 }
414
415 //============================================================================
416 // function : ComponentDataType()
417 // purpose  :
418 //============================================================================
419 char* GEOM_Superv_i::ComponentDataType()
420 {
421   return 0;
422 }
423
424 //============================================================================
425 // function : IORToLocalPersistentID()
426 // purpose  :
427 //============================================================================
428 char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
429                                             const char* IORString,
430                                             CORBA::Boolean isMultiFile,
431                                             CORBA::Boolean isASCII)
432 {
433   return 0;
434 }
435
436 //============================================================================
437 // function : LocalPersistentIDToIOR()
438 // purpose  : Create/Load CORBA object from a persistent ref (an entry)
439 //          : Used when a study is loaded
440 //          : The IOR (IORName) of object created is returned
441 //============================================================================
442 char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
443                                             const char* aLocalPersistentID,
444                                             CORBA::Boolean isMultiFile,
445                                             CORBA::Boolean isASCII)
446 {
447   return 0;
448 }
449
450 //============================================================================
451 // function : CanPublishInStudy
452 // purpose  : 
453 //============================================================================
454 CORBA::Boolean GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
455 {
456   if (CORBA::is_nil(myGeomEngine))
457     setGeomEngine();
458   return myGeomEngine->CanPublishInStudy(theIOR);
459 }
460
461 //============================================================================
462 // function : PublishInStudy
463 // purpose  : 
464 //============================================================================
465 SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
466                                                     SALOMEDS::SObject_ptr theSObject,
467                                                     CORBA::Object_ptr theObject,
468                                                     const char* theName) throw (SALOME::SALOME_Exception)
469 {
470   if (CORBA::is_nil(myGeomEngine))
471     setGeomEngine();
472   return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
473 }
474
475 //============================================================================
476 // function : CanCopy()
477 // purpose  :
478 //============================================================================
479 CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr theObject)
480 {
481   return false;
482 }
483
484 //============================================================================
485 // function : CopyFrom()
486 // purpose  :
487 //============================================================================
488 SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID)
489 {
490   SALOMEDS::TMPFile_var aStreamFile;
491   return aStreamFile._retn();
492 }
493
494 //============================================================================
495 // function : CanPaste()
496 // purpose  :
497 //============================================================================
498 CORBA::Boolean GEOM_Superv_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID)
499 {
500   return false;
501 }
502
503 //============================================================================
504 // function : PasteInto()
505 // purpose  :
506 //============================================================================
507 SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& theStream,
508                                                CORBA::Long theObjectID,
509                                                SALOMEDS::SObject_ptr theObject)
510 {
511   SALOMEDS::SObject_var aNewSO;
512   return aNewSO._retn();
513 }
514
515 //================= Primitives Construction : BasicOperations =================
516 //=============================================================================
517 //  MakePointXYZ:
518 //=============================================================================
519 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointXYZ(CORBA::Double theX,
520                                                   CORBA::Double theY,
521                                                   CORBA::Double theZ)
522 {
523   beginService( " GEOM_Superv_i::MakePointXYZ" );
524   MESSAGE("GEOM_Superv_i::MakePointXYZ");
525   getBasicOp();
526   // make vertex and return
527   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointXYZ(theX, theY, theZ);
528   endService( " GEOM_Superv_i::MakePointXYZ" );
529   return anObj;
530 }
531
532 //=============================================================================
533 //  MakePointWithReference:
534 //=============================================================================
535 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
536                                                              CORBA::Double theX, 
537                                                              CORBA::Double theY, 
538                                                              CORBA::Double theZ)
539 {
540   beginService( " GEOM_Superv_i::MakePointWithReference" );
541   MESSAGE("GEOM_Superv_i::MakePointWithReference");
542   getBasicOp();
543   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointWithReference(theReference, theX, theY, theZ);
544   endService( " GEOM_Superv_i::MakePointWithReference" );
545   return anObj;
546 }
547
548 //=============================================================================
549 //  MakePointOnCurve:
550 //=============================================================================
551 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
552                                                        CORBA::Double theParameter)
553 {
554   beginService( " GEOM_Superv_i::MakePointOnCurve" );
555   MESSAGE("GEOM_Superv_i::MakePointOnCurve");
556   getBasicOp();
557   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointOnCurve(theRefCurve, theParameter);
558   endService( " GEOM_Superv_i::MakePointOnCurve" );
559   return anObj;
560 }
561
562 //=============================================================================
563 //  MakePointOnLinesIntersection:
564 //=============================================================================
565 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnLinesIntersection (GEOM::GEOM_Object_ptr theRefLine1,
566                                                                    GEOM::GEOM_Object_ptr theRefLine2)
567 {
568   beginService( " GEOM_Superv_i::MakePointOnLinesIntersection" );
569   MESSAGE("GEOM_Superv_i::MakePointOnLinesIntersection");
570   getBasicOp();
571   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointOnLinesIntersection(theRefLine1, theRefLine2);
572   endService( " GEOM_Superv_i::MakePointOnLinesIntersection" );
573   return anObj;
574 }
575
576 //=============================================================================
577 //  MakeTangentOnCurve:
578 //=============================================================================
579 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
580                                                          CORBA::Double theParameter)
581 {
582   beginService( " GEOM_Superv_i::MakeTangentOnCurve" );
583   MESSAGE("GEOM_Superv_i::MakeTangentOnCurve");
584   getBasicOp();
585   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeTangentOnCurve(theRefCurve, theParameter);
586   endService( " GEOM_Superv_i::MakeTangentOnCurve" );
587   return anObj;
588 }
589
590 //=============================================================================
591 //  MakeVectorDXDYDZ:
592 //=============================================================================
593 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorDXDYDZ (CORBA::Double theDX,
594                                                        CORBA::Double theDY,
595                                                        CORBA::Double theDZ)
596 {
597   beginService( " GEOM_Superv_i::MakeVectorDXDYDZ" );
598   MESSAGE("GEOM_Superv_i::MakeVectorDXDYDZ");
599   getBasicOp();
600   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeVectorDXDYDZ(theDX, theDY, theDZ);
601   endService( " GEOM_Superv_i::MakeVectorDXDYDZ" );
602   return anObj;
603 }
604
605 //=============================================================================
606 //  MakeVectorTwoPnt:
607 //=============================================================================
608 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
609                                                        GEOM::GEOM_Object_ptr thePnt2)
610 {
611   beginService( " GEOM_Superv_i::MakeVectorTwoPnt" );
612   MESSAGE("GEOM_Superv_i::MakeVector");
613   getBasicOp();
614   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeVectorTwoPnt(thePnt1, thePnt2);
615   endService( " GEOM_Superv_i::MakeVectorTwoPnt" );
616   return anObj;
617 }
618
619 //=============================================================================
620 //  MakeLineTwoPnt:
621 //=============================================================================
622 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
623                                                      GEOM::GEOM_Object_ptr thePnt2)
624 {
625   beginService( " GEOM_Superv_i::MakeLineTwoPnt");
626   MESSAGE("GEOM_Superv_i::MakeLineTwoPnt");
627   getBasicOp();
628   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeLineTwoPnt(thePnt1, thePnt2);
629   endService( " GEOM_Superv_i::MakeLineTwoPnt");
630   return anObj;
631 }
632
633 //=============================================================================
634 //  MakeLineTwoFaces:
635 //=============================================================================
636 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoFaces (GEOM::GEOM_Object_ptr theFace1,
637                                                        GEOM::GEOM_Object_ptr theFace2)
638 {
639   beginService( " GEOM_Superv_i::MakeLineTwoFaces");
640   MESSAGE("GEOM_Superv_i::MakeLineTwoFaces");
641   getBasicOp();
642   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeLineTwoFaces(theFace1, theFace2);
643   endService( " GEOM_Superv_i::MakeLineTwoFaces");
644   return anObj;
645 }
646
647 //=============================================================================
648 //  MakePlaneThreePnt:
649 //=============================================================================
650 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
651                                                         GEOM::GEOM_Object_ptr thePnt2,
652                                                         GEOM::GEOM_Object_ptr thePnt3,
653                                                         CORBA::Double theTrimSize)
654 {
655   beginService( " GEOM_Superv_i::MakePlaneThreePnt");
656   MESSAGE("GEOM_Superv_i::MakePlaneThreePnt");
657   getBasicOp();
658   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize);
659   endService( " GEOM_Superv_i::MakePlaneThreePnt");
660   return anObj;
661 }
662
663 //=============================================================================
664 //  MakePlanePntVec:
665 //=============================================================================
666 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
667                                                       GEOM::GEOM_Object_ptr theVec,
668                                                       CORBA::Double theTrimSize)
669
670   beginService( " GEOM_Superv_i::MakePlanePntVec" );
671   MESSAGE("GEOM_Superv_i::MakePlanePntVec");
672   getBasicOp();
673   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlanePntVec(thePnt, theVec, theTrimSize);
674   endService( " GEOM_Superv_i::MakePlanePntVec" );
675   return anObj;
676 }
677
678 //=============================================================================
679 //  MakePlaneFace:
680 //=============================================================================
681 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
682                                                     CORBA::Double theTrimSize)
683 {
684   beginService( " GEOM_Superv_i::MakePlaneFace" );
685   MESSAGE("GEOM_Superv_i::MakePlaneFace");
686   getBasicOp();
687   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlaneFace(theFace, theTrimSize);
688   endService( " GEOM_Superv_i::MakePlaneFace" );
689   return anObj;
690 }
691
692 //=============================================================================
693 //  MakeMarker:
694 //=============================================================================
695 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarker 
696 (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
697  CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
698  CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
699 {
700   beginService( " GEOM_Superv_i::MakeMarker" );
701   MESSAGE("GEOM_Superv_i::MakeMarker");
702   getBasicOp();
703   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeMarker(theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ);
704   endService( " GEOM_Superv_i::MakeMarker" );
705   return anObj;
706 }
707
708 //=============================================================================
709 //  MakeTangentPlaneOnFace:
710 //=============================================================================
711 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTangentPlaneOnFace (GEOM::GEOM_Object_ptr theFace, 
712                                                  CORBA::Double theParameterU,
713                                                  CORBA::Double theParameterV,
714                                                  CORBA::Double theTrimSize)
715 {
716   beginService( " GEOM_Superv_i::MakeTangentPlaneOnFace" );
717   MESSAGE("GEOM_Superv_i::MakeTangentPlaneOnFace");
718   getBasicOp();
719   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeTangentPlaneOnFace(theFace, theParameterU,theParameterV,theTrimSize);
720   endService( " GEOM_Superv_i::MakeTangentPlaneOnFace" );
721   return anObj;
722 }
723
724 //================= Primitives Construction : 3DPrimOperations ================
725 //=============================================================================
726 //  MakeBox:
727 //=============================================================================
728 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBox (CORBA::Double theX1,
729                                               CORBA::Double theY1,
730                                               CORBA::Double theZ1,
731                                               CORBA::Double theX2,
732                                               CORBA::Double theY2,
733                                               CORBA::Double theZ2)
734 {
735   beginService( " GEOM_Superv_i::MakeBox" );
736   MESSAGE("GEOM_Superv_i::MakeBox");
737   getBasicOp();
738   get3DPrimOp();
739   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1),
740                                                           myBasicOp->MakePointXYZ(theX2, theY2, theZ2));
741   endService( " GEOM_Superv_i::MakeBox" );
742   return anObj;
743 }
744
745 //=============================================================================
746 //  MakeBoxDXDYDZ:
747 //=============================================================================
748 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxDXDYDZ (CORBA::Double theDX, 
749                                                     CORBA::Double theDY, 
750                                                     CORBA::Double theDZ)
751 {
752   beginService( " GEOM_Superv_i::MakeBoxDXDYDZ" );
753   MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ");
754   get3DPrimOp();
755   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ);
756   endService( " GEOM_Superv_i::MakeBoxDXDYDZ" );
757   return anObj;
758 }
759
760 //=============================================================================
761 //  MakeBoxTwoPnt:
762 //=============================================================================
763 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1, 
764                                                     GEOM::GEOM_Object_ptr thePnt2)
765 {
766   beginService( " GEOM_Superv_i::MakeBoxTwoPnt" );
767   MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt");
768   get3DPrimOp();
769   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2);
770   endService( " GEOM_Superv_i::MakeBoxTwoPnt" );
771   return anObj;
772 }
773
774 //=============================================================================
775 //  MakeCylinderPntVecRH:
776 //=============================================================================
777 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
778                                                            GEOM::GEOM_Object_ptr theAxis,
779                                                            CORBA::Double theRadius,
780                                                            CORBA::Double theHeight)
781 {
782   beginService( " GEOM_Superv_i::MakeCylinderPntVecRH" );
783   MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH");
784   get3DPrimOp();
785   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight);
786   endService( " GEOM_Superv_i::MakeCylinderPntVecRH" );
787   return anObj;
788 }
789
790 //=============================================================================
791 //  MakeCylinderRH:
792 //=============================================================================
793 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR, 
794                                                      CORBA::Double theH)
795 {
796   beginService( " GEOM_Superv_i::MakeCylinderRH" );
797   MESSAGE("GEOM_Superv_i::MakeCylinderRH");
798   get3DPrimOp();
799   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderRH(theR, theH);
800   endService( " GEOM_Superv_i::MakeCylinderRH" );
801   return anObj; 
802 }
803
804 //=============================================================================
805 //  MakeSphere:
806 //=============================================================================
807 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere  (CORBA::Double theX,
808                                                   CORBA::Double theY,
809                                                   CORBA::Double theZ,
810                                                   CORBA::Double theRadius)
811 {
812   beginService( " GEOM_Superv_i::MakeSphepe" );
813   MESSAGE("GEOM_Superv_i::MakeSphepe");
814   getBasicOp();
815   get3DPrimOp();
816   GEOM::GEOM_Object_var o = myBasicOp->MakePointXYZ(theX, theY, theZ);
817   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(o, theRadius);
818   o->Destroy();
819   endService( " GEOM_Superv_i::MakeSphepe" );
820   return anObj;
821 }
822
823 //=============================================================================
824 //  MakeSphereR:
825 //=============================================================================
826 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
827 {
828   beginService( " GEOM_Superv_i::MakeSphereR" );
829   MESSAGE("GEOM_Superv_i::MakeSphereR");
830   get3DPrimOp();
831   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSphereR(theR);
832   endService( " GEOM_Superv_i::MakeSphereR" );
833   return anObj;
834 }
835
836 //=============================================================================
837 //  MakeSpherePntR:
838 //=============================================================================
839 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt, 
840                                                      CORBA::Double theR)
841 {
842   beginService( " GEOM_Superv_i::MakeSpherePntR" );
843   MESSAGE("GEOM_Superv_i::MakeSpherePntR");
844   get3DPrimOp();
845   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(thePnt, theR);
846   endService( " GEOM_Superv_i::MakeSpherePntR" );
847   return anObj;
848 }
849
850 //=============================================================================
851 //  MakeTorusPntVecRR:
852 //=============================================================================
853 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
854                                                         GEOM::GEOM_Object_ptr theVec,
855                                                         CORBA::Double theRMajor,
856                                                         CORBA::Double theRMinor)
857 {
858   beginService( " GEOM_Superv_i::MakeTorusPntVecRR" );
859   MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
860   get3DPrimOp();
861   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
862   endService( " GEOM_Superv_i::MakeTorusPntVecRR" );
863   return anObj;
864 }
865
866 //=============================================================================
867 //  MakeTorusRR:
868 //=============================================================================
869 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor,
870                                                   CORBA::Double theRMinor)
871 {
872   beginService( " GEOM_Superv_i::MakeTorusRR" );
873   MESSAGE("GEOM_Superv_i::MakeTorusRR");
874   get3DPrimOp();
875   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
876   endService( " GEOM_Superv_i::MakeTorusRR" );
877   return anObj;
878 }
879
880 //=============================================================================
881 //  MakeConePntVecR1R2H:
882 //=============================================================================
883 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
884                                                           GEOM::GEOM_Object_ptr theAxis,
885                                                           CORBA::Double theR1,
886                                                           CORBA::Double theR2,
887                                                           CORBA::Double theHeight)
888 {
889   beginService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
890   MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
891   get3DPrimOp();
892   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
893   endService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
894   return anObj;
895 }
896
897 //=============================================================================
898 //  MakeConeR1R2H:
899 //=============================================================================
900 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1, 
901                                                     CORBA::Double theR2, 
902                                                     CORBA::Double theHeight)
903 {
904   beginService( " GEOM_Superv_i::MakeConeR1R2H" );
905   MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
906   get3DPrimOp();
907   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
908   endService( " GEOM_Superv_i::MakeConeR1R2H" );
909   return anObj;
910 }
911
912 //=============================================================================
913 //  MakePrismVecH:
914 //=============================================================================
915 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
916                                                     GEOM::GEOM_Object_ptr theVec,
917                                                     CORBA::Double         theH)
918 {
919   beginService( " GEOM_Superv_i::MakePrismVecH" );
920   MESSAGE("GEOM_Superv_i::MakePrismVecH");
921   get3DPrimOp();
922   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
923   endService( " GEOM_Superv_i::MakePrismVecH" );
924   return anObj;
925 }
926
927 //=============================================================================
928 //  MakePrismVecH2Ways:
929 //=============================================================================
930 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
931                                                          GEOM::GEOM_Object_ptr theVec,
932                                                          CORBA::Double         theH)
933 {
934   beginService( " GEOM_Superv_i::MakePrismVecH2Ways" );
935   MESSAGE("GEOM_Superv_i::MakePrismVecH2Ways");
936   get3DPrimOp();
937   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH2Ways(theBase, theVec, theH);
938   endService( " GEOM_Superv_i::MakePrismVecH2Ways" );
939   return anObj;
940 }
941
942 //=============================================================================
943 //  MakePrismTwoPnt:
944 //=============================================================================
945 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
946                                                       GEOM::GEOM_Object_ptr thePoint1,
947                                                       GEOM::GEOM_Object_ptr thePoint2)
948 {
949   beginService( " GEOM_Superv_i::MakePrismTwoPnt" );
950   MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
951   get3DPrimOp();
952   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
953   endService( " GEOM_Superv_i::MakePrismTwoPnt" );
954   return anObj;
955 }
956
957 //=============================================================================
958 //  MakePrismTwoPnt2Ways:
959 //=============================================================================
960 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
961                                                            GEOM::GEOM_Object_ptr thePoint1,
962                                                            GEOM::GEOM_Object_ptr thePoint2)
963 {
964   beginService( " GEOM_Superv_i::MakePrismTwoPnt2Ways" );
965   MESSAGE("GEOM_Superv_i::MakePrismTwoPnt2Ways");
966   get3DPrimOp();
967   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2);
968   endService( " GEOM_Superv_i::MakePrismTwoPnt2Ways" );
969   return anObj;
970 }
971
972 //=============================================================================
973 //  MakePipe:
974 //=============================================================================
975 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase, 
976                                                GEOM::GEOM_Object_ptr thePath)
977 {
978   beginService( " GEOM_Superv_i::MakePipe" );
979   MESSAGE("GEOM_Superv_i::MakePipe");
980   get3DPrimOp();
981   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipe(theBase, thePath);
982   endService( " GEOM_Superv_i::MakePipe" );
983   return anObj;
984 }
985
986 //=============================================================================
987 //  MakeRevolutionAxisAngle:
988 //=============================================================================
989 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
990                                                               GEOM::GEOM_Object_ptr theAxis,
991                                                               CORBA::Double theAngle)
992 {
993   beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
994   MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
995   get3DPrimOp();
996   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
997   endService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
998   return anObj;
999 }
1000
1001 //=============================================================================
1002 //  MakeRevolutionAxisAngle:
1003 //=============================================================================
1004 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
1005                                                                    GEOM::GEOM_Object_ptr theAxis,
1006                                                                    CORBA::Double theAngle)
1007 {
1008   beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle2Ways" );
1009   MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle2Ways");
1010   get3DPrimOp();
1011   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle);
1012   endService( " GEOM_Superv_i::MakeRevolutionAxisAngle2Ways" );
1013   return anObj;
1014 }
1015
1016 //=============================================================================
1017 //  MakeFilling:
1018 //=============================================================================
1019 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
1020                                                   CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
1021                                                   CORBA::Double theTol2D, CORBA::Double theTol3D,
1022                                                   CORBA::Long theNbIter, CORBA::Boolean theApprox)
1023 {
1024   beginService( " GEOM_Superv_i::MakeFilling" );
1025   MESSAGE("GEOM_Superv_i::MakeFilling");
1026   get3DPrimOp();
1027   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theApprox);
1028   endService( " GEOM_Superv_i::MakeFilling" );
1029   return anObj;
1030 }
1031
1032 //============================= BooleanOperations =============================
1033 //=============================================================================
1034 //  MakeBoolean:
1035 //=============================================================================
1036 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
1037                                                   GEOM::GEOM_Object_ptr theShape2,
1038                                                   CORBA::Long theOperation)
1039 {
1040   beginService( " GEOM_Superv_i::MakeBoolean" );
1041   // theOperation indicates the operation to be done:
1042   // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
1043   MESSAGE("GEOM_Superv_i::MakeBoolean");
1044   getBoolOp();
1045   GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
1046   endService( " GEOM_Superv_i::MakeBoolean" );
1047   return anObj;
1048 }
1049
1050 //=============================================================================
1051 //  MakeThruSections:
1052 //=============================================================================
1053 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeThruSections(const GEOM::ListOfGO& theSeqSections,
1054                                          CORBA::Boolean theModeSolid,
1055                                          CORBA::Double thePreci,
1056                                          CORBA::Boolean theRuled)
1057 {
1058   beginService( " GEOM_Superv_i::MakeThruSections" );
1059   MESSAGE("GEOM_Superv_i::MakeThruSections");
1060   get3DPrimOp();
1061   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeThruSections(theSeqSections, theModeSolid,thePreci,theRuled);
1062   endService( " GEOM_Superv_i::MakeThruSections" );
1063   return anObj;
1064 }
1065
1066 //=============================================================================
1067 //  MakePipe:
1068 //=============================================================================
1069 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithDifferentSections
1070                      (const GEOM::ListOfGO& theBases,
1071                       const GEOM::ListOfGO& theLocations,
1072                       GEOM::GEOM_Object_ptr thePath,
1073                       CORBA::Boolean theWithContact,
1074                       CORBA::Boolean theWithCorrections)
1075 {
1076   beginService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
1077   MESSAGE("GEOM_Superv_i::MakePipeWithDifferentSections");
1078   get3DPrimOp();
1079   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipeWithDifferentSections(theBases,theLocations, thePath,theWithContact,theWithCorrections);
1080   endService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
1081   return anObj;
1082 }
1083
1084
1085 //=============================================================================
1086 //  MakePipe:
1087 //=============================================================================
1088 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithShellSections
1089                    (const GEOM::ListOfGO& theBases,
1090                     const GEOM::ListOfGO& theSubBases,
1091                     const GEOM::ListOfGO& theLocations,
1092                     GEOM::GEOM_Object_ptr thePath,
1093                     CORBA::Boolean theWithContact,
1094                     CORBA::Boolean theWithCorrections)
1095 {
1096   beginService( " GEOM_Superv_i::MakePipeWithShellSections" );
1097   MESSAGE("GEOM_Superv_i::MakePipeWithShellSections");
1098   get3DPrimOp();
1099   GEOM::GEOM_Object_ptr anObj =
1100     my3DPrimOp->MakePipeWithShellSections(theBases, theSubBases,
1101                                           theLocations, thePath,
1102                                           theWithContact, theWithCorrections);
1103   endService( " GEOM_Superv_i::MakePipeWithShellSections" );
1104   return anObj;
1105 }
1106
1107
1108 //=============================================================================
1109 //  MakePipe:
1110 //=============================================================================
1111 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeShellsWithoutPath
1112                    (const GEOM::ListOfGO& theBases,
1113                     const GEOM::ListOfGO& theLocations)
1114 {
1115   beginService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1116   MESSAGE("GEOM_Superv_i::MakePipeShellsWithoutPath");
1117   get3DPrimOp();
1118   GEOM::GEOM_Object_ptr anObj =
1119     my3DPrimOp->MakePipeShellsWithoutPath(theBases,theLocations);
1120   endService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1121   return anObj;
1122 }
1123
1124
1125 //=============================================================================
1126 //  MakeFuse:
1127 //=============================================================================
1128 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1,
1129                                                GEOM::GEOM_Object_ptr theShape2)
1130 {
1131   beginService( " GEOM_Superv_i::MakeFuse" );
1132   MESSAGE("GEOM_Superv_i::MakeFuse");
1133   getBoolOp();
1134   GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeBoolean(theShape1, theShape2, 3);
1135   endService( " GEOM_Superv_i::MakeFuse" );
1136   return anObj;
1137 }
1138
1139 //=============================================================================
1140 //  MakePartition:
1141 //=============================================================================
1142 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr   theShapes,
1143                                                     GEOM::GEOM_List_ptr   theTools,
1144                                                     GEOM::GEOM_List_ptr   theKeepInside,
1145                                                     GEOM::GEOM_List_ptr   theRemoveInside,
1146                                                     CORBA::Short      theLimit,
1147                                                     CORBA::Boolean    theRemoveWebs,
1148                                                     GEOM::GEOM_List_ptr theMaterials,
1149                                                     CORBA::Short theKeepNonlimitShapes)
1150 {
1151   beginService( " GEOM_Superv_i::MakePartition" );
1152   MESSAGE("GEOM_Superv_i::MakePartition");
1153   GEOM_List_i<GEOM::ListOfGO>* aListImplS = 
1154     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in());
1155   GEOM_List_i<GEOM::ListOfGO>* aListImplT = 
1156     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theTools, myPOA).in());
1157   GEOM_List_i<GEOM::ListOfGO>* aListImplKI = 
1158     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theKeepInside, myPOA).in());
1159   GEOM_List_i<GEOM::ListOfGO>* aListImplRI = 
1160     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theRemoveInside, myPOA).in());
1161   GEOM_List_i<GEOM::ListOfLong>* aListImplM = 
1162     dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theMaterials, myPOA).in());
1163   if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
1164     getBoolOp();
1165     GEOM::GEOM_Object_ptr anObj =
1166       myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(), 
1167                               aListImplKI->GetList(), aListImplRI->GetList(),
1168                               theLimit, theRemoveWebs, aListImplM->GetList(),
1169                               theKeepNonlimitShapes);
1170     endService( " GEOM_Superv_i::MakePartition" );
1171     return anObj;
1172   }
1173   endService( " GEOM_Superv_i::MakePartition" );
1174   return NULL;
1175 }
1176
1177 //=============================================================================
1178 //  MakeHalfPartition:
1179 //=============================================================================
1180 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
1181                                                         GEOM::GEOM_Object_ptr thePlane)
1182 {
1183   beginService( " GEOM_Superv_i::MakeHalfPartition" );
1184   MESSAGE("GEOM_Superv_i::MakeHalfPartition");
1185   getBoolOp();
1186   GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeHalfPartition(theShape, thePlane);
1187   endService( " GEOM_Superv_i::MakeHalfPartition" );
1188   return anObj;
1189 }
1190
1191 //============================== InsertOperations =============================
1192 //=============================================================================
1193 //  MakeCopy:
1194 //=============================================================================
1195 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
1196 {
1197   beginService( " GEOM_Superv_i::MakeCopy" );
1198   MESSAGE("GEOM_Superv_i::MakeCopy");
1199   getInsOp();
1200   GEOM::GEOM_Object_ptr anObj = myInsOp->MakeCopy(theOriginal);
1201   endService( " GEOM_Superv_i::MakeCopy" );
1202   return anObj;
1203 }
1204
1205 //=============================================================================
1206 //  Export:
1207 //=============================================================================
1208 void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject, 
1209                             const char*           theFileName, 
1210                             const char*           theFormatName)
1211 {
1212   beginService( " GEOM_Superv_i::Export" );
1213   MESSAGE("GEOM_Superv_i::Export");
1214   getInsOp();
1215   myInsOp->Export(theObject, theFileName, theFormatName);
1216   endService( " GEOM_Superv_i::Export" );
1217 }
1218
1219 //=============================================================================
1220 //  Import:
1221 //=============================================================================
1222 GEOM::GEOM_Object_ptr GEOM_Superv_i::Import (const char* theFileName, 
1223                                              const char* theFormatName)
1224 {
1225   beginService( " GEOM_Superv_i::Import" );
1226   MESSAGE("GEOM_Superv_i::Import");
1227   getInsOp();
1228   GEOM::GEOM_Object_ptr anObj = myInsOp->Import(theFileName, theFormatName);
1229   endService( " GEOM_Superv_i::Import" );
1230   return anObj;
1231 }
1232
1233 //=============================================================================
1234 //  ImportTranslators:
1235 //=============================================================================
1236 void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
1237                                        GEOM::string_array_out thePatterns)
1238 {
1239   beginService( " GEOM_Superv_i::ImportTranslators" );
1240   MESSAGE("GEOM_Superv_i::ImportTranslators");
1241   getInsOp();
1242   myInsOp->ImportTranslators(theFormats, thePatterns);
1243   endService( " GEOM_Superv_i::ImportTranslators" );
1244 }
1245
1246 //=============================================================================
1247 //  ExportTranslators:
1248 //=============================================================================
1249 void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
1250                                        GEOM::string_array_out thePatterns)
1251 {
1252   beginService( " GEOM_Superv_i::ExportTranslators" );
1253   MESSAGE("GEOM_Superv_i::ExportTranslators");
1254   getInsOp();
1255   myInsOp->ExportTranslators(theFormats, thePatterns);
1256   endService( " GEOM_Superv_i::ExportTranslators" );
1257 }
1258
1259 //============================= TransformOperations ===========================
1260 //=============================================================================
1261 //  TranslateTwoPoints:
1262 //=============================================================================
1263 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
1264                                                          GEOM::GEOM_Object_ptr thePoint1,
1265                                                          GEOM::GEOM_Object_ptr thePoint2)
1266 {
1267   beginService( " GEOM_Superv_i::TranslateTwoPoints" );
1268   MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
1269   getTransfOp();
1270   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
1271   endService( " GEOM_Superv_i::TranslateTwoPoints" );
1272   return anObj;
1273 }
1274
1275 //=============================================================================
1276 //  TranslateTwoPointsCopy:
1277 //=============================================================================
1278 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
1279                                                              GEOM::GEOM_Object_ptr thePoint1,
1280                                                              GEOM::GEOM_Object_ptr thePoint2)
1281 {
1282   beginService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1283   MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
1284   getTransfOp();
1285   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
1286   endService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1287   return anObj;
1288 }
1289
1290 //=============================================================================
1291 //  TranslateDXDYDZ:
1292 //=============================================================================
1293 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
1294                                                       CORBA::Double theDX, 
1295                                                       CORBA::Double theDY, 
1296                                                       CORBA::Double theDZ)
1297 {
1298   beginService( " GEOM_Superv_i::TranslateDXDYDZ" );
1299   MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
1300   getTransfOp();
1301   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
1302   endService( " GEOM_Superv_i::TranslateDXDYDZ" );
1303   return anObj;
1304 }
1305
1306 //=============================================================================
1307 //  TranslateDXDYDZCopy:
1308 //=============================================================================
1309 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
1310                                                           CORBA::Double theDX, 
1311                                                           CORBA::Double theDY, 
1312                                                           CORBA::Double theDZ)
1313 {
1314   beginService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1315   MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
1316   getTransfOp();
1317   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
1318   endService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1319   return anObj;
1320 }
1321
1322 //=============================================================================
1323 //  TranslateVector:
1324 //=============================================================================
1325 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject,
1326                                                       GEOM::GEOM_Object_ptr theVector)
1327 {
1328   beginService( " GEOM_Superv_i::TranslateVector" );
1329   MESSAGE("GEOM_Superv_i::TranslateVector");
1330   getTransfOp();
1331   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVector(theObject, theVector);
1332   endService( " GEOM_Superv_i::TranslateVector" );
1333   return anObj;
1334 }
1335
1336 //=============================================================================
1337 //  TranslateVectorCopy:
1338 //=============================================================================
1339 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
1340                                                           GEOM::GEOM_Object_ptr theVector)
1341 {
1342   beginService( " GEOM_Superv_i::TranslateVectorCopy" );
1343   MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
1344   getTransfOp();
1345   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorCopy(theObject, theVector);
1346   endService( " GEOM_Superv_i::TranslateVectorCopy" );
1347   return anObj;
1348 }
1349
1350 //=============================================================================
1351 //  TranslateVectorDistance:
1352 //=============================================================================
1353 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
1354                                                               GEOM::GEOM_Object_ptr theVector,
1355                                                               CORBA::Double theDistance,
1356                                                               CORBA::Boolean theCopy)
1357 {
1358   beginService( " GEOM_Superv_i::TranslateVectorDistance" );
1359   MESSAGE("GEOM_Superv_i::TranslateVectorDistance");
1360   getTransfOp();
1361   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorDistance(theObject, 
1362                                                                     theVector, theDistance, theCopy);
1363   endService( " GEOM_Superv_i::TranslateVectorDistance" );
1364   return anObj;
1365 }
1366
1367 //=============================================================================
1368 //  MultiTranslate1D:
1369 //=============================================================================
1370 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
1371                                                        GEOM::GEOM_Object_ptr theVector,
1372                                                        CORBA::Double theStep,
1373                                                        CORBA::Long theNbTimes)
1374 {
1375   beginService( " GEOM_Superv_i::MultiTranslate1D" );
1376   MESSAGE("GEOM_Superv_i::MultiTranslate1D");
1377   getTransfOp();
1378   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
1379   endService( " GEOM_Superv_i::MultiTranslate1D" );
1380   return anObj;
1381 }
1382
1383 //=============================================================================
1384 //  MultiTranslate2D:
1385 //=============================================================================
1386 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
1387                                                        GEOM::GEOM_Object_ptr theVector1,
1388                                                        CORBA::Double theStep1,
1389                                                        CORBA::Long theNbTimes1,
1390                                                        GEOM::GEOM_Object_ptr theVector2,
1391                                                        CORBA::Double theStep2,
1392                                                        CORBA::Long theNbTimes2)
1393 {
1394   beginService( " GEOM_Superv_i::MultiTranslate2D" );
1395   MESSAGE("GEOM_Superv_i::MultiTranslate2D");
1396   getTransfOp();
1397   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
1398                                                              theVector2, theStep2, theNbTimes2);
1399   endService( " GEOM_Superv_i::MultiTranslate2D" );
1400   return anObj;
1401 }
1402
1403 //=============================================================================
1404 //  Rotate:
1405 //=============================================================================
1406 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
1407                                              GEOM::GEOM_Object_ptr theAxis,
1408                                              CORBA::Double theAngle)
1409 {
1410   beginService( " GEOM_Superv_i::Rotate" );
1411   MESSAGE("GEOM_Superv_i::Rotate");
1412   getTransfOp();
1413   GEOM::GEOM_Object_ptr anObj = myTransfOp->Rotate(theObject, theAxis, theAngle);
1414   endService( " GEOM_Superv_i::Rotate" );
1415   return anObj;
1416 }
1417
1418 //=============================================================================
1419 //  RotateCopy:
1420 //=============================================================================
1421 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
1422                                                  GEOM::GEOM_Object_ptr theAxis,
1423                                                  CORBA::Double theAngle)
1424 {
1425   beginService( " GEOM_Superv_i::RotateCopy" );
1426   MESSAGE("GEOM_Superv_i::RotateCopy");
1427   getTransfOp();
1428   GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateCopy(theObject, theAxis, theAngle);
1429   endService( " GEOM_Superv_i::RotateCopy" );
1430   return anObj;
1431 }
1432 //=============================================================================
1433 //  RotateThreePoints:
1434 //=============================================================================
1435 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
1436                                                         GEOM::GEOM_Object_ptr theCentPoint,
1437                                                         GEOM::GEOM_Object_ptr thePoint1,
1438                                                         GEOM::GEOM_Object_ptr thePoint2)
1439 {
1440   beginService( " GEOM_Superv_i::RotateThreePoints" );
1441   MESSAGE("GEOM_Superv_i::RotateThreePoints");
1442   getTransfOp();
1443   GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2);
1444   endService( " GEOM_Superv_i::RotateThreePoints" );
1445   return anObj;
1446 }
1447
1448 //=============================================================================
1449 //  RotateThreePointsCopy:
1450 //=============================================================================
1451 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
1452                                                             GEOM::GEOM_Object_ptr theCentPoint,
1453                                                             GEOM::GEOM_Object_ptr thePoint1,
1454                                                             GEOM::GEOM_Object_ptr thePoint2)
1455 {
1456   beginService( " GEOM_Superv_i::RotateThreePointsCopy" );
1457   MESSAGE("GEOM_Superv_i::RotateThreePointsCopy");
1458   getTransfOp();
1459   GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2);
1460   endService( " GEOM_Superv_i::RotateThreePointsCopy" );
1461   return anObj;
1462 }
1463
1464 //=============================================================================
1465 //  MultiRotate1D:
1466 //=============================================================================
1467 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1468                                                     GEOM::GEOM_Object_ptr theAxis,
1469                                                     CORBA::Long theNbTimes)
1470 {
1471   beginService( " GEOM_Superv_i::MultiRotate1D" );
1472   MESSAGE("GEOM_Superv_i::MultiRotate1D");
1473   getTransfOp();
1474   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
1475   endService( " GEOM_Superv_i::MultiRotate1D" );
1476   return anObj;
1477 }
1478
1479 //=============================================================================
1480 //  MultiRotate2D:
1481 //=============================================================================
1482 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1483                                                     GEOM::GEOM_Object_ptr theAxis,
1484                                                     CORBA::Double theAngle,
1485                                                     CORBA::Long theNbTimes1,
1486                                                     CORBA::Double theStep,
1487                                                     CORBA::Long theNbTimes2)
1488 {
1489   beginService( " GEOM_Superv_i::MultiRotate2D" );
1490   MESSAGE("GEOM_Superv_i::MultiRotate2D");
1491   getTransfOp();
1492   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
1493   endService( " GEOM_Superv_i::MultiRotate2D" );
1494   return anObj;
1495 }
1496
1497 //=============================================================================
1498 //  MirrorPlane:
1499 //=============================================================================
1500 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject, 
1501                                                   GEOM::GEOM_Object_ptr thePlane)
1502 {
1503   beginService( " GEOM_Superv_i::MirrorPlane" );
1504   MESSAGE("GEOM_Superv_i::MirrorPlane");
1505   getTransfOp();
1506   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlane(theObject, thePlane);
1507   endService( " GEOM_Superv_i::MirrorPlane" );
1508   return anObj;
1509 }
1510
1511 //=============================================================================
1512 //  MirrorPlaneCopy:
1513 //=============================================================================
1514 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject, 
1515                                                       GEOM::GEOM_Object_ptr thePlane)
1516 {
1517   beginService( " GEOM_Superv_i::MirrorPlaneCopy" );
1518   MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
1519   getTransfOp();
1520   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlaneCopy(theObject, thePlane);
1521   endService( " GEOM_Superv_i::MirrorPlaneCopy" );
1522   return anObj;
1523 }
1524
1525 //=============================================================================
1526 //  MirrorAxis:
1527 //=============================================================================
1528 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject, 
1529                                                  GEOM::GEOM_Object_ptr theAxis)
1530 {
1531   beginService( " GEOM_Superv_i::MirrorAxis" );
1532   MESSAGE("GEOM_Superv_i::MirrorAxis");
1533   getTransfOp();
1534   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxis(theObject, theAxis);
1535   endService( " GEOM_Superv_i::MirrorAxis" );
1536   return anObj;
1537 }
1538
1539 //=============================================================================
1540 //  MirrorAxisCopy:
1541 //=============================================================================
1542 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject, 
1543                                                      GEOM::GEOM_Object_ptr theAxis)
1544 {
1545   beginService( " GEOM_Superv_i::MirrorAxisCopy" );
1546   MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
1547   getTransfOp();
1548   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxisCopy(theObject, theAxis);
1549   endService( " GEOM_Superv_i::MirrorAxisCopy" );
1550   return anObj;
1551 }
1552
1553 //=============================================================================
1554 //  MirrorPoint:
1555 //=============================================================================
1556 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject, 
1557                                                   GEOM::GEOM_Object_ptr thePoint)
1558 {
1559   beginService( " GEOM_Superv_i::MirrorPoint" );
1560   MESSAGE("GEOM_Superv_i::MirrorPoint");
1561   getTransfOp();
1562   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPoint(theObject, thePoint);
1563   endService( " GEOM_Superv_i::MirrorPoint" );
1564   return anObj;
1565 }
1566
1567 //=============================================================================
1568 //  MirrorPointCopy:
1569 //=============================================================================
1570 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject, 
1571                                                       GEOM::GEOM_Object_ptr thePoint)
1572 {
1573   beginService( " GEOM_Superv_i::MirrorPoint" );
1574   MESSAGE("GEOM_Superv_i::MirrorPointCopy");
1575   getTransfOp();
1576   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPointCopy(theObject, thePoint);
1577   endService( " GEOM_Superv_i::MirrorPoint" );
1578   return anObj;
1579 }
1580
1581 //=============================================================================
1582 //  OffsetShape:
1583 //=============================================================================
1584 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject, 
1585                                                   CORBA::Double theOffset)
1586 {
1587   beginService( " GEOM_Superv_i::OffsetShape" );
1588   MESSAGE("GEOM_Superv_i::OffsetShape");
1589   getTransfOp();
1590   GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset);
1591   endService( " GEOM_Superv_i::OffsetShape" );
1592   return anObj;
1593 }
1594
1595 //=============================================================================
1596 //  OffsetShapeCopy:
1597 //=============================================================================
1598 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject, 
1599                                                       CORBA::Double theOffset)
1600 {
1601   beginService( " GEOM_Superv_i::OffsetShapeCopy" );
1602   MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1603   getTransfOp();
1604   GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset);
1605   endService( " GEOM_Superv_i::OffsetShapeCopy" );
1606   return anObj;
1607 }
1608
1609 //=============================================================================
1610 //  ScaleShape:
1611 //=============================================================================
1612 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject, 
1613                                                  GEOM::GEOM_Object_ptr thePoint,
1614                                                  CORBA::Double theFactor)
1615 {
1616   beginService( " GEOM_Superv_i::ScaleShape" );
1617   MESSAGE("GEOM_Superv_i::ScaleShape");
1618   getTransfOp();
1619   GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShape(theObject, thePoint, theFactor);
1620   endService( " GEOM_Superv_i::ScaleShape" );
1621   return anObj;
1622 }
1623
1624 //=============================================================================
1625 //  ScaleShapeCopy:
1626 //=============================================================================
1627 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject, 
1628                                                      GEOM::GEOM_Object_ptr thePoint,
1629                                                      CORBA::Double theFactor)
1630 {
1631   beginService( " GEOM_Superv_i::ScaleShapeCopy" );
1632   MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
1633   getTransfOp();
1634   GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
1635   endService( " GEOM_Superv_i::ScaleShapeCopy" );
1636   return anObj;
1637 }
1638
1639 //=============================================================================
1640 //  PositionShape:
1641 //=============================================================================
1642 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
1643                                                     GEOM::GEOM_Object_ptr theStartLCS,
1644                                                     GEOM::GEOM_Object_ptr theEndLCS)
1645 {
1646   beginService( " GEOM_Superv_i::PositionShape" );
1647   MESSAGE("GEOM_Superv_i::PositionShape");
1648   getTransfOp();
1649   GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
1650   endService( " GEOM_Superv_i::PositionShape" );
1651   return anObj;
1652 }
1653
1654 //=============================================================================
1655 //  PositionShapeCopy:
1656 //=============================================================================
1657 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
1658                                                         GEOM::GEOM_Object_ptr theStartLCS,
1659                                                         GEOM::GEOM_Object_ptr theEndLCS)
1660 {
1661   beginService( " GEOM_Superv_i::PositionShapeCopy" );
1662   MESSAGE("GEOM_Superv_i::PositionShapeCopy");
1663   getTransfOp();
1664   GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
1665   endService( " GEOM_Superv_i::PositionShapeCopy" );
1666   return anObj;
1667 }
1668
1669 //=============================== ShapesOperations ============================
1670 //=============================================================================
1671 //  Make:
1672 //=============================================================================
1673 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
1674                                                GEOM::GEOM_Object_ptr thePnt2)
1675 {
1676   beginService( " GEOM_Superv_i::MakeEdge" );
1677   MESSAGE("GEOM_Superv_i::MakeEdge");
1678   getShapesOp();
1679   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeEdge(thePnt1, thePnt2);
1680   endService( " GEOM_Superv_i::MakeEdge" );
1681   return anObj;
1682 }
1683
1684 //=============================================================================
1685 //  MakeWire:
1686 //=============================================================================
1687 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires)
1688 {
1689   beginService( " GEOM_Superv_i::MakeWire" );
1690   MESSAGE("GEOM_Superv_i::MakeWire");
1691   if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW = 
1692       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
1693     getShapesOp();
1694     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeWire(aListImplEW->GetList());
1695     endService( " GEOM_Superv_i::MakeWire" );
1696     return anObj;
1697   }
1698   endService( " GEOM_Superv_i::MakeWire" );
1699   return NULL;
1700 }
1701
1702 //=============================================================================
1703 //  MakeFace:
1704 //=============================================================================
1705 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
1706                                                CORBA::Boolean isPlanarWanted)
1707 {
1708   beginService( " GEOM_Superv_i::MakeFace" );
1709   MESSAGE("GEOM_Superv_i::MakeFace");
1710   getShapesOp();
1711   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFace(theWire, isPlanarWanted);
1712   endService( " GEOM_Superv_i::MakeFace" );
1713   return anObj;
1714 }
1715
1716 //=============================================================================
1717 //  MakeFaceWires:
1718 //=============================================================================
1719 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires,
1720                                                     CORBA::Boolean isPlanarWanted)
1721 {
1722   beginService( " GEOM_Superv_i::MakeFaceWires" );
1723   MESSAGE("GEOM_Superv_i::MakeFaceWires");
1724   if (GEOM_List_i<GEOM::ListOfGO>* aListImplW = 
1725       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
1726     getShapesOp();
1727     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
1728     endService( " GEOM_Superv_i::MakeFaceWires" );
1729     return anObj;
1730   }
1731   endService( " GEOM_Superv_i::MakeFaceWires" );
1732   return NULL;
1733 }
1734
1735 //=============================================================================
1736 //  MakeShell:
1737 //=============================================================================
1738 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells)
1739 {
1740   beginService( " GEOM_Superv_i::MakeShell" );
1741   MESSAGE("GEOM_Superv_i::MakeShell");
1742   if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS = 
1743       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
1744     getShapesOp();
1745     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeShell(aListImplFS->GetList());
1746     endService( " GEOM_Superv_i::MakeShell" );
1747     return anObj;
1748   }
1749   endService( " GEOM_Superv_i::MakeShell" );
1750   return NULL;
1751 }
1752
1753 //=============================================================================
1754 //  MakeSolidShell:
1755 //=============================================================================
1756 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
1757 {
1758   beginService( " GEOM_Superv_i::MakeSolidShell" );
1759   MESSAGE("GEOM_Superv_i::MakeSolidShell");
1760   getShapesOp();
1761   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShell(theShell);
1762   endService( " GEOM_Superv_i::MakeSolidShell" );
1763   return anObj;
1764 }
1765
1766 //=============================================================================
1767 //  MakeSolidShells:
1768 //=============================================================================
1769 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells)
1770 {
1771   beginService( " GEOM_Superv_i::MakeSolidShells" );
1772   MESSAGE("GEOM_Superv_i::MakeSolidShells");
1773   if (GEOM_List_i<GEOM::ListOfGO>* aListImplS = 
1774       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
1775     getShapesOp();
1776     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShells(aListImplS->GetList());
1777     endService( " GEOM_Superv_i::MakeSolidShells" );
1778     return anObj;
1779   }
1780   endService( " GEOM_Superv_i::MakeSolidShells" );
1781   return NULL;
1782 }
1783
1784 //=============================================================================
1785 //  MakeCompound:
1786 //=============================================================================
1787 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes)
1788 {
1789   beginService( " GEOM_Superv_i::MakeCompound" );
1790   MESSAGE("GEOM_Superv_i::MakeCompound");
1791   if (GEOM_List_i<GEOM::ListOfGO>* aListImpl = 
1792       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
1793     getShapesOp();
1794     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeCompound(aListImpl->GetList());
1795     endService( " GEOM_Superv_i::MakeCompound" );
1796     return anObj;
1797   }
1798   endService( " GEOM_Superv_i::MakeCompound" );
1799   return NULL;
1800 }
1801
1802 //=============================================================================
1803 //  MakeGlueFaces:
1804 //=============================================================================
1805 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
1806                                                     CORBA::Double   theTolerance,
1807                                                     CORBA::Boolean doKeepNonSolids)
1808 {
1809   beginService( " GEOM_Superv_i::MakeGlueFaces" );
1810   MESSAGE("GEOM_Superv_i::MakeGlueFaces");
1811   getShapesOp();
1812   GEOM::GEOM_Object_ptr anObj =
1813     myShapesOp->MakeGlueFaces(theShape, theTolerance, doKeepNonSolids);
1814   endService( " GEOM_Superv_i::MakeGlueFaces" );
1815   return anObj;
1816 }
1817
1818 //=============================================================================
1819 //  GetGlueFaces:
1820 //=============================================================================
1821 GEOM::GEOM_List_ptr GEOM_Superv_i::GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
1822                                                  CORBA::Double theTolerance)
1823 {
1824   beginService( " GEOM_Superv_i::GetGlueFaces" );
1825   MESSAGE("GEOM_Superv_i::GetGlueFaces");
1826   getShapesOp();
1827   GEOM::ListOfGO* aList = myShapesOp->GetGlueFaces(theShape, theTolerance);
1828   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1829   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1830   endService( " GEOM_Superv_i::GetGlueFaces" );
1831   return aListPtr->_this();
1832 }
1833
1834 //=============================================================================
1835 //  MakeGlueFacesByList:
1836 //=============================================================================
1837 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
1838                                                           CORBA::Double theTolerance,
1839                                                           const GEOM::ListOfGO& theFaces,
1840                                                           CORBA::Boolean doKeepNonSolids)
1841 {
1842   beginService( " GEOM_Superv_i::MakeGlueFacesByList" );
1843   MESSAGE("GEOM_Superv_i::MakeGlueFacesByList");
1844   getShapesOp();
1845   GEOM::GEOM_Object_ptr anObj =
1846     myShapesOp->MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids);
1847   endService( " GEOM_Superv_i::MakeGlueFacesByList" );
1848   return anObj;
1849 }
1850
1851 //=============================================================================
1852 //  MakeExplode:
1853 //=============================================================================
1854 GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
1855                                                     CORBA::Long theShapeType,
1856                                                     CORBA::Boolean isSorted)
1857 {
1858   beginService( " GEOM_Superv_i::MakeExplode" );
1859   MESSAGE("GEOM_Superv_i::MakeExplode");
1860   getShapesOp();
1861
1862   GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
1863   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1864   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1865   endService( " GEOM_Superv_i::MakeExplode" );
1866   return aListPtr->_this();
1867 }
1868
1869 //=============================================================================
1870 //  NumberOfFaces:
1871 //=============================================================================
1872 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
1873 {
1874   beginService( " GEOM_Superv_i::NumberOfFaces" );
1875   MESSAGE("GEOM_Superv_i::NumberOfFaces");
1876   getShapesOp();
1877   CORBA::Long aRes = myShapesOp->NumberOfFaces(theShape);
1878   endService( " GEOM_Superv_i::NumberOfFaces" );
1879   return aRes;
1880 }
1881
1882 //=============================================================================
1883 //  NumberOfEdges:
1884 //=============================================================================
1885 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
1886 {
1887   beginService( " GEOM_Superv_i::NumberOfEdges" );
1888   MESSAGE("GEOM_Superv_i::NumberOfEdges");
1889   getShapesOp();
1890   CORBA::Long aRes = myShapesOp->NumberOfEdges(theShape);
1891   endService( " GEOM_Superv_i::NumberOfEdges" );
1892   return aRes;
1893 }
1894
1895 //=============================================================================
1896 //  ChangeOrientation:
1897 //=============================================================================
1898 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
1899 {
1900   beginService( " GEOM_Superv_i::ChangeOrientation" );
1901   MESSAGE("GEOM_Superv_i::ChangeOrientation");
1902   getShapesOp();
1903   GEOM::GEOM_Object_ptr anObj = myShapesOp->ChangeOrientation(theShape);
1904   endService( " GEOM_Superv_i::ChangeOrientation" );
1905   return anObj;
1906 }
1907
1908
1909 //=============================== BlocksOperations ============================
1910 //=============================================================================
1911 //  MakeQuad4Vertices:
1912 //=============================================================================
1913 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
1914                                                         GEOM::GEOM_Object_ptr thePnt2,
1915                                                         GEOM::GEOM_Object_ptr thePnt3,
1916                                                         GEOM::GEOM_Object_ptr thePnt4)
1917 {
1918   beginService( " GEOM_Superv_i::MakeQuad4Vertices" );
1919   MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
1920   getBlocksOp();
1921   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
1922   endService( " GEOM_Superv_i::MakeQuad4Vertices" );
1923   return anObj;
1924 }
1925
1926 //=============================================================================
1927 //  MakeQuad:
1928 //=============================================================================
1929 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
1930                                                GEOM::GEOM_Object_ptr theEdge2,
1931                                                GEOM::GEOM_Object_ptr theEdge3,
1932                                                GEOM::GEOM_Object_ptr theEdge4)
1933 {
1934   beginService( " GEOM_Superv_i::MakeQuad" );
1935   MESSAGE("GEOM_Superv_i::MakeQuad");
1936   getBlocksOp();
1937   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
1938   endService( " GEOM_Superv_i::MakeQuad" );
1939   return anObj;
1940 }
1941
1942 //=============================================================================
1943 //  MakeQuad2Edges:
1944 //=============================================================================
1945 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
1946                                                      GEOM::GEOM_Object_ptr theEdge2)
1947 {
1948   beginService( " GEOM_Superv_i::MakeQuad2Edges" );
1949   MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
1950   getBlocksOp();
1951   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
1952   endService( " GEOM_Superv_i::MakeQuad2Edges" );
1953   return anObj;
1954 }
1955
1956 //=============================================================================
1957 //  MakeHexa:
1958 //=============================================================================
1959 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
1960                                                GEOM::GEOM_Object_ptr theFace2,
1961                                                GEOM::GEOM_Object_ptr theFace3,
1962                                                GEOM::GEOM_Object_ptr theFace4,
1963                                                GEOM::GEOM_Object_ptr theFace5,
1964                                                GEOM::GEOM_Object_ptr theFace6)
1965 {
1966   beginService( " GEOM_Superv_i::MakeHexa" );
1967   MESSAGE("GEOM_Superv_i::MakeHexa");
1968   getBlocksOp();
1969   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
1970   endService( " GEOM_Superv_i::MakeHexa" );
1971   return anObj;
1972 }
1973
1974 //=============================================================================
1975 //  MakeHexa2Faces:
1976 //=============================================================================
1977 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
1978                                                      GEOM::GEOM_Object_ptr theFace2)
1979 {
1980   beginService( " GEOM_Superv_i::MakeHexa2Faces" );
1981   MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
1982   getBlocksOp();
1983   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
1984   endService( " GEOM_Superv_i::MakeHexa2Faces" );
1985   return anObj;
1986 }
1987
1988 //=============================================================================
1989 //  GetPoint:
1990 //=============================================================================
1991 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
1992                                                CORBA::Double   theX,
1993                                                CORBA::Double   theY,
1994                                                CORBA::Double   theZ,
1995                                                CORBA::Double   theEpsilon)
1996 {
1997   beginService( " GEOM_Superv_i::GetPoint" );
1998   MESSAGE("GEOM_Superv_i::GetPoint");
1999   getBlocksOp();
2000   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
2001   endService( " GEOM_Superv_i::GetPoint" );
2002   return anObj;
2003 }
2004
2005 //=============================================================================
2006 //  GetEdge:
2007 //=============================================================================
2008 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
2009                                               GEOM::GEOM_Object_ptr thePoint1,
2010                                               GEOM::GEOM_Object_ptr thePoint2)
2011 {
2012   beginService( " GEOM_Superv_i::GetEdge" );
2013   MESSAGE("GEOM_Superv_i::GetEdge");
2014   getBlocksOp();
2015   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
2016   endService( " GEOM_Superv_i::GetEdge" );
2017   return anObj;
2018 }
2019
2020 //=============================================================================
2021 //  GetEdgeNearPoint:
2022 //=============================================================================
2023 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
2024                                                        GEOM::GEOM_Object_ptr thePoint)
2025 {
2026   beginService( " GEOM_Superv_i::GetEdgeNearPoint" );
2027   MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
2028   getBlocksOp();
2029   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
2030   endService( " GEOM_Superv_i::GetEdgeNearPoint" );
2031   return anObj;
2032 }
2033
2034 //=============================================================================
2035 //  GetFaceByPoints:
2036 //=============================================================================
2037 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
2038                                                       GEOM::GEOM_Object_ptr thePoint1,
2039                                                       GEOM::GEOM_Object_ptr thePoint2,
2040                                                       GEOM::GEOM_Object_ptr thePoint3,
2041                                                       GEOM::GEOM_Object_ptr thePoint4)
2042 {
2043   beginService( " GEOM_Superv_i::GetFaceByPoints" );
2044   MESSAGE("GEOM_Superv_i::GetFaceByPoints");
2045   getBlocksOp();
2046   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
2047   endService( " GEOM_Superv_i::GetFaceByPoints" );
2048   return anObj;
2049 }
2050
2051 //=============================================================================
2052 //  GetFaceByEdges:
2053 //=============================================================================
2054 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
2055                                                      GEOM::GEOM_Object_ptr theEdge1,
2056                                                      GEOM::GEOM_Object_ptr theEdge2)
2057 {
2058   beginService( " GEOM_Superv_i::GetFaceByEdges" );
2059   MESSAGE("GEOM_Superv_i::GetFaceByEdges");
2060   getBlocksOp();
2061   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
2062   endService( " GEOM_Superv_i::GetFaceByEdges" );
2063   return anObj;
2064 }
2065
2066 //=============================================================================
2067 //  GetOppositeFace:
2068 //=============================================================================
2069 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
2070                                                       GEOM::GEOM_Object_ptr theFace)
2071 {
2072   beginService( " GEOM_Superv_i::GetOppositeFace" );
2073   MESSAGE("GEOM_Superv_i::GetOppositeFace");
2074   getBlocksOp();
2075   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetOppositeFace(theBlock, theFace);
2076   endService( " GEOM_Superv_i::GetOppositeFace" );
2077   return anObj;
2078 }
2079
2080 //=============================================================================
2081 //  GetFaceNearPoint:
2082 //=============================================================================
2083 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
2084                                                        GEOM::GEOM_Object_ptr thePoint)
2085 {
2086   beginService( " GEOM_Superv_i::GetFaceNearPoint" );
2087   MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
2088   getBlocksOp();
2089   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceNearPoint(theShape, thePoint);
2090   endService( " GEOM_Superv_i::GetFaceNearPoint" );
2091   return anObj;
2092 }
2093
2094 //=============================================================================
2095 //  GetFaceByNormale:
2096 //=============================================================================
2097 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
2098                                                        GEOM::GEOM_Object_ptr theVector)
2099 {
2100   beginService( " GEOM_Superv_i::GetFaceByNormale" );
2101   MESSAGE("GEOM_Superv_i::GetFaceByNormale");
2102   getBlocksOp();
2103   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByNormale(theBlock, theVector);
2104   endService( " GEOM_Superv_i::GetFaceByNormale" );
2105   return anObj;
2106 }
2107
2108 //=============================================================================
2109 //  IsCompoundOfBlocks:
2110 //=============================================================================
2111 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2112                                                   CORBA::Long     theMinNbFaces,
2113                                                   CORBA::Long     theMaxNbFaces,
2114                                                   CORBA::Long&          theNbBlocks)
2115 {
2116   beginService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2117   MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
2118   getBlocksOp();
2119   CORBA::Boolean aRes = myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
2120   endService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2121   return aRes;
2122 }
2123
2124 //=============================================================================
2125 //  CheckCompoundOfBlocks:
2126 //=============================================================================
2127 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks 
2128 (GEOM::GEOM_Object_ptr theCompound,
2129  GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
2130 {
2131   beginService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2132   MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
2133   getBlocksOp();
2134   CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
2135   endService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2136   return aRes;
2137 }
2138
2139 //=============================================================================
2140 //  PrintBCErrors:
2141 //=============================================================================
2142 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
2143                                     const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
2144 {
2145   beginService( " GEOM_Superv_i::PrintBCErrors" );
2146   MESSAGE("GEOM_Superv_i::PrintBCErrors");
2147   getBlocksOp();
2148   char* anErrors = myBlocksOp->PrintBCErrors(theCompound, theErrors);
2149   endService( " GEOM_Superv_i::PrintBCErrors" );
2150   return anErrors;
2151 }
2152
2153 //=============================================================================
2154 //  ExplodeCompoundOfBlocks:
2155 //=============================================================================
2156 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2157                                                                 CORBA::Long     theMinNbFaces,
2158                                                                 CORBA::Long     theMaxNbFaces)
2159 {
2160   beginService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2161   MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
2162   getBlocksOp();
2163   GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
2164   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2165   endService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2166   return aListPtr->_this();
2167 }
2168
2169 //=============================================================================
2170 //  GetBlockNearPoint:
2171 //=============================================================================
2172 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
2173                                                         GEOM::GEOM_Object_ptr thePoint)
2174 {
2175   beginService( " GEOM_Superv_i::GetBlockNearPoint" );
2176   MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
2177   getBlocksOp();
2178   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
2179   endService( " GEOM_Superv_i::GetBlockNearPoint" );
2180   return anObj;
2181 }
2182
2183 //=============================================================================
2184 //  GetBlockByParts:
2185 //=============================================================================
2186 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
2187                                                       GEOM::GEOM_List_ptr theParts)
2188 {
2189   beginService( " GEOM_Superv_i::GetBlockByParts" );
2190   MESSAGE("GEOM_Superv_i::GetBlockByParts");
2191   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2192       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2193     getBlocksOp();
2194     GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
2195     endService( " GEOM_Superv_i::GetBlockByParts" );
2196     return anObj;
2197   }
2198   endService( " GEOM_Superv_i::GetBlockByParts" );
2199   return NULL;
2200 }
2201
2202 //=============================================================================
2203 //  GetBlocksByParts:
2204 //=============================================================================
2205 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
2206                                                          GEOM::GEOM_List_ptr theParts)
2207 {
2208   beginService( " GEOM_Superv_i::GetBlocksByParts" );
2209   MESSAGE("GEOM_Superv_i::GetBlocksByParts");
2210   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2211       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2212     getBlocksOp();
2213     
2214     GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
2215     GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2216     endService( " GEOM_Superv_i::GetBlocksByParts" );
2217     return aListPtr->_this();
2218   }
2219   endService( " GEOM_Superv_i::GetBlocksByParts" );
2220   return NULL;
2221 }
2222
2223 //=============================================================================
2224 //  MakeMultiTransformation1D:
2225 //=============================================================================
2226 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
2227                                                                 CORBA::Long     theDirFace1,
2228                                                                 CORBA::Long     theDirFace2,
2229                                                                 CORBA::Long     theNbTimes)
2230 {
2231   beginService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2232   MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
2233   getBlocksOp();
2234   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
2235   endService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2236   return anObj;
2237 }
2238
2239 //=============================================================================
2240 //  MakeMultiTransformation2D:
2241 //=============================================================================
2242 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D 
2243 (GEOM::GEOM_Object_ptr theBlock,
2244  CORBA::Long     theDirFace1U,
2245  CORBA::Long     theDirFace2U,
2246  CORBA::Long     theNbTimesU,
2247  CORBA::Long     theDirFace1V,
2248  CORBA::Long     theDirFace2V,
2249  CORBA::Long     theNbTimesV)
2250 {
2251   beginService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2252   MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
2253   getBlocksOp();
2254   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation2D(theBlock, 
2255                                                                       theDirFace1U, theDirFace2U, theNbTimesU,
2256                                                                       theDirFace1V, theDirFace2V, theNbTimesV);
2257   endService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2258   return anObj;
2259 }
2260
2261 //=============================== CurvesOperations ============================
2262 //=============================================================================
2263 //  MakeCirclePntVecR:
2264 //=============================================================================
2265 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
2266                                                         GEOM::GEOM_Object_ptr theVector,
2267                                                         CORBA::Double theR)
2268 {
2269   beginService( " GEOM_Superv_i::MakeCirclePntVecR" );
2270   MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
2271   getCurvesOp();
2272   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
2273   endService( " GEOM_Superv_i::MakeCirclePntVecR" );
2274   return anObj;
2275 }
2276
2277 //=============================================================================
2278 //  MakeCircleThreePnt:
2279 //=============================================================================
2280 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
2281                                                          GEOM::GEOM_Object_ptr thePnt2,
2282                                                          GEOM::GEOM_Object_ptr thePnt3)
2283 {
2284   beginService( " GEOM_Superv_i::MakeCircleThreePnt" );
2285   MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
2286   getCurvesOp();
2287   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
2288   endService( " GEOM_Superv_i::MakeCircleThreePnt" );
2289   return anObj;
2290 }
2291 //=============================================================================
2292 //  MakeCircleCenter2Pnt:
2293 //=============================================================================
2294 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
2295                                                            GEOM::GEOM_Object_ptr thePnt2,
2296                                                            GEOM::GEOM_Object_ptr thePnt3)
2297 {
2298   beginService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2299   MESSAGE("GEOM_Superv_i::MakeCircleCenter2Pnt");
2300   getCurvesOp();
2301   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3);
2302   endService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2303   return anObj;
2304 }
2305
2306 //=============================================================================
2307 //  MakeEllipse:
2308 //=============================================================================
2309 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
2310                                                   GEOM::GEOM_Object_ptr theVector,
2311                                                   CORBA::Double theRMajor, 
2312                                                   CORBA::Double theRMinor)
2313 {
2314   beginService( " GEOM_Superv_i::MakeEllipse" );
2315   MESSAGE("GEOM_Superv_i::MakeEllipse");
2316   getCurvesOp();
2317   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
2318   endService( " GEOM_Superv_i::MakeEllipse" );
2319   return anObj;
2320 }
2321
2322 //=============================================================================
2323 //  MakeArc:
2324 //=============================================================================
2325 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
2326                                               GEOM::GEOM_Object_ptr thePnt2,
2327                                               GEOM::GEOM_Object_ptr thePnt3)
2328 {
2329   beginService( " GEOM_Superv_i::MakeArc" );
2330   MESSAGE("GEOM_Superv_i::MakeArc");
2331   getCurvesOp();
2332   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
2333   endService( " GEOM_Superv_i::MakeArc" );
2334   return anObj;
2335 }
2336
2337 //=============================================================================
2338 //  MakeArcCenter:
2339 //=============================================================================
2340 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
2341                                                     GEOM::GEOM_Object_ptr thePnt1,
2342                                                     GEOM::GEOM_Object_ptr thePnt2,
2343                                                     CORBA::Boolean theSense)
2344 {
2345   beginService( " GEOM_Superv_i::MakeArcCenter" );
2346   MESSAGE("GEOM_Superv_i::MakeArcCenter");
2347   getCurvesOp();
2348   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArcCenter(theCenter, thePnt1, thePnt2,theSense);
2349   endService( " GEOM_Superv_i::MakeArcCenter" );
2350   return anObj;
2351 }
2352
2353 //=============================================================================
2354 //  MakePolyline:
2355 //=============================================================================
2356 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints)
2357 {
2358   beginService( " GEOM_Superv_i::MakePolyline" );
2359   MESSAGE("GEOM_Superv_i::MakePolyline");
2360   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2361       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2362     getCurvesOp();
2363     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakePolyline(aListImplP->GetList());
2364     endService( " GEOM_Superv_i::MakePolyline" );
2365     return anObj;
2366   }
2367   endService( " GEOM_Superv_i::MakePolyline" );
2368   return NULL;
2369 }
2370
2371 //=============================================================================
2372 //  MakeSplineBezier:
2373 //=============================================================================
2374 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints)
2375 {
2376   beginService( " GEOM_Superv_i::MakeSplineBezier" );
2377   MESSAGE("GEOM_Superv_i::MakeSplineBezier");
2378   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2379       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2380     getCurvesOp();
2381     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineBezier(aListImplP->GetList());
2382     endService( " GEOM_Superv_i::MakeSplineBezier" );
2383     return anObj;
2384   }
2385   endService( " GEOM_Superv_i::MakeSplineBezier" );
2386   return NULL;
2387 }
2388
2389 //=============================================================================
2390 //  MakeSplineInterpolation:
2391 //=============================================================================
2392 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints)
2393 {
2394   beginService( " GEOM_Superv_i::MakeSplineInterpolation" );
2395   MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
2396   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2397       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2398     getCurvesOp();
2399     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
2400     endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2401     return anObj;
2402   }
2403   endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2404   return NULL;
2405 }
2406
2407 //=============================================================================
2408 //  MakeSketcher:
2409 //=============================================================================
2410 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand, 
2411                                                    GEOM::GEOM_List_ptr theWorkingPlane)
2412 {
2413   beginService( " GEOM_Superv_i::MakeSketcher" );
2414   MESSAGE("GEOM_Superv_i::MakeSketcher");
2415   if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP = 
2416       dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
2417     getCurvesOp();
2418     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
2419     endService( " GEOM_Superv_i::MakeSketcher" );
2420     return anObj;
2421   }
2422   endService( " GEOM_Superv_i::MakeSketcher" );
2423   return NULL;
2424 }
2425
2426 //=============================== LocalOperations =============================
2427 //=============================================================================
2428 //  MakeFilletAll:
2429 //=============================================================================
2430 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
2431                                                     CORBA::Double theR)
2432 {
2433   beginService( " GEOM_Superv_i::MakeFilletAll" );
2434   MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
2435   getLocalOp();
2436   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletAll(theShape, theR);
2437   endService( " GEOM_Superv_i::MakeFilletAll" );
2438   return anObj;
2439 }
2440
2441 //=============================================================================
2442 //  MakeFilletEdges:
2443 //=============================================================================
2444 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, 
2445                                                       CORBA::Double theR,
2446                                                       GEOM::GEOM_List_ptr theEdges)
2447 {
2448   beginService( " GEOM_Superv_i::MakeFilletEdges" );
2449   MESSAGE("GEOM_Superv_i::MakeFilletEdges");
2450   if (GEOM_List_i<GEOM::ListOfLong>* aListImplE = 
2451       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2452     getLocalOp();
2453     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
2454     endService( " GEOM_Superv_i::MakeFilletEdges" );
2455     return anObj;
2456   }
2457   endService( " GEOM_Superv_i::MakeFilletEdges" );
2458   return NULL;
2459 }
2460
2461 //=============================================================================
2462 //  MakeFilletEdges R1 R2:
2463 //=============================================================================
2464 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape, 
2465                                                           CORBA::Double theR1,
2466                                                           CORBA::Double theR2,
2467                                                           GEOM::GEOM_List_ptr theEdges)
2468 {
2469   beginService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2470   MESSAGE("GEOM_Superv_i::MakeFilletEdgesR1R2");
2471   if (GEOM_List_i<GEOM::ListOfLong>* aListImplE = 
2472       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2473     getLocalOp();
2474     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdgesR1R2(theShape, theR1,
2475                                                                  theR2, aListImplE->GetList());
2476     endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2477     return anObj;
2478   }
2479   endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2480   return NULL;
2481 }
2482
2483 //=============================================================================
2484 //  MakeFilletFaces:
2485 //=============================================================================
2486 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, 
2487                                                       CORBA::Double theR,
2488                                                       GEOM::GEOM_List_ptr theFaces)
2489 {
2490   beginService( " GEOM_Superv_i::MakeFilletFaces" );
2491   MESSAGE("GEOM_Superv_i::MakeFilletFaces");
2492   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2493       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2494     getLocalOp();
2495     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
2496     endService( " GEOM_Superv_i::MakeFilletFaces" );
2497     return anObj;
2498   }
2499   endService( " GEOM_Superv_i::MakeFilletFaces" );
2500   return NULL;
2501 }
2502
2503 //=============================================================================
2504 //  MakeFilletFaces R1 R2:
2505 //=============================================================================
2506 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape, 
2507                                                           CORBA::Double theR1,
2508                                                           CORBA::Double theR2,
2509                                                           GEOM::GEOM_List_ptr theFaces)
2510 {
2511   beginService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2512   MESSAGE("GEOM_Superv_i::MakeFilletFacesR1R2");
2513   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2514       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2515     getLocalOp();
2516     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFacesR1R2(theShape, theR1, theR2,
2517                                                                  aListImplF->GetList());
2518     endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2519     return anObj;
2520   }
2521   endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2522   return NULL;
2523 }
2524
2525 //=============================================================================
2526 //  MakeChamferAll:
2527 //=============================================================================
2528 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
2529 {
2530   beginService( " GEOM_Superv_i::MakeChamferAll" );
2531   MESSAGE("GEOM_Superv_i::MakeChamferAll");
2532   getLocalOp();
2533   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferAll(theShape, theD);
2534   endService( " GEOM_Superv_i::MakeChamferAll" );
2535   return anObj;
2536 }
2537   
2538 //=============================================================================
2539 //  MakeChamferEdge:
2540 //=============================================================================
2541 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
2542                                                       CORBA::Double theD1, CORBA::Double theD2,
2543                                                       CORBA::Long theFace1, CORBA::Long theFace2)
2544 {
2545   beginService( " GEOM_Superv_i::MakeChamferEdge" );
2546   MESSAGE("GEOM_Superv_i::MakeChamferEdge");
2547   getLocalOp();
2548   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
2549   endService( " GEOM_Superv_i::MakeChamferEdge" );
2550   return anObj;
2551 }
2552
2553 //=============================================================================
2554 //  MakeChamferEdgeAD:
2555 //=============================================================================
2556 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
2557                                                         CORBA::Double theD, CORBA::Double theAngle,
2558                                                         CORBA::Long theFace1, CORBA::Long theFace2)
2559 {
2560   beginService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2561   MESSAGE("GEOM_Superv_i::MakeChamferEdgeAD");
2562   getLocalOp();
2563   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2);
2564   endService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2565   return anObj;
2566 }
2567
2568 //=============================================================================
2569 //  MakeChamferFaces:
2570 //=============================================================================
2571 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
2572                                                        CORBA::Double theD1, CORBA::Double theD2,
2573                                                        GEOM::GEOM_List_ptr theFaces)
2574 {
2575   beginService( " GEOM_Superv_i::MakeChamferFaces" );
2576   MESSAGE("GEOM_Superv_i::MakeChamferFaces");
2577   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2578       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2579     getLocalOp();
2580     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
2581     endService( " GEOM_Superv_i::MakeChamferFaces" );
2582     return anObj;
2583   }
2584   endService( " GEOM_Superv_i::MakeChamferFaces" );
2585   return NULL;
2586 }
2587
2588 //=============================================================================
2589 //  MakeChamferFacesAD:
2590 //=============================================================================
2591 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
2592                                                          CORBA::Double theD, CORBA::Double theAngle,
2593                                                          GEOM::GEOM_List_ptr theFaces)
2594 {
2595   beginService( " GEOM_Superv_i::MakeChamferFacesAD" );
2596   MESSAGE("GEOM_Superv_i::MakeChamferFacesAD");
2597   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2598       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2599     getLocalOp();
2600     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFacesAD(theShape, theD, theAngle, aListImplF->GetList());
2601     endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2602     return anObj;
2603   }
2604   endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2605   return NULL;
2606 }
2607
2608 //=============================================================================
2609 //  MakeChamferEdges:
2610 //=============================================================================
2611 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
2612                                                        CORBA::Double theD1, CORBA::Double theD2,
2613                                                        GEOM::GEOM_List_ptr theEdges)
2614 {
2615   beginService( " GEOM_Superv_i::MakeChamferEdges" );
2616   MESSAGE("GEOM_Superv_i::MakeChamferEdges");
2617   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2618       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2619     getLocalOp();
2620     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdges(theShape, theD1, theD2, aListImplF->GetList());
2621     endService( " GEOM_Superv_i::MakeChamferEdges" );
2622     return anObj;
2623   }
2624   endService( " GEOM_Superv_i::MakeChamferEdges" );
2625   return NULL;
2626 }
2627
2628 //=============================================================================
2629 //  MakeChamferEdgesAD:
2630 //=============================================================================
2631 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
2632                                                          CORBA::Double theD, CORBA::Double theAngle,
2633                                                          GEOM::GEOM_List_ptr theEdges)
2634 {
2635   beginService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2636   MESSAGE("GEOM_Superv_i::MakeChamferEdgesAD");
2637   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2638       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2639     getLocalOp();
2640     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgesAD(theShape, theD, theAngle, aListImplF->GetList());
2641     endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2642     return anObj;
2643   }
2644   endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2645   return NULL;
2646 }
2647
2648 //=============================================================================
2649 //  MakeArchimede:
2650 //=============================================================================
2651 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
2652                                                     CORBA::Double theWeight,
2653                                                     CORBA::Double theWaterDensity,
2654                                                     CORBA::Double theMeshingDeflection)
2655 {
2656   beginService( " GEOM_Superv_i::MakeArchimede" );
2657   MESSAGE("GEOM_Superv_i::MakeArchimede");
2658   getLocalOp();
2659   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
2660   endService( " GEOM_Superv_i::MakeArchimede" );
2661   return anObj;
2662 }
2663
2664 //=============================================================================
2665 //  GetSubShapeIndexMakeFilletAll:
2666 //=============================================================================
2667 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
2668                                              GEOM::GEOM_Object_ptr theSubShape)
2669 {
2670   beginService( " GEOM_Superv_i::GetSubShapeIndex" );
2671   MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
2672   getLocalOp();
2673   CORBA::Long aRes = myLocalOp->GetSubShapeIndex(theShape, theSubShape);
2674   endService( " GEOM_Superv_i::GetSubShapeIndex" );
2675   return aRes;
2676 }
2677
2678 //=============================== GroupOperations =============================
2679 //=============================================================================
2680 //  CreateGroup:
2681 //=============================================================================
2682 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape, 
2683                                                   CORBA::Long theShapeType)
2684 {
2685   beginService( " GEOM_Superv_i::CreateGroup" );
2686   MESSAGE("GEOM_Superv_i::CreateGroup");
2687   getGroupOp();
2688   GEOM::GEOM_Object_ptr anObj = myGroupOp->CreateGroup(theMainShape, theShapeType);
2689   endService( " GEOM_Superv_i::CreateGroup" );
2690   return anObj;
2691 }
2692
2693 //=============================================================================
2694 //  AddObject:
2695 //=============================================================================
2696 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup, 
2697                                CORBA::Long theSubShapeId)
2698 {
2699   beginService( " GEOM_Superv_i::AddObject" );
2700   MESSAGE("GEOM_Superv_i::AddObject");
2701   getGroupOp();
2702   myGroupOp->AddObject(theGroup, theSubShapeId);
2703   endService( " GEOM_Superv_i::AddObject" );
2704 }
2705
2706 //=============================================================================
2707 //  RemoveObject:
2708 //=============================================================================
2709 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup, 
2710                                   CORBA::Long theSubShapeId)
2711 {
2712   beginService( " GEOM_Superv_i::RemoveObject" );
2713   MESSAGE("GEOM_Superv_i::RemoveObject");
2714   getGroupOp();
2715   myGroupOp->RemoveObject(theGroup, theSubShapeId);
2716   endService( " GEOM_Superv_i::RemoveObject" );
2717 }
2718
2719 //=============================================================================
2720 //  GetType:
2721 //=============================================================================
2722 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
2723 {
2724   beginService( " GEOM_Superv_i::GetType" );
2725   MESSAGE("GEOM_Superv_i::GetType");
2726   getGroupOp();
2727   CORBA::Long aResult = myGroupOp->GetType(theGroup);
2728   endService( " GEOM_Superv_i::GetType" );
2729   return aResult;
2730 }
2731
2732 //=============================================================================
2733 //  GetMainShape:
2734 //=============================================================================
2735 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
2736 {
2737   beginService( " GEOM_Superv_i::GetMainShape" );
2738   MESSAGE("GEOM_Superv_i::GetMainShape");
2739   getGroupOp();
2740   GEOM::GEOM_Object_ptr anObj = myGroupOp->GetMainShape(theGroup);
2741   endService( " GEOM_Superv_i::GetMainShape" );
2742   return anObj;
2743 }
2744
2745 //=============================================================================
2746 //  GetObjects:
2747 //=============================================================================
2748 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
2749 {
2750   beginService( " GEOM_Superv_i::GetObjects" );
2751   MESSAGE("GEOM_Superv_i::GetObjects");
2752   getGroupOp();
2753
2754   GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
2755   GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
2756   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2757   endService( " GEOM_Superv_i::GetObjects" );
2758   return aListPtr->_this();
2759 }
2760
2761 //=====================================================================================
2762 // EXPORTED METHODS
2763 //=====================================================================================
2764 extern "C"
2765 {
2766   PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
2767                                                       PortableServer::POA_ptr poa, 
2768                                                       PortableServer::ObjectId * contId,
2769                                                       const char *instanceName, 
2770                                                       const char * interfaceName)
2771   {
2772     GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
2773     //Don't understand the reason why this component is registered ???
2774 //    myGEOM_Superv_i->register_name("/myGEOM_Superv");
2775     return myGEOM_Superv_i->getId() ;
2776   }
2777 }