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