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