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