]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_I_Superv/GEOM_Superv_i.cc
Salome HOME
6518d8338f871932ca6f1236976e13541d7e84af
[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 //  MakeMarkerFromShape:
807 //=============================================================================
808 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarkerFromShape (GEOM::GEOM_Object_ptr theShape)
809 {
810   beginService( " GEOM_Superv_i::MakeMarkerFromShape" );
811   MESSAGE("GEOM_Superv_i::MakeMarkerFromShape");
812   getBasicOp();
813   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeMarkerFromShape(theShape);
814   endService( " GEOM_Superv_i::MakeMarkerFromShape" );
815   return anObj;
816 }
817
818 //=============================================================================
819 //  MakeMarkerPntTwoVec:
820 //=============================================================================
821 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarkerPntTwoVec (GEOM::GEOM_Object_ptr theOrigin,
822                                                           GEOM::GEOM_Object_ptr theXVec,
823                                                           GEOM::GEOM_Object_ptr theYVec)
824 {
825   beginService( " GEOM_Superv_i::MakeMarkerPntTwoVec" );
826   MESSAGE("GEOM_Superv_i::MakeMarkerPntTwoVec");
827   getBasicOp();
828   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec);
829   endService( " GEOM_Superv_i::MakeMarkerPntTwoVec" );
830   return anObj;
831 }
832
833 //=============================================================================
834 //  MakeTangentPlaneOnFace:
835 //=============================================================================
836 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTangentPlaneOnFace (GEOM::GEOM_Object_ptr theFace, 
837                                                  CORBA::Double theParameterU,
838                                                  CORBA::Double theParameterV,
839                                                  CORBA::Double theTrimSize)
840 {
841   beginService( " GEOM_Superv_i::MakeTangentPlaneOnFace" );
842   MESSAGE("GEOM_Superv_i::MakeTangentPlaneOnFace");
843   getBasicOp();
844   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeTangentPlaneOnFace(theFace, theParameterU,theParameterV,theTrimSize);
845   endService( " GEOM_Superv_i::MakeTangentPlaneOnFace" );
846   return anObj;
847 }
848
849 //================= Primitives Construction : 3DPrimOperations ================
850 //=============================================================================
851 //  MakeBox:
852 //=============================================================================
853 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBox (CORBA::Double theX1,
854                                               CORBA::Double theY1,
855                                               CORBA::Double theZ1,
856                                               CORBA::Double theX2,
857                                               CORBA::Double theY2,
858                                               CORBA::Double theZ2)
859 {
860   beginService( " GEOM_Superv_i::MakeBox" );
861   MESSAGE("GEOM_Superv_i::MakeBox");
862   getBasicOp();
863   get3DPrimOp();
864   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1),
865                                                           myBasicOp->MakePointXYZ(theX2, theY2, theZ2));
866   endService( " GEOM_Superv_i::MakeBox" );
867   return anObj;
868 }
869
870 //=============================================================================
871 //  MakeBoxDXDYDZ:
872 //=============================================================================
873 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxDXDYDZ (CORBA::Double theDX, 
874                                                     CORBA::Double theDY, 
875                                                     CORBA::Double theDZ)
876 {
877   beginService( " GEOM_Superv_i::MakeBoxDXDYDZ" );
878   MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ");
879   get3DPrimOp();
880   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ);
881   endService( " GEOM_Superv_i::MakeBoxDXDYDZ" );
882   return anObj;
883 }
884
885 //=============================================================================
886 //  MakeBoxTwoPnt:
887 //=============================================================================
888 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1, 
889                                                     GEOM::GEOM_Object_ptr thePnt2)
890 {
891   beginService( " GEOM_Superv_i::MakeBoxTwoPnt" );
892   MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt");
893   get3DPrimOp();
894   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2);
895   endService( " GEOM_Superv_i::MakeBoxTwoPnt" );
896   return anObj;
897 }
898
899 //=============================================================================
900 //  MakeFaceHW:
901 //=============================================================================
902 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceHW (CORBA::Double theH,
903                                                  CORBA::Double theW,
904                                                  CORBA::Short  theOrientation)
905 {
906   beginService( " GEOM_Superv_i::MakeFaceHW" );
907   MESSAGE("GEOM_Superv_i::MakeFaceHW");
908   get3DPrimOp();
909   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFaceHW(theH, theW, theOrientation);
910   endService( " GEOM_Superv_i::MakeFaceHW" );
911   return anObj;
912 }
913
914 //=============================================================================
915 //  MakeFaceObjHW:
916 //=============================================================================
917 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceObjHW (GEOM::GEOM_Object_ptr theObj, 
918                                                     CORBA::Double theH,
919                                                     CORBA::Double theW)
920 {
921   beginService( " GEOM_Superv_i::MakeFaceObjHW" );
922   MESSAGE("GEOM_Superv_i::MakeFaceObjHW");
923   get3DPrimOp();
924   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFaceObjHW(theObj, theH, theW);
925   endService( " GEOM_Superv_i::MakeFaceObjHW" );
926   return anObj;
927 }
928
929 //=============================================================================
930 //  MakeDiskPntVecR:
931 //=============================================================================
932 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDiskPntVecR (GEOM::GEOM_Object_ptr theCenter,
933                                                       GEOM::GEOM_Object_ptr theVector,
934                                                       CORBA::Double theR)
935 {
936   beginService( " GEOM_Superv_i::MakeDiskPntVecR" );
937   MESSAGE("GEOM_Superv_i::MakeDiskPntVecR");
938   get3DPrimOp();
939   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeDiskPntVecR(theCenter, theVector, theR);
940   endService( " GEOM_Superv_i::MakeDiskPntVecR" );
941   return anObj;
942 }
943
944 //=============================================================================
945 //  MakeDiskThreePnt:
946 //=============================================================================
947 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDiskThreePnt (GEOM::GEOM_Object_ptr thePnt1,
948                                                        GEOM::GEOM_Object_ptr thePnt2,
949                                                        GEOM::GEOM_Object_ptr thePnt3)
950 {
951   beginService( " GEOM_Superv_i::MakeDiskThreePnt" );
952   MESSAGE("GEOM_Superv_i::MakeDiskThreePnt");
953   get3DPrimOp();
954   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeDiskThreePnt(thePnt1, thePnt2, thePnt3);
955   endService( " GEOM_Superv_i::MakeDiskThreePnt" );
956   return anObj;
957 }
958
959 //=============================================================================
960 //  MakeDiskR:
961 //=============================================================================
962 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDiskR (CORBA::Double theR,
963                                                 CORBA::Short  theOrientation)
964 {
965   beginService( " GEOM_Superv_i::MakeDiskR" );
966   MESSAGE("GEOM_Superv_i::MakeDiskR");
967   get3DPrimOp();
968   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeDiskR(theR, theOrientation);
969   endService( " GEOM_Superv_i::MakeDiskR" );
970   return anObj;
971 }
972
973 //=============================================================================
974 //  MakeCylinderPntVecRH:
975 //=============================================================================
976 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
977                                                            GEOM::GEOM_Object_ptr theAxis,
978                                                            CORBA::Double theRadius,
979                                                            CORBA::Double theHeight)
980 {
981   beginService( " GEOM_Superv_i::MakeCylinderPntVecRH" );
982   MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH");
983   get3DPrimOp();
984   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight);
985   endService( " GEOM_Superv_i::MakeCylinderPntVecRH" );
986   return anObj;
987 }
988
989 //=============================================================================
990 //  MakeCylinderRH:
991 //=============================================================================
992 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR, 
993                                                      CORBA::Double theH)
994 {
995   beginService( " GEOM_Superv_i::MakeCylinderRH" );
996   MESSAGE("GEOM_Superv_i::MakeCylinderRH");
997   get3DPrimOp();
998   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderRH(theR, theH);
999   endService( " GEOM_Superv_i::MakeCylinderRH" );
1000   return anObj; 
1001 }
1002
1003 //=============================================================================
1004 //  MakeSphere:
1005 //=============================================================================
1006 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere  (CORBA::Double theX,
1007                                                   CORBA::Double theY,
1008                                                   CORBA::Double theZ,
1009                                                   CORBA::Double theRadius)
1010 {
1011   beginService( " GEOM_Superv_i::MakeSphepe" );
1012   MESSAGE("GEOM_Superv_i::MakeSphepe");
1013   getBasicOp();
1014   get3DPrimOp();
1015   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
1016   endService( " GEOM_Superv_i::MakeSphepe" );
1017   return anObj;
1018 }
1019
1020 //=============================================================================
1021 //  MakeSphereR:
1022 //=============================================================================
1023 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
1024 {
1025   beginService( " GEOM_Superv_i::MakeSphereR" );
1026   MESSAGE("GEOM_Superv_i::MakeSphereR");
1027   get3DPrimOp();
1028   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSphereR(theR);
1029   endService( " GEOM_Superv_i::MakeSphereR" );
1030   return anObj;
1031 }
1032
1033 //=============================================================================
1034 //  MakeSpherePntR:
1035 //=============================================================================
1036 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt, 
1037                                                      CORBA::Double theR)
1038 {
1039   beginService( " GEOM_Superv_i::MakeSpherePntR" );
1040   MESSAGE("GEOM_Superv_i::MakeSpherePntR");
1041   get3DPrimOp();
1042   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(thePnt, theR);
1043   endService( " GEOM_Superv_i::MakeSpherePntR" );
1044   return anObj;
1045 }
1046
1047 //=============================================================================
1048 //  MakeTorusPntVecRR:
1049 //=============================================================================
1050 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
1051                                                         GEOM::GEOM_Object_ptr theVec,
1052                                                         CORBA::Double theRMajor,
1053                                                         CORBA::Double theRMinor)
1054 {
1055   beginService( " GEOM_Superv_i::MakeTorusPntVecRR" );
1056   MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
1057   get3DPrimOp();
1058   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
1059   endService( " GEOM_Superv_i::MakeTorusPntVecRR" );
1060   return anObj;
1061 }
1062
1063 //=============================================================================
1064 //  MakeTorusRR:
1065 //=============================================================================
1066 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor,
1067                                                   CORBA::Double theRMinor)
1068 {
1069   beginService( " GEOM_Superv_i::MakeTorusRR" );
1070   MESSAGE("GEOM_Superv_i::MakeTorusRR");
1071   get3DPrimOp();
1072   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
1073   endService( " GEOM_Superv_i::MakeTorusRR" );
1074   return anObj;
1075 }
1076
1077 //=============================================================================
1078 //  MakeConePntVecR1R2H:
1079 //=============================================================================
1080 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
1081                                                           GEOM::GEOM_Object_ptr theAxis,
1082                                                           CORBA::Double theR1,
1083                                                           CORBA::Double theR2,
1084                                                           CORBA::Double theHeight)
1085 {
1086   beginService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
1087   MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
1088   get3DPrimOp();
1089   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
1090   endService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
1091   return anObj;
1092 }
1093
1094 //=============================================================================
1095 //  MakeConeR1R2H:
1096 //=============================================================================
1097 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1, 
1098                                                     CORBA::Double theR2, 
1099                                                     CORBA::Double theHeight)
1100 {
1101   beginService( " GEOM_Superv_i::MakeConeR1R2H" );
1102   MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
1103   get3DPrimOp();
1104   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
1105   endService( " GEOM_Superv_i::MakeConeR1R2H" );
1106   return anObj;
1107 }
1108
1109 //=============================================================================
1110 //  MakePrismVecH:
1111 //=============================================================================
1112 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
1113                                                     GEOM::GEOM_Object_ptr theVec,
1114                                                     CORBA::Double         theH)
1115 {
1116   beginService( " GEOM_Superv_i::MakePrismVecH" );
1117   MESSAGE("GEOM_Superv_i::MakePrismVecH");
1118   get3DPrimOp();
1119   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
1120   endService( " GEOM_Superv_i::MakePrismVecH" );
1121   return anObj;
1122 }
1123
1124 //=============================================================================
1125 //  MakePrismVecH2Ways:
1126 //=============================================================================
1127 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
1128                                                          GEOM::GEOM_Object_ptr theVec,
1129                                                          CORBA::Double         theH)
1130 {
1131   beginService( " GEOM_Superv_i::MakePrismVecH2Ways" );
1132   MESSAGE("GEOM_Superv_i::MakePrismVecH2Ways");
1133   get3DPrimOp();
1134   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH2Ways(theBase, theVec, theH);
1135   endService( " GEOM_Superv_i::MakePrismVecH2Ways" );
1136   return anObj;
1137 }
1138
1139 //=============================================================================
1140 //  MakePrismTwoPnt:
1141 //=============================================================================
1142 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
1143                                                       GEOM::GEOM_Object_ptr thePoint1,
1144                                                       GEOM::GEOM_Object_ptr thePoint2)
1145 {
1146   beginService( " GEOM_Superv_i::MakePrismTwoPnt" );
1147   MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
1148   get3DPrimOp();
1149   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
1150   endService( " GEOM_Superv_i::MakePrismTwoPnt" );
1151   return anObj;
1152 }
1153
1154 //=============================================================================
1155 //  MakePrismTwoPnt2Ways:
1156 //=============================================================================
1157 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
1158                                                            GEOM::GEOM_Object_ptr thePoint1,
1159                                                            GEOM::GEOM_Object_ptr thePoint2)
1160 {
1161   beginService( " GEOM_Superv_i::MakePrismTwoPnt2Ways" );
1162   MESSAGE("GEOM_Superv_i::MakePrismTwoPnt2Ways");
1163   get3DPrimOp();
1164   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2);
1165   endService( " GEOM_Superv_i::MakePrismTwoPnt2Ways" );
1166   return anObj;
1167 }
1168
1169 //=============================================================================
1170 //  MakePrismDXDYDZ:
1171 //=============================================================================
1172 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismDXDYDZ (GEOM::GEOM_Object_ptr theBase,
1173                       CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ)
1174 {
1175   beginService( " GEOM_Superv_i::MakePrismDXDYDZ" );
1176   MESSAGE("GEOM_Superv_i::MakePrismDXDYDZ");
1177   get3DPrimOp();
1178   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismDXDYDZ(theBase, theDX, theDY, theDZ);
1179   endService( " GEOM_Superv_i::MakePrismDXDYDZ" );
1180   return anObj;
1181 }
1182
1183 //=============================================================================
1184 //  MakePrismDXDYDZ:
1185 //=============================================================================
1186 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismDXDYDZ2Ways (GEOM::GEOM_Object_ptr theBase,
1187                       CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ)
1188 {
1189   beginService( " GEOM_Superv_i::MakePrismDXDYDZ2Ways" );
1190   MESSAGE("GEOM_Superv_i::MakePrismDXDYDZ2Ways");
1191   get3DPrimOp();
1192   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ);
1193   endService( " GEOM_Superv_i::MakePrismDXDYDZ2Ways" );
1194   return anObj;
1195 }
1196
1197 //=============================================================================
1198 //  MakePipe:
1199 //=============================================================================
1200 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase, 
1201                                                GEOM::GEOM_Object_ptr thePath)
1202 {
1203   beginService( " GEOM_Superv_i::MakePipe" );
1204   MESSAGE("GEOM_Superv_i::MakePipe");
1205   get3DPrimOp();
1206   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipe(theBase, thePath);
1207   endService( " GEOM_Superv_i::MakePipe" );
1208   return anObj;
1209 }
1210
1211 //=============================================================================
1212 //  MakeRevolutionAxisAngle:
1213 //=============================================================================
1214 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
1215                                                               GEOM::GEOM_Object_ptr theAxis,
1216                                                               CORBA::Double theAngle)
1217 {
1218   beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
1219   MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
1220   get3DPrimOp();
1221   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
1222   endService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
1223   return anObj;
1224 }
1225
1226 //=============================================================================
1227 //  MakeRevolutionAxisAngle:
1228 //=============================================================================
1229 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
1230                                                                    GEOM::GEOM_Object_ptr theAxis,
1231                                                                    CORBA::Double theAngle)
1232 {
1233   beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle2Ways" );
1234   MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle2Ways");
1235   get3DPrimOp();
1236   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle);
1237   endService( " GEOM_Superv_i::MakeRevolutionAxisAngle2Ways" );
1238   return anObj;
1239 }
1240
1241 //=============================================================================
1242 //  MakeFilling:
1243 //=============================================================================
1244 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
1245                                                   CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
1246                                                   CORBA::Double theTol2D, CORBA::Double theTol3D,
1247                                                   CORBA::Long theNbIter, CORBA::Boolean theApprox)
1248 {
1249   beginService( " GEOM_Superv_i::MakeFilling" );
1250   MESSAGE("GEOM_Superv_i::MakeFilling");
1251   get3DPrimOp();
1252   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theApprox);
1253   endService( " GEOM_Superv_i::MakeFilling" );
1254   return anObj;
1255 }
1256
1257 //============================= BooleanOperations =============================
1258 //=============================================================================
1259 //  MakeBoolean:
1260 //=============================================================================
1261 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
1262                                                   GEOM::GEOM_Object_ptr theShape2,
1263                                                   CORBA::Long theOperation)
1264 {
1265   beginService( " GEOM_Superv_i::MakeBoolean" );
1266   // theOperation indicates the operation to be done:
1267   // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
1268   MESSAGE("GEOM_Superv_i::MakeBoolean");
1269   getBoolOp();
1270   GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
1271   endService( " GEOM_Superv_i::MakeBoolean" );
1272   return anObj;
1273 }
1274
1275 //=============================================================================
1276 //  MakeThruSections:
1277 //=============================================================================
1278 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeThruSections(const GEOM::ListOfGO& theSeqSections,
1279                                          CORBA::Boolean theModeSolid,
1280                                          CORBA::Double thePreci,
1281                                          CORBA::Boolean theRuled)
1282 {
1283   beginService( " GEOM_Superv_i::MakeThruSections" );
1284   MESSAGE("GEOM_Superv_i::MakeThruSections");
1285   get3DPrimOp();
1286   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeThruSections(theSeqSections, theModeSolid,thePreci,theRuled);
1287   endService( " GEOM_Superv_i::MakeThruSections" );
1288   return anObj;
1289 }
1290
1291 //=============================================================================
1292 //  MakePipe:
1293 //=============================================================================
1294 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithDifferentSections
1295                      (const GEOM::ListOfGO& theBases,
1296                       const GEOM::ListOfGO& theLocations,
1297                       GEOM::GEOM_Object_ptr thePath,
1298                       CORBA::Boolean theWithContact,
1299                       CORBA::Boolean theWithCorrections)
1300 {
1301   beginService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
1302   MESSAGE("GEOM_Superv_i::MakePipeWithDifferentSections");
1303   get3DPrimOp();
1304   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipeWithDifferentSections(theBases,theLocations, thePath,theWithContact,theWithCorrections);
1305   endService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
1306   return anObj;
1307 }
1308
1309
1310 //=============================================================================
1311 //  MakePipe:
1312 //=============================================================================
1313 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithShellSections
1314                    (const GEOM::ListOfGO& theBases,
1315                     const GEOM::ListOfGO& theSubBases,
1316                     const GEOM::ListOfGO& theLocations,
1317                     GEOM::GEOM_Object_ptr thePath,
1318                     CORBA::Boolean theWithContact,
1319                     CORBA::Boolean theWithCorrections)
1320 {
1321   beginService( " GEOM_Superv_i::MakePipeWithShellSections" );
1322   MESSAGE("GEOM_Superv_i::MakePipeWithShellSections");
1323   get3DPrimOp();
1324   GEOM::GEOM_Object_ptr anObj =
1325     my3DPrimOp->MakePipeWithShellSections(theBases, theSubBases,
1326                                           theLocations, thePath,
1327                                           theWithContact, theWithCorrections);
1328   endService( " GEOM_Superv_i::MakePipeWithShellSections" );
1329   return anObj;
1330 }
1331
1332
1333 //=============================================================================
1334 //  MakePipe:
1335 //=============================================================================
1336 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeShellsWithoutPath
1337                    (const GEOM::ListOfGO& theBases,
1338                     const GEOM::ListOfGO& theLocations)
1339 {
1340   beginService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1341   MESSAGE("GEOM_Superv_i::MakePipeShellsWithoutPath");
1342   get3DPrimOp();
1343   GEOM::GEOM_Object_ptr anObj =
1344     my3DPrimOp->MakePipeShellsWithoutPath(theBases,theLocations);
1345   endService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1346   return anObj;
1347 }
1348
1349
1350 //=============================================================================
1351 //  MakePipe:
1352 //=============================================================================
1353 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeBiNormalAlongVector 
1354                                                 (GEOM::GEOM_Object_ptr theBase, 
1355                                                  GEOM::GEOM_Object_ptr thePath, 
1356                                                  GEOM::GEOM_Object_ptr theVec)
1357 {
1358   beginService( " GEOM_Superv_i::MakePipeBiNormalAlongVector" );
1359   MESSAGE("GEOM_Superv_i::MakePipeBiNormalAlongVector");
1360   get3DPrimOp();
1361   GEOM::GEOM_Object_ptr anObj = 
1362     my3DPrimOp->MakePipeBiNormalAlongVector(theBase, thePath, theVec);
1363   endService( " GEOM_Superv_i::MakePipeBiNormalAlongVector" );
1364   return anObj;
1365 }
1366
1367
1368 //=============================================================================
1369 //  MakeFuse:
1370 //=============================================================================
1371 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1,
1372                                                GEOM::GEOM_Object_ptr theShape2)
1373 {
1374   beginService( " GEOM_Superv_i::MakeFuse" );
1375   MESSAGE("GEOM_Superv_i::MakeFuse");
1376   getBoolOp();
1377   GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeBoolean(theShape1, theShape2, 3);
1378   endService( " GEOM_Superv_i::MakeFuse" );
1379   return anObj;
1380 }
1381
1382 //=============================================================================
1383 //  MakePartition:
1384 //=============================================================================
1385 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr   theShapes,
1386                                                     GEOM::GEOM_List_ptr   theTools,
1387                                                     GEOM::GEOM_List_ptr   theKeepInside,
1388                                                     GEOM::GEOM_List_ptr   theRemoveInside,
1389                                                     CORBA::Short      theLimit,
1390                                                     CORBA::Boolean    theRemoveWebs,
1391                                                     GEOM::GEOM_List_ptr theMaterials,
1392                                                     CORBA::Short theKeepNonlimitShapes)
1393 {
1394   beginService( " GEOM_Superv_i::MakePartition" );
1395   MESSAGE("GEOM_Superv_i::MakePartition");
1396   GEOM_List_i<GEOM::ListOfGO>* aListImplS = 
1397     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in());
1398   GEOM_List_i<GEOM::ListOfGO>* aListImplT = 
1399     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theTools, myPOA).in());
1400   GEOM_List_i<GEOM::ListOfGO>* aListImplKI = 
1401     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theKeepInside, myPOA).in());
1402   GEOM_List_i<GEOM::ListOfGO>* aListImplRI = 
1403     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theRemoveInside, myPOA).in());
1404   GEOM_List_i<GEOM::ListOfLong>* aListImplM = 
1405     dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theMaterials, myPOA).in());
1406   if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
1407     getBoolOp();
1408     GEOM::GEOM_Object_ptr anObj =
1409       myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(), 
1410                               aListImplKI->GetList(), aListImplRI->GetList(),
1411                               theLimit, theRemoveWebs, aListImplM->GetList(),
1412                               theKeepNonlimitShapes);
1413     endService( " GEOM_Superv_i::MakePartition" );
1414     return anObj;
1415   }
1416   endService( " GEOM_Superv_i::MakePartition" );
1417   return NULL;
1418 }
1419
1420 //=============================================================================
1421 //  MakeHalfPartition:
1422 //=============================================================================
1423 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
1424                                                         GEOM::GEOM_Object_ptr thePlane)
1425 {
1426   beginService( " GEOM_Superv_i::MakeHalfPartition" );
1427   MESSAGE("GEOM_Superv_i::MakeHalfPartition");
1428   getBoolOp();
1429   GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeHalfPartition(theShape, thePlane);
1430   endService( " GEOM_Superv_i::MakeHalfPartition" );
1431   return anObj;
1432 }
1433
1434 //============================== InsertOperations =============================
1435 //=============================================================================
1436 //  MakeCopy:
1437 //=============================================================================
1438 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
1439 {
1440   beginService( " GEOM_Superv_i::MakeCopy" );
1441   MESSAGE("GEOM_Superv_i::MakeCopy");
1442   getInsOp();
1443   GEOM::GEOM_Object_ptr anObj = myInsOp->MakeCopy(theOriginal);
1444   endService( " GEOM_Superv_i::MakeCopy" );
1445   return anObj;
1446 }
1447
1448 //=============================================================================
1449 //  Export:
1450 //=============================================================================
1451 void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject, 
1452                             const char*           theFileName, 
1453                             const char*           theFormatName)
1454 {
1455   beginService( " GEOM_Superv_i::Export" );
1456   MESSAGE("GEOM_Superv_i::Export");
1457   getInsOp();
1458   myInsOp->Export(theObject, theFileName, theFormatName);
1459   endService( " GEOM_Superv_i::Export" );
1460 }
1461
1462 //=============================================================================
1463 //  Import:
1464 //=============================================================================
1465 GEOM::GEOM_Object_ptr GEOM_Superv_i::Import (const char* theFileName, 
1466                                              const char* theFormatName)
1467 {
1468   beginService( " GEOM_Superv_i::Import" );
1469   MESSAGE("GEOM_Superv_i::Import");
1470   getInsOp();
1471   GEOM::GEOM_Object_ptr anObj = myInsOp->Import(theFileName, theFormatName);
1472   endService( " GEOM_Superv_i::Import" );
1473   return anObj;
1474 }
1475
1476 //=============================================================================
1477 //  ImportTranslators:
1478 //=============================================================================
1479 void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
1480                                        GEOM::string_array_out thePatterns)
1481 {
1482   beginService( " GEOM_Superv_i::ImportTranslators" );
1483   MESSAGE("GEOM_Superv_i::ImportTranslators");
1484   getInsOp();
1485   myInsOp->ImportTranslators(theFormats, thePatterns);
1486   endService( " GEOM_Superv_i::ImportTranslators" );
1487 }
1488
1489 //=============================================================================
1490 //  ExportTranslators:
1491 //=============================================================================
1492 void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
1493                                        GEOM::string_array_out thePatterns)
1494 {
1495   beginService( " GEOM_Superv_i::ExportTranslators" );
1496   MESSAGE("GEOM_Superv_i::ExportTranslators");
1497   getInsOp();
1498   myInsOp->ExportTranslators(theFormats, thePatterns);
1499   endService( " GEOM_Superv_i::ExportTranslators" );
1500 }
1501
1502 //============================= TransformOperations ===========================
1503 //=============================================================================
1504 //  TranslateTwoPoints:
1505 //=============================================================================
1506 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
1507                                                          GEOM::GEOM_Object_ptr thePoint1,
1508                                                          GEOM::GEOM_Object_ptr thePoint2)
1509 {
1510   beginService( " GEOM_Superv_i::TranslateTwoPoints" );
1511   MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
1512   getTransfOp();
1513   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
1514   endService( " GEOM_Superv_i::TranslateTwoPoints" );
1515   return anObj;
1516 }
1517
1518 //=============================================================================
1519 //  TranslateTwoPointsCopy:
1520 //=============================================================================
1521 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
1522                                                              GEOM::GEOM_Object_ptr thePoint1,
1523                                                              GEOM::GEOM_Object_ptr thePoint2)
1524 {
1525   beginService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1526   MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
1527   getTransfOp();
1528   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
1529   endService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1530   return anObj;
1531 }
1532
1533 //=============================================================================
1534 //  TranslateDXDYDZ:
1535 //=============================================================================
1536 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
1537                                                       CORBA::Double theDX, 
1538                                                       CORBA::Double theDY, 
1539                                                       CORBA::Double theDZ)
1540 {
1541   beginService( " GEOM_Superv_i::TranslateDXDYDZ" );
1542   MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
1543   getTransfOp();
1544   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
1545   endService( " GEOM_Superv_i::TranslateDXDYDZ" );
1546   return anObj;
1547 }
1548
1549 //=============================================================================
1550 //  TranslateDXDYDZCopy:
1551 //=============================================================================
1552 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
1553                                                           CORBA::Double theDX, 
1554                                                           CORBA::Double theDY, 
1555                                                           CORBA::Double theDZ)
1556 {
1557   beginService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1558   MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
1559   getTransfOp();
1560   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
1561   endService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1562   return anObj;
1563 }
1564
1565 //=============================================================================
1566 //  TranslateVector:
1567 //=============================================================================
1568 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject,
1569                                                       GEOM::GEOM_Object_ptr theVector)
1570 {
1571   beginService( " GEOM_Superv_i::TranslateVector" );
1572   MESSAGE("GEOM_Superv_i::TranslateVector");
1573   getTransfOp();
1574   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVector(theObject, theVector);
1575   endService( " GEOM_Superv_i::TranslateVector" );
1576   return anObj;
1577 }
1578
1579 //=============================================================================
1580 //  TranslateVectorCopy:
1581 //=============================================================================
1582 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
1583                                                           GEOM::GEOM_Object_ptr theVector)
1584 {
1585   beginService( " GEOM_Superv_i::TranslateVectorCopy" );
1586   MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
1587   getTransfOp();
1588   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorCopy(theObject, theVector);
1589   endService( " GEOM_Superv_i::TranslateVectorCopy" );
1590   return anObj;
1591 }
1592
1593 //=============================================================================
1594 //  TranslateVectorDistance:
1595 //=============================================================================
1596 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
1597                                                               GEOM::GEOM_Object_ptr theVector,
1598                                                               CORBA::Double theDistance,
1599                                                               CORBA::Boolean theCopy)
1600 {
1601   beginService( " GEOM_Superv_i::TranslateVectorDistance" );
1602   MESSAGE("GEOM_Superv_i::TranslateVectorDistance");
1603   getTransfOp();
1604   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorDistance(theObject, 
1605                                                                     theVector, theDistance, theCopy);
1606   endService( " GEOM_Superv_i::TranslateVectorDistance" );
1607   return anObj;
1608 }
1609
1610 //=============================================================================
1611 //  MultiTranslate1D:
1612 //=============================================================================
1613 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
1614                                                        GEOM::GEOM_Object_ptr theVector,
1615                                                        CORBA::Double theStep,
1616                                                        CORBA::Long theNbTimes)
1617 {
1618   beginService( " GEOM_Superv_i::MultiTranslate1D" );
1619   MESSAGE("GEOM_Superv_i::MultiTranslate1D");
1620   getTransfOp();
1621   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
1622   endService( " GEOM_Superv_i::MultiTranslate1D" );
1623   return anObj;
1624 }
1625
1626 //=============================================================================
1627 //  MultiTranslate2D:
1628 //=============================================================================
1629 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
1630                                                        GEOM::GEOM_Object_ptr theVector1,
1631                                                        CORBA::Double theStep1,
1632                                                        CORBA::Long theNbTimes1,
1633                                                        GEOM::GEOM_Object_ptr theVector2,
1634                                                        CORBA::Double theStep2,
1635                                                        CORBA::Long theNbTimes2)
1636 {
1637   beginService( " GEOM_Superv_i::MultiTranslate2D" );
1638   MESSAGE("GEOM_Superv_i::MultiTranslate2D");
1639   getTransfOp();
1640   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
1641                                                              theVector2, theStep2, theNbTimes2);
1642   endService( " GEOM_Superv_i::MultiTranslate2D" );
1643   return anObj;
1644 }
1645
1646 //=============================================================================
1647 //  Rotate:
1648 //=============================================================================
1649 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
1650                                              GEOM::GEOM_Object_ptr theAxis,
1651                                              CORBA::Double theAngle)
1652 {
1653   beginService( " GEOM_Superv_i::Rotate" );
1654   MESSAGE("GEOM_Superv_i::Rotate");
1655   getTransfOp();
1656   GEOM::GEOM_Object_ptr anObj = myTransfOp->Rotate(theObject, theAxis, theAngle);
1657   endService( " GEOM_Superv_i::Rotate" );
1658   return anObj;
1659 }
1660
1661 //=============================================================================
1662 //  RotateCopy:
1663 //=============================================================================
1664 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
1665                                                  GEOM::GEOM_Object_ptr theAxis,
1666                                                  CORBA::Double theAngle)
1667 {
1668   beginService( " GEOM_Superv_i::RotateCopy" );
1669   MESSAGE("GEOM_Superv_i::RotateCopy");
1670   getTransfOp();
1671   GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateCopy(theObject, theAxis, theAngle);
1672   endService( " GEOM_Superv_i::RotateCopy" );
1673   return anObj;
1674 }
1675 //=============================================================================
1676 //  RotateThreePoints:
1677 //=============================================================================
1678 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
1679                                                         GEOM::GEOM_Object_ptr theCentPoint,
1680                                                         GEOM::GEOM_Object_ptr thePoint1,
1681                                                         GEOM::GEOM_Object_ptr thePoint2)
1682 {
1683   beginService( " GEOM_Superv_i::RotateThreePoints" );
1684   MESSAGE("GEOM_Superv_i::RotateThreePoints");
1685   getTransfOp();
1686   GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2);
1687   endService( " GEOM_Superv_i::RotateThreePoints" );
1688   return anObj;
1689 }
1690
1691 //=============================================================================
1692 //  RotateThreePointsCopy:
1693 //=============================================================================
1694 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
1695                                                             GEOM::GEOM_Object_ptr theCentPoint,
1696                                                             GEOM::GEOM_Object_ptr thePoint1,
1697                                                             GEOM::GEOM_Object_ptr thePoint2)
1698 {
1699   beginService( " GEOM_Superv_i::RotateThreePointsCopy" );
1700   MESSAGE("GEOM_Superv_i::RotateThreePointsCopy");
1701   getTransfOp();
1702   GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2);
1703   endService( " GEOM_Superv_i::RotateThreePointsCopy" );
1704   return anObj;
1705 }
1706
1707 //=============================================================================
1708 //  MultiRotate1D:
1709 //=============================================================================
1710 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1711                                                     GEOM::GEOM_Object_ptr theAxis,
1712                                                     CORBA::Long theNbTimes)
1713 {
1714   beginService( " GEOM_Superv_i::MultiRotate1D" );
1715   MESSAGE("GEOM_Superv_i::MultiRotate1D");
1716   getTransfOp();
1717   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
1718   endService( " GEOM_Superv_i::MultiRotate1D" );
1719   return anObj;
1720 }
1721
1722 //=============================================================================
1723 //  MultiRotate2D:
1724 //=============================================================================
1725 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1726                                                     GEOM::GEOM_Object_ptr theAxis,
1727                                                     CORBA::Double theAngle,
1728                                                     CORBA::Long theNbTimes1,
1729                                                     CORBA::Double theStep,
1730                                                     CORBA::Long theNbTimes2)
1731 {
1732   beginService( " GEOM_Superv_i::MultiRotate2D" );
1733   MESSAGE("GEOM_Superv_i::MultiRotate2D");
1734   getTransfOp();
1735   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
1736   endService( " GEOM_Superv_i::MultiRotate2D" );
1737   return anObj;
1738 }
1739
1740 //=============================================================================
1741 //  MirrorPlane:
1742 //=============================================================================
1743 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject, 
1744                                                   GEOM::GEOM_Object_ptr thePlane)
1745 {
1746   beginService( " GEOM_Superv_i::MirrorPlane" );
1747   MESSAGE("GEOM_Superv_i::MirrorPlane");
1748   getTransfOp();
1749   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlane(theObject, thePlane);
1750   endService( " GEOM_Superv_i::MirrorPlane" );
1751   return anObj;
1752 }
1753
1754 //=============================================================================
1755 //  MirrorPlaneCopy:
1756 //=============================================================================
1757 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject, 
1758                                                       GEOM::GEOM_Object_ptr thePlane)
1759 {
1760   beginService( " GEOM_Superv_i::MirrorPlaneCopy" );
1761   MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
1762   getTransfOp();
1763   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlaneCopy(theObject, thePlane);
1764   endService( " GEOM_Superv_i::MirrorPlaneCopy" );
1765   return anObj;
1766 }
1767
1768 //=============================================================================
1769 //  MirrorAxis:
1770 //=============================================================================
1771 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject, 
1772                                                  GEOM::GEOM_Object_ptr theAxis)
1773 {
1774   beginService( " GEOM_Superv_i::MirrorAxis" );
1775   MESSAGE("GEOM_Superv_i::MirrorAxis");
1776   getTransfOp();
1777   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxis(theObject, theAxis);
1778   endService( " GEOM_Superv_i::MirrorAxis" );
1779   return anObj;
1780 }
1781
1782 //=============================================================================
1783 //  MirrorAxisCopy:
1784 //=============================================================================
1785 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject, 
1786                                                      GEOM::GEOM_Object_ptr theAxis)
1787 {
1788   beginService( " GEOM_Superv_i::MirrorAxisCopy" );
1789   MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
1790   getTransfOp();
1791   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxisCopy(theObject, theAxis);
1792   endService( " GEOM_Superv_i::MirrorAxisCopy" );
1793   return anObj;
1794 }
1795
1796 //=============================================================================
1797 //  MirrorPoint:
1798 //=============================================================================
1799 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject, 
1800                                                   GEOM::GEOM_Object_ptr thePoint)
1801 {
1802   beginService( " GEOM_Superv_i::MirrorPoint" );
1803   MESSAGE("GEOM_Superv_i::MirrorPoint");
1804   getTransfOp();
1805   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPoint(theObject, thePoint);
1806   endService( " GEOM_Superv_i::MirrorPoint" );
1807   return anObj;
1808 }
1809
1810 //=============================================================================
1811 //  MirrorPointCopy:
1812 //=============================================================================
1813 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject, 
1814                                                       GEOM::GEOM_Object_ptr thePoint)
1815 {
1816   beginService( " GEOM_Superv_i::MirrorPoint" );
1817   MESSAGE("GEOM_Superv_i::MirrorPointCopy");
1818   getTransfOp();
1819   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPointCopy(theObject, thePoint);
1820   endService( " GEOM_Superv_i::MirrorPoint" );
1821   return anObj;
1822 }
1823
1824 //=============================================================================
1825 //  OffsetShape:
1826 //=============================================================================
1827 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject, 
1828                                                   CORBA::Double theOffset)
1829 {
1830   beginService( " GEOM_Superv_i::OffsetShape" );
1831   MESSAGE("GEOM_Superv_i::OffsetShape");
1832   getTransfOp();
1833   GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset);
1834   endService( " GEOM_Superv_i::OffsetShape" );
1835   return anObj;
1836 }
1837
1838 //=============================================================================
1839 //  OffsetShapeCopy:
1840 //=============================================================================
1841 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject, 
1842                                                       CORBA::Double theOffset)
1843 {
1844   beginService( " GEOM_Superv_i::OffsetShapeCopy" );
1845   MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1846   getTransfOp();
1847   GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset);
1848   endService( " GEOM_Superv_i::OffsetShapeCopy" );
1849   return anObj;
1850 }
1851
1852 //=============================================================================
1853 //  ScaleShape:
1854 //=============================================================================
1855 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject, 
1856                                                  GEOM::GEOM_Object_ptr thePoint,
1857                                                  CORBA::Double theFactor)
1858 {
1859   beginService( " GEOM_Superv_i::ScaleShape" );
1860   MESSAGE("GEOM_Superv_i::ScaleShape");
1861   getTransfOp();
1862   GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShape(theObject, thePoint, theFactor);
1863   endService( " GEOM_Superv_i::ScaleShape" );
1864   return anObj;
1865 }
1866
1867 //=============================================================================
1868 //  ScaleShapeCopy:
1869 //=============================================================================
1870 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject, 
1871                                                      GEOM::GEOM_Object_ptr thePoint,
1872                                                      CORBA::Double theFactor)
1873 {
1874   beginService( " GEOM_Superv_i::ScaleShapeCopy" );
1875   MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
1876   getTransfOp();
1877   GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
1878   endService( " GEOM_Superv_i::ScaleShapeCopy" );
1879   return anObj;
1880 }
1881
1882 //=============================================================================
1883 //  ScaleShapeAlongAxes:
1884 //=============================================================================
1885 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject,
1886                                                           GEOM::GEOM_Object_ptr thePoint,
1887                                                           CORBA::Double theFactorX,
1888                                                           CORBA::Double theFactorY,
1889                                                           CORBA::Double theFactorZ)
1890 {
1891   beginService( " GEOM_Superv_i::ScaleShapeAlongAxes" );
1892   MESSAGE("GEOM_Superv_i::ScaleShapeAlongAxes");
1893   getTransfOp();
1894   GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeAlongAxes
1895     (theObject, thePoint, theFactorX, theFactorY, theFactorZ);
1896   endService( " GEOM_Superv_i::ScaleShapeAlongAxes" );
1897   return anObj;
1898 }
1899
1900 //=============================================================================
1901 //  ScaleShapeAlongAxesCopy:
1902 //=============================================================================
1903 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject,
1904                                                               GEOM::GEOM_Object_ptr thePoint,
1905                                                               CORBA::Double theFactorX,
1906                                                               CORBA::Double theFactorY,
1907                                                               CORBA::Double theFactorZ)
1908 {
1909   beginService( " GEOM_Superv_i::ScaleShapeAlongAxesCopy" );
1910   MESSAGE("GEOM_Superv_i::ScaleShapeAlongAxesCopy");
1911   getTransfOp();
1912   GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeAlongAxesCopy
1913     (theObject, thePoint, theFactorX, theFactorY, theFactorZ);
1914   endService( " GEOM_Superv_i::ScaleShapeAlongAxesCopy" );
1915   return anObj;
1916 }
1917
1918 //=============================================================================
1919 //  PositionShape:
1920 //=============================================================================
1921 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
1922                                                     GEOM::GEOM_Object_ptr theStartLCS,
1923                                                     GEOM::GEOM_Object_ptr theEndLCS)
1924 {
1925   beginService( " GEOM_Superv_i::PositionShape" );
1926   MESSAGE("GEOM_Superv_i::PositionShape");
1927   getTransfOp();
1928   GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
1929   endService( " GEOM_Superv_i::PositionShape" );
1930   return anObj;
1931 }
1932
1933 //=============================================================================
1934 //  PositionShapeCopy:
1935 //=============================================================================
1936 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
1937                                                         GEOM::GEOM_Object_ptr theStartLCS,
1938                                                         GEOM::GEOM_Object_ptr theEndLCS)
1939 {
1940   beginService( " GEOM_Superv_i::PositionShapeCopy" );
1941   MESSAGE("GEOM_Superv_i::PositionShapeCopy");
1942   getTransfOp();
1943   GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
1944   endService( " GEOM_Superv_i::PositionShapeCopy" );
1945   return anObj;
1946 }
1947
1948 //=============================================================================
1949 //  PositionAlongPath:
1950 //=============================================================================
1951 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionAlongPath (GEOM::GEOM_Object_ptr theObject,
1952                                                         GEOM::GEOM_Object_ptr thePath,
1953                                                         CORBA::Double         theDistance,
1954                                                         CORBA::Boolean        theCopy,
1955                                                         CORBA::Boolean        theReverse)
1956 {
1957   beginService( " GEOM_Superv_i::PositionAlongPath" );
1958   MESSAGE("GEOM_Superv_i::PositionAlongPath");
1959   getTransfOp();
1960   GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse);
1961   endService( " GEOM_Superv_i::PositionAlongPath" );
1962   return anObj;
1963 }
1964
1965 //=============================== ShapesOperations ============================
1966 //=============================================================================
1967 //  Make:
1968 //=============================================================================
1969 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
1970                                                GEOM::GEOM_Object_ptr thePnt2)
1971 {
1972   beginService( " GEOM_Superv_i::MakeEdge" );
1973   MESSAGE("GEOM_Superv_i::MakeEdge");
1974   getShapesOp();
1975   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeEdge(thePnt1, thePnt2);
1976   endService( " GEOM_Superv_i::MakeEdge" );
1977   return anObj;
1978 }
1979
1980 //=============================================================================
1981 //  MakeWire:
1982 //=============================================================================
1983 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires,
1984                                                CORBA::Double       theTolerance)
1985 {
1986   beginService( " GEOM_Superv_i::MakeWire" );
1987   MESSAGE("GEOM_Superv_i::MakeWire");
1988   if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW = 
1989       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
1990     getShapesOp();
1991     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeWire(aListImplEW->GetList(), theTolerance);
1992     endService( " GEOM_Superv_i::MakeWire" );
1993     return anObj;
1994   }
1995   endService( " GEOM_Superv_i::MakeWire" );
1996   return NULL;
1997 }
1998
1999 //=============================================================================
2000 //  MakeFace:
2001 //=============================================================================
2002 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
2003                                                CORBA::Boolean isPlanarWanted)
2004 {
2005   beginService( " GEOM_Superv_i::MakeFace" );
2006   MESSAGE("GEOM_Superv_i::MakeFace");
2007   getShapesOp();
2008   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFace(theWire, isPlanarWanted);
2009   endService( " GEOM_Superv_i::MakeFace" );
2010   return anObj;
2011 }
2012
2013 //=============================================================================
2014 //  MakeFaceWires:
2015 //=============================================================================
2016 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires,
2017                                                     CORBA::Boolean isPlanarWanted)
2018 {
2019   beginService( " GEOM_Superv_i::MakeFaceWires" );
2020   MESSAGE("GEOM_Superv_i::MakeFaceWires");
2021   if (GEOM_List_i<GEOM::ListOfGO>* aListImplW = 
2022       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
2023     getShapesOp();
2024     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
2025     endService( " GEOM_Superv_i::MakeFaceWires" );
2026     return anObj;
2027   }
2028   endService( " GEOM_Superv_i::MakeFaceWires" );
2029   return NULL;
2030 }
2031
2032 //=============================================================================
2033 //  MakeShell:
2034 //=============================================================================
2035 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells)
2036 {
2037   beginService( " GEOM_Superv_i::MakeShell" );
2038   MESSAGE("GEOM_Superv_i::MakeShell");
2039   if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS = 
2040       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
2041     getShapesOp();
2042     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeShell(aListImplFS->GetList());
2043     endService( " GEOM_Superv_i::MakeShell" );
2044     return anObj;
2045   }
2046   endService( " GEOM_Superv_i::MakeShell" );
2047   return NULL;
2048 }
2049
2050 //=============================================================================
2051 //  MakeSolidShell:
2052 //=============================================================================
2053 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
2054 {
2055   beginService( " GEOM_Superv_i::MakeSolidShell" );
2056   MESSAGE("GEOM_Superv_i::MakeSolidShell");
2057   getShapesOp();
2058   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShell(theShell);
2059   endService( " GEOM_Superv_i::MakeSolidShell" );
2060   return anObj;
2061 }
2062
2063 //=============================================================================
2064 //  MakeSolidShells:
2065 //=============================================================================
2066 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells)
2067 {
2068   beginService( " GEOM_Superv_i::MakeSolidShells" );
2069   MESSAGE("GEOM_Superv_i::MakeSolidShells");
2070   if (GEOM_List_i<GEOM::ListOfGO>* aListImplS = 
2071       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
2072     getShapesOp();
2073     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShells(aListImplS->GetList());
2074     endService( " GEOM_Superv_i::MakeSolidShells" );
2075     return anObj;
2076   }
2077   endService( " GEOM_Superv_i::MakeSolidShells" );
2078   return NULL;
2079 }
2080
2081 //=============================================================================
2082 //  MakeCompound:
2083 //=============================================================================
2084 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes)
2085 {
2086   beginService( " GEOM_Superv_i::MakeCompound" );
2087   MESSAGE("GEOM_Superv_i::MakeCompound");
2088   if (GEOM_List_i<GEOM::ListOfGO>* aListImpl = 
2089       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
2090     getShapesOp();
2091     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeCompound(aListImpl->GetList());
2092     endService( " GEOM_Superv_i::MakeCompound" );
2093     return anObj;
2094   }
2095   endService( " GEOM_Superv_i::MakeCompound" );
2096   return NULL;
2097 }
2098
2099 //=============================================================================
2100 //  MakeGlueFaces:
2101 //=============================================================================
2102 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
2103                                                     CORBA::Double   theTolerance,
2104                                                     CORBA::Boolean doKeepNonSolids)
2105 {
2106   beginService( " GEOM_Superv_i::MakeGlueFaces" );
2107   MESSAGE("GEOM_Superv_i::MakeGlueFaces");
2108   getShapesOp();
2109   GEOM::GEOM_Object_ptr anObj =
2110     myShapesOp->MakeGlueFaces(theShape, theTolerance, doKeepNonSolids);
2111   endService( " GEOM_Superv_i::MakeGlueFaces" );
2112   return anObj;
2113 }
2114
2115 //=============================================================================
2116 //  GetGlueFaces:
2117 //=============================================================================
2118 GEOM::GEOM_List_ptr GEOM_Superv_i::GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
2119                                                  CORBA::Double theTolerance)
2120 {
2121   beginService( " GEOM_Superv_i::GetGlueFaces" );
2122   MESSAGE("GEOM_Superv_i::GetGlueFaces");
2123   getShapesOp();
2124   GEOM::ListOfGO* aList = myShapesOp->GetGlueFaces(theShape, theTolerance);
2125   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
2126   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2127   endService( " GEOM_Superv_i::GetGlueFaces" );
2128   return aListPtr->_this();
2129 }
2130
2131 //=============================================================================
2132 //  MakeGlueFacesByList:
2133 //=============================================================================
2134 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
2135                                                           CORBA::Double theTolerance,
2136                                                           const GEOM::ListOfGO& theFaces,
2137                                                           CORBA::Boolean doKeepNonSolids)
2138 {
2139   beginService( " GEOM_Superv_i::MakeGlueFacesByList" );
2140   MESSAGE("GEOM_Superv_i::MakeGlueFacesByList");
2141   getShapesOp();
2142   GEOM::GEOM_Object_ptr anObj =
2143     myShapesOp->MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids);
2144   endService( " GEOM_Superv_i::MakeGlueFacesByList" );
2145   return anObj;
2146 }
2147
2148 //=============================================================================
2149 //  MakeExplode:
2150 //=============================================================================
2151 GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
2152                                                     CORBA::Long theShapeType,
2153                                                     CORBA::Boolean isSorted)
2154 {
2155   beginService( " GEOM_Superv_i::MakeExplode" );
2156   MESSAGE("GEOM_Superv_i::MakeExplode");
2157   getShapesOp();
2158
2159   GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
2160   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
2161   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2162   endService( " GEOM_Superv_i::MakeExplode" );
2163   return aListPtr->_this();
2164 }
2165
2166 //=============================================================================
2167 //  NumberOfFaces:
2168 //=============================================================================
2169 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
2170 {
2171   beginService( " GEOM_Superv_i::NumberOfFaces" );
2172   MESSAGE("GEOM_Superv_i::NumberOfFaces");
2173   getShapesOp();
2174   CORBA::Long aRes = myShapesOp->NumberOfFaces(theShape);
2175   endService( " GEOM_Superv_i::NumberOfFaces" );
2176   return aRes;
2177 }
2178
2179 //=============================================================================
2180 //  NumberOfEdges:
2181 //=============================================================================
2182 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
2183 {
2184   beginService( " GEOM_Superv_i::NumberOfEdges" );
2185   MESSAGE("GEOM_Superv_i::NumberOfEdges");
2186   getShapesOp();
2187   CORBA::Long aRes = myShapesOp->NumberOfEdges(theShape);
2188   endService( " GEOM_Superv_i::NumberOfEdges" );
2189   return aRes;
2190 }
2191
2192
2193 //=============================================================================
2194 //  ChangeOrientation:
2195 //=============================================================================
2196 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
2197 {
2198   beginService( " GEOM_Superv_i::ChangeOrientation" );
2199   MESSAGE("GEOM_Superv_i::ChangeOrientation");
2200   getShapesOp();
2201   GEOM::GEOM_Object_ptr anObj = myShapesOp->ChangeOrientation(theShape);
2202   endService( " GEOM_Superv_i::ChangeOrientation" );
2203   return anObj;
2204 }
2205
2206
2207 //=============================================================================
2208 //  GetShapesOnShape:
2209 //=============================================================================
2210 GEOM::GEOM_List_ptr GEOM_Superv_i::GetShapesOnShape
2211                                           (GEOM::GEOM_Object_ptr theCheckShape,
2212                                            GEOM::GEOM_Object_ptr theShape,
2213                                            CORBA::Short theShapeType,
2214                                            GEOM::shape_state theState)
2215 {
2216   beginService( " GEOM_Superv_i::GetShapesOnShape" );
2217   MESSAGE("GEOM_Superv_i::GetShapesOnShape");
2218   getShapesOp();
2219   GEOM::ListOfGO* aList =
2220     myShapesOp->GetShapesOnShape(theCheckShape, theShape, theShapeType, theState);
2221   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
2222   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2223   endService( " GEOM_Superv_i::GetShapesOnShape" );
2224   return aListPtr->_this();
2225 }
2226
2227
2228 //=============================================================================
2229 //  GetShapesOnShapeAsCompound:
2230 //=============================================================================
2231 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetShapesOnShapeAsCompound
2232                                           (GEOM::GEOM_Object_ptr theCheckShape,
2233                                            GEOM::GEOM_Object_ptr theShape,
2234                                            CORBA::Short theShapeType,
2235                                            GEOM::shape_state theState)
2236 {
2237   beginService( " GEOM_Superv_i::GetShapesOnShapeAsCompound" );
2238   MESSAGE("GEOM_Superv_i::GetShapesOnShapeAsCompound");
2239   getShapesOp();
2240   GEOM::GEOM_Object_ptr anObj = 
2241     myShapesOp->GetShapesOnShapeAsCompound(theCheckShape, theShape, theShapeType, theState);
2242   endService( " GEOM_Superv_i::GetShapesOnShapeAsCompound" );
2243   return anObj;
2244 }
2245
2246
2247 //=============================== BlocksOperations ============================
2248 //=============================================================================
2249 //  MakeQuad4Vertices:
2250 //=============================================================================
2251 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
2252                                                         GEOM::GEOM_Object_ptr thePnt2,
2253                                                         GEOM::GEOM_Object_ptr thePnt3,
2254                                                         GEOM::GEOM_Object_ptr thePnt4)
2255 {
2256   beginService( " GEOM_Superv_i::MakeQuad4Vertices" );
2257   MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
2258   getBlocksOp();
2259   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
2260   endService( " GEOM_Superv_i::MakeQuad4Vertices" );
2261   return anObj;
2262 }
2263
2264 //=============================================================================
2265 //  MakeQuad:
2266 //=============================================================================
2267 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
2268                                                GEOM::GEOM_Object_ptr theEdge2,
2269                                                GEOM::GEOM_Object_ptr theEdge3,
2270                                                GEOM::GEOM_Object_ptr theEdge4)
2271 {
2272   beginService( " GEOM_Superv_i::MakeQuad" );
2273   MESSAGE("GEOM_Superv_i::MakeQuad");
2274   getBlocksOp();
2275   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
2276   endService( " GEOM_Superv_i::MakeQuad" );
2277   return anObj;
2278 }
2279
2280 //=============================================================================
2281 //  MakeQuad2Edges:
2282 //=============================================================================
2283 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
2284                                                      GEOM::GEOM_Object_ptr theEdge2)
2285 {
2286   beginService( " GEOM_Superv_i::MakeQuad2Edges" );
2287   MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
2288   getBlocksOp();
2289   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
2290   endService( " GEOM_Superv_i::MakeQuad2Edges" );
2291   return anObj;
2292 }
2293
2294 //=============================================================================
2295 //  MakeHexa:
2296 //=============================================================================
2297 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
2298                                                GEOM::GEOM_Object_ptr theFace2,
2299                                                GEOM::GEOM_Object_ptr theFace3,
2300                                                GEOM::GEOM_Object_ptr theFace4,
2301                                                GEOM::GEOM_Object_ptr theFace5,
2302                                                GEOM::GEOM_Object_ptr theFace6)
2303 {
2304   beginService( " GEOM_Superv_i::MakeHexa" );
2305   MESSAGE("GEOM_Superv_i::MakeHexa");
2306   getBlocksOp();
2307   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
2308   endService( " GEOM_Superv_i::MakeHexa" );
2309   return anObj;
2310 }
2311
2312 //=============================================================================
2313 //  MakeHexa2Faces:
2314 //=============================================================================
2315 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
2316                                                      GEOM::GEOM_Object_ptr theFace2)
2317 {
2318   beginService( " GEOM_Superv_i::MakeHexa2Faces" );
2319   MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
2320   getBlocksOp();
2321   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
2322   endService( " GEOM_Superv_i::MakeHexa2Faces" );
2323   return anObj;
2324 }
2325
2326 //=============================================================================
2327 //  GetPoint:
2328 //=============================================================================
2329 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
2330                                                CORBA::Double   theX,
2331                                                CORBA::Double   theY,
2332                                                CORBA::Double   theZ,
2333                                                CORBA::Double   theEpsilon)
2334 {
2335   beginService( " GEOM_Superv_i::GetPoint" );
2336   MESSAGE("GEOM_Superv_i::GetPoint");
2337   getBlocksOp();
2338   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
2339   endService( " GEOM_Superv_i::GetPoint" );
2340   return anObj;
2341 }
2342
2343 //=============================================================================
2344 //  GetEdge:
2345 //=============================================================================
2346 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
2347                                               GEOM::GEOM_Object_ptr thePoint1,
2348                                               GEOM::GEOM_Object_ptr thePoint2)
2349 {
2350   beginService( " GEOM_Superv_i::GetEdge" );
2351   MESSAGE("GEOM_Superv_i::GetEdge");
2352   getBlocksOp();
2353   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
2354   endService( " GEOM_Superv_i::GetEdge" );
2355   return anObj;
2356 }
2357
2358 //=============================================================================
2359 //  GetEdgeNearPoint:
2360 //=============================================================================
2361 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
2362                                                        GEOM::GEOM_Object_ptr thePoint)
2363 {
2364   beginService( " GEOM_Superv_i::GetEdgeNearPoint" );
2365   MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
2366   getBlocksOp();
2367   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
2368   endService( " GEOM_Superv_i::GetEdgeNearPoint" );
2369   return anObj;
2370 }
2371
2372 //=============================================================================
2373 //  GetFaceByPoints:
2374 //=============================================================================
2375 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
2376                                                       GEOM::GEOM_Object_ptr thePoint1,
2377                                                       GEOM::GEOM_Object_ptr thePoint2,
2378                                                       GEOM::GEOM_Object_ptr thePoint3,
2379                                                       GEOM::GEOM_Object_ptr thePoint4)
2380 {
2381   beginService( " GEOM_Superv_i::GetFaceByPoints" );
2382   MESSAGE("GEOM_Superv_i::GetFaceByPoints");
2383   getBlocksOp();
2384   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
2385   endService( " GEOM_Superv_i::GetFaceByPoints" );
2386   return anObj;
2387 }
2388
2389 //=============================================================================
2390 //  GetFaceByEdges:
2391 //=============================================================================
2392 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
2393                                                      GEOM::GEOM_Object_ptr theEdge1,
2394                                                      GEOM::GEOM_Object_ptr theEdge2)
2395 {
2396   beginService( " GEOM_Superv_i::GetFaceByEdges" );
2397   MESSAGE("GEOM_Superv_i::GetFaceByEdges");
2398   getBlocksOp();
2399   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
2400   endService( " GEOM_Superv_i::GetFaceByEdges" );
2401   return anObj;
2402 }
2403
2404 //=============================================================================
2405 //  GetOppositeFace:
2406 //=============================================================================
2407 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
2408                                                       GEOM::GEOM_Object_ptr theFace)
2409 {
2410   beginService( " GEOM_Superv_i::GetOppositeFace" );
2411   MESSAGE("GEOM_Superv_i::GetOppositeFace");
2412   getBlocksOp();
2413   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetOppositeFace(theBlock, theFace);
2414   endService( " GEOM_Superv_i::GetOppositeFace" );
2415   return anObj;
2416 }
2417
2418 //=============================================================================
2419 //  GetFaceNearPoint:
2420 //=============================================================================
2421 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
2422                                                        GEOM::GEOM_Object_ptr thePoint)
2423 {
2424   beginService( " GEOM_Superv_i::GetFaceNearPoint" );
2425   MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
2426   getBlocksOp();
2427   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceNearPoint(theShape, thePoint);
2428   endService( " GEOM_Superv_i::GetFaceNearPoint" );
2429   return anObj;
2430 }
2431
2432 //=============================================================================
2433 //  GetFaceByNormale:
2434 //=============================================================================
2435 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
2436                                                        GEOM::GEOM_Object_ptr theVector)
2437 {
2438   beginService( " GEOM_Superv_i::GetFaceByNormale" );
2439   MESSAGE("GEOM_Superv_i::GetFaceByNormale");
2440   getBlocksOp();
2441   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByNormale(theBlock, theVector);
2442   endService( " GEOM_Superv_i::GetFaceByNormale" );
2443   return anObj;
2444 }
2445
2446 //=============================================================================
2447 //  IsCompoundOfBlocks:
2448 //=============================================================================
2449 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2450                                                   CORBA::Long     theMinNbFaces,
2451                                                   CORBA::Long     theMaxNbFaces,
2452                                                   CORBA::Long&          theNbBlocks)
2453 {
2454   beginService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2455   MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
2456   getBlocksOp();
2457   CORBA::Boolean aRes = myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
2458   endService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2459   return aRes;
2460 }
2461
2462 //=============================================================================
2463 //  CheckCompoundOfBlocks:
2464 //=============================================================================
2465 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks 
2466 (GEOM::GEOM_Object_ptr theCompound,
2467  GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
2468 {
2469   beginService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2470   MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
2471   getBlocksOp();
2472   CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
2473   endService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2474   return aRes;
2475 }
2476
2477 //=============================================================================
2478 //  PrintBCErrors:
2479 //=============================================================================
2480 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
2481                                     const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
2482 {
2483   beginService( " GEOM_Superv_i::PrintBCErrors" );
2484   MESSAGE("GEOM_Superv_i::PrintBCErrors");
2485   getBlocksOp();
2486   char* anErrors = myBlocksOp->PrintBCErrors(theCompound, theErrors);
2487   endService( " GEOM_Superv_i::PrintBCErrors" );
2488   return anErrors;
2489 }
2490
2491 //=============================================================================
2492 //  ExplodeCompoundOfBlocks:
2493 //=============================================================================
2494 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2495                                                                 CORBA::Long     theMinNbFaces,
2496                                                                 CORBA::Long     theMaxNbFaces)
2497 {
2498   beginService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2499   MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
2500   getBlocksOp();
2501   GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
2502   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2503   endService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2504   return aListPtr->_this();
2505 }
2506
2507 //=============================================================================
2508 //  GetBlockNearPoint:
2509 //=============================================================================
2510 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
2511                                                         GEOM::GEOM_Object_ptr thePoint)
2512 {
2513   beginService( " GEOM_Superv_i::GetBlockNearPoint" );
2514   MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
2515   getBlocksOp();
2516   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
2517   endService( " GEOM_Superv_i::GetBlockNearPoint" );
2518   return anObj;
2519 }
2520
2521 //=============================================================================
2522 //  GetBlockByParts:
2523 //=============================================================================
2524 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
2525                                                       GEOM::GEOM_List_ptr theParts)
2526 {
2527   beginService( " GEOM_Superv_i::GetBlockByParts" );
2528   MESSAGE("GEOM_Superv_i::GetBlockByParts");
2529   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2530       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2531     getBlocksOp();
2532     GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
2533     endService( " GEOM_Superv_i::GetBlockByParts" );
2534     return anObj;
2535   }
2536   endService( " GEOM_Superv_i::GetBlockByParts" );
2537   return NULL;
2538 }
2539
2540 //=============================================================================
2541 //  GetBlocksByParts:
2542 //=============================================================================
2543 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
2544                                                          GEOM::GEOM_List_ptr theParts)
2545 {
2546   beginService( " GEOM_Superv_i::GetBlocksByParts" );
2547   MESSAGE("GEOM_Superv_i::GetBlocksByParts");
2548   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2549       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2550     getBlocksOp();
2551     
2552     GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
2553     GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2554     endService( " GEOM_Superv_i::GetBlocksByParts" );
2555     return aListPtr->_this();
2556   }
2557   endService( " GEOM_Superv_i::GetBlocksByParts" );
2558   return NULL;
2559 }
2560
2561 //=============================================================================
2562 //  MakeMultiTransformation1D:
2563 //=============================================================================
2564 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
2565                                                                 CORBA::Long     theDirFace1,
2566                                                                 CORBA::Long     theDirFace2,
2567                                                                 CORBA::Long     theNbTimes)
2568 {
2569   beginService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2570   MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
2571   getBlocksOp();
2572   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
2573   endService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2574   return anObj;
2575 }
2576
2577 //=============================================================================
2578 //  MakeMultiTransformation2D:
2579 //=============================================================================
2580 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D 
2581 (GEOM::GEOM_Object_ptr theBlock,
2582  CORBA::Long     theDirFace1U,
2583  CORBA::Long     theDirFace2U,
2584  CORBA::Long     theNbTimesU,
2585  CORBA::Long     theDirFace1V,
2586  CORBA::Long     theDirFace2V,
2587  CORBA::Long     theNbTimesV)
2588 {
2589   beginService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2590   MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
2591   getBlocksOp();
2592   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation2D(theBlock, 
2593                                                                       theDirFace1U, theDirFace2U, theNbTimesU,
2594                                                                       theDirFace1V, theDirFace2V, theNbTimesV);
2595   endService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2596   return anObj;
2597 }
2598
2599 //=============================== CurvesOperations ============================
2600 //=============================================================================
2601 //  MakeCirclePntVecR:
2602 //=============================================================================
2603 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
2604                                                         GEOM::GEOM_Object_ptr theVector,
2605                                                         CORBA::Double theR)
2606 {
2607   beginService( " GEOM_Superv_i::MakeCirclePntVecR" );
2608   MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
2609   getCurvesOp();
2610   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
2611   endService( " GEOM_Superv_i::MakeCirclePntVecR" );
2612   return anObj;
2613 }
2614
2615 //=============================================================================
2616 //  MakeCircleThreePnt:
2617 //=============================================================================
2618 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
2619                                                          GEOM::GEOM_Object_ptr thePnt2,
2620                                                          GEOM::GEOM_Object_ptr thePnt3)
2621 {
2622   beginService( " GEOM_Superv_i::MakeCircleThreePnt" );
2623   MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
2624   getCurvesOp();
2625   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
2626   endService( " GEOM_Superv_i::MakeCircleThreePnt" );
2627   return anObj;
2628 }
2629 //=============================================================================
2630 //  MakeCircleCenter2Pnt:
2631 //=============================================================================
2632 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
2633                                                            GEOM::GEOM_Object_ptr thePnt2,
2634                                                            GEOM::GEOM_Object_ptr thePnt3)
2635 {
2636   beginService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2637   MESSAGE("GEOM_Superv_i::MakeCircleCenter2Pnt");
2638   getCurvesOp();
2639   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3);
2640   endService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2641   return anObj;
2642 }
2643
2644 //=============================================================================
2645 //  MakeEllipse:
2646 //=============================================================================
2647 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
2648                                                   GEOM::GEOM_Object_ptr theVector,
2649                                                   CORBA::Double theRMajor, 
2650                                                   CORBA::Double theRMinor)
2651 {
2652   beginService( " GEOM_Superv_i::MakeEllipse" );
2653   MESSAGE("GEOM_Superv_i::MakeEllipse");
2654   getCurvesOp();
2655   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
2656   endService( " GEOM_Superv_i::MakeEllipse" );
2657   return anObj;
2658 }
2659
2660 //=============================================================================
2661 //  MakeEllipseVec:
2662 //=============================================================================
2663 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipseVec (GEOM::GEOM_Object_ptr theCenter,
2664                                                      GEOM::GEOM_Object_ptr theVector,
2665                                                      CORBA::Double theRMajor, 
2666                                                      CORBA::Double theRMinor,
2667                                                      GEOM::GEOM_Object_ptr theVectorMajor)
2668 {
2669   beginService( " GEOM_Superv_i::MakeEllipseVec" );
2670   MESSAGE("GEOM_Superv_i::MakeEllipseVec");
2671   getCurvesOp();
2672   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeEllipseVec(theCenter, theVector, theRMajor, theRMinor, theVectorMajor);
2673   endService( " GEOM_Superv_i::MakeEllipseVec" );
2674   return anObj;
2675 }
2676
2677 //=============================================================================
2678 //  MakeArc:
2679 //=============================================================================
2680 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
2681                                               GEOM::GEOM_Object_ptr thePnt2,
2682                                               GEOM::GEOM_Object_ptr thePnt3)
2683 {
2684   beginService( " GEOM_Superv_i::MakeArc" );
2685   MESSAGE("GEOM_Superv_i::MakeArc");
2686   getCurvesOp();
2687   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
2688   endService( " GEOM_Superv_i::MakeArc" );
2689   return anObj;
2690 }
2691
2692 //=============================================================================
2693 //  MakeArcCenter:
2694 //=============================================================================
2695 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
2696                                                     GEOM::GEOM_Object_ptr thePnt1,
2697                                                     GEOM::GEOM_Object_ptr thePnt2,
2698                                                     CORBA::Boolean theSense)
2699 {
2700   beginService( " GEOM_Superv_i::MakeArcCenter" );
2701   MESSAGE("GEOM_Superv_i::MakeArcCenter");
2702   getCurvesOp();
2703   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArcCenter(theCenter, thePnt1, thePnt2,theSense);
2704   endService( " GEOM_Superv_i::MakeArcCenter" );
2705   return anObj;
2706 }
2707
2708 //=============================================================================
2709 //  MakeArcOfEllipse:
2710 //=============================================================================
2711 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArcOfEllipse (GEOM::GEOM_Object_ptr thePnt1,
2712                                                        GEOM::GEOM_Object_ptr thePnt2,
2713                                                        GEOM::GEOM_Object_ptr thePnt3)
2714 {
2715   beginService( " GEOM_Superv_i::MakeArcOfEllipse" );
2716   MESSAGE("GEOM_Superv_i::MakeArcOfEllipse");
2717   getCurvesOp();
2718   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArcOfEllipse(thePnt1, thePnt2, thePnt3);
2719   endService( " GEOM_Superv_i::MakeArcOfEllipse" );
2720   return anObj;
2721 }
2722
2723 //=============================================================================
2724 //  MakePolyline:
2725 //=============================================================================
2726 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints)
2727 {
2728   beginService( " GEOM_Superv_i::MakePolyline" );
2729   MESSAGE("GEOM_Superv_i::MakePolyline");
2730   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2731       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2732     getCurvesOp();
2733     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakePolyline(aListImplP->GetList());
2734     endService( " GEOM_Superv_i::MakePolyline" );
2735     return anObj;
2736   }
2737   endService( " GEOM_Superv_i::MakePolyline" );
2738   return NULL;
2739 }
2740
2741 //=============================================================================
2742 //  MakeSplineBezier:
2743 //=============================================================================
2744 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints)
2745 {
2746   beginService( " GEOM_Superv_i::MakeSplineBezier" );
2747   MESSAGE("GEOM_Superv_i::MakeSplineBezier");
2748   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2749       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2750     getCurvesOp();
2751     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineBezier(aListImplP->GetList());
2752     endService( " GEOM_Superv_i::MakeSplineBezier" );
2753     return anObj;
2754   }
2755   endService( " GEOM_Superv_i::MakeSplineBezier" );
2756   return NULL;
2757 }
2758
2759 //=============================================================================
2760 //  MakeSplineInterpolation:
2761 //=============================================================================
2762 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints,
2763                                                               CORBA::Boolean      theIsClosed)
2764 {
2765   beginService( " GEOM_Superv_i::MakeSplineInterpolation" );
2766   MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
2767   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2768       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2769     getCurvesOp();
2770     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineInterpolation(aListImplP->GetList(), theIsClosed);
2771     endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2772     return anObj;
2773   }
2774   endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2775   return NULL;
2776 }
2777
2778 //=============================================================================
2779 //  MakeSketcher:
2780 //=============================================================================
2781 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand, 
2782                                                    GEOM::GEOM_List_ptr theWorkingPlane)
2783 {
2784   beginService( " GEOM_Superv_i::MakeSketcher" );
2785   MESSAGE("GEOM_Superv_i::MakeSketcher");
2786   if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP = 
2787       dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
2788     getCurvesOp();
2789     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
2790     endService( " GEOM_Superv_i::MakeSketcher" );
2791     return anObj;
2792   }
2793   endService( " GEOM_Superv_i::MakeSketcher" );
2794   return NULL;
2795 }
2796
2797 //=============================================================================
2798 //  Make3DSketcher:
2799 //=============================================================================
2800 GEOM::GEOM_Object_ptr GEOM_Superv_i::Make3DSketcher ( GEOM::GEOM_List_ptr theCoordinates)
2801 {
2802   beginService( " GEOM_Superv_i::Make3DSketcher" );
2803   MESSAGE("GEOM_Superv_i::Make3DSketcher");
2804   if (GEOM_List_i<GEOM::ListOfDouble>* aListImpl = 
2805       dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theCoordinates, myPOA).in())) {
2806     getCurvesOp();
2807     GEOM::GEOM_Object_ptr anObj = myCurvesOp->Make3DSketcher(aListImpl->GetList());
2808     endService( " GEOM_Superv_i::Make3DSketcher" );
2809     return anObj;
2810   }
2811   endService( " GEOM_Superv_i::Make3DSketcher" );
2812   return NULL;
2813 }
2814
2815 //=============================== LocalOperations =============================
2816 //=============================================================================
2817 //  MakeFilletAll:
2818 //=============================================================================
2819 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
2820                                                     CORBA::Double theR)
2821 {
2822   beginService( " GEOM_Superv_i::MakeFilletAll" );
2823   MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
2824   getLocalOp();
2825   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletAll(theShape, theR);
2826   endService( " GEOM_Superv_i::MakeFilletAll" );
2827   return anObj;
2828 }
2829
2830 //=============================================================================
2831 //  MakeFilletEdges:
2832 //=============================================================================
2833 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, 
2834                                                       CORBA::Double theR,
2835                                                       GEOM::GEOM_List_ptr theEdges)
2836 {
2837   beginService( " GEOM_Superv_i::MakeFilletEdges" );
2838   MESSAGE("GEOM_Superv_i::MakeFilletEdges");
2839   if (GEOM_List_i<GEOM::ListOfLong>* aListImplE = 
2840       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2841     getLocalOp();
2842     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
2843     endService( " GEOM_Superv_i::MakeFilletEdges" );
2844     return anObj;
2845   }
2846   endService( " GEOM_Superv_i::MakeFilletEdges" );
2847   return NULL;
2848 }
2849
2850 //=============================================================================
2851 //  MakeFilletEdges R1 R2:
2852 //=============================================================================
2853 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape, 
2854                                                           CORBA::Double theR1,
2855                                                           CORBA::Double theR2,
2856                                                           GEOM::GEOM_List_ptr theEdges)
2857 {
2858   beginService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2859   MESSAGE("GEOM_Superv_i::MakeFilletEdgesR1R2");
2860   if (GEOM_List_i<GEOM::ListOfLong>* aListImplE = 
2861       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2862     getLocalOp();
2863     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdgesR1R2(theShape, theR1,
2864                                                                  theR2, aListImplE->GetList());
2865     endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2866     return anObj;
2867   }
2868   endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2869   return NULL;
2870 }
2871
2872 //=============================================================================
2873 //  MakeFilletFaces:
2874 //=============================================================================
2875 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, 
2876                                                       CORBA::Double theR,
2877                                                       GEOM::GEOM_List_ptr theFaces)
2878 {
2879   beginService( " GEOM_Superv_i::MakeFilletFaces" );
2880   MESSAGE("GEOM_Superv_i::MakeFilletFaces");
2881   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2882       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2883     getLocalOp();
2884     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
2885     endService( " GEOM_Superv_i::MakeFilletFaces" );
2886     return anObj;
2887   }
2888   endService( " GEOM_Superv_i::MakeFilletFaces" );
2889   return NULL;
2890 }
2891
2892 //=============================================================================
2893 //  MakeFilletFaces R1 R2:
2894 //=============================================================================
2895 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape, 
2896                                                           CORBA::Double theR1,
2897                                                           CORBA::Double theR2,
2898                                                           GEOM::GEOM_List_ptr theFaces)
2899 {
2900   beginService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2901   MESSAGE("GEOM_Superv_i::MakeFilletFacesR1R2");
2902   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2903       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2904     getLocalOp();
2905     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFacesR1R2(theShape, theR1, theR2,
2906                                                                  aListImplF->GetList());
2907     endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2908     return anObj;
2909   }
2910   endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2911   return NULL;
2912 }
2913
2914 //=============================================================================
2915 //  MakeFillet2D:
2916 //=============================================================================
2917 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFillet2D (GEOM::GEOM_Object_ptr theShape, 
2918                                                    CORBA::Double theR,
2919                                                    GEOM::GEOM_List_ptr theVertexes)
2920 {
2921   beginService( " GEOM_Superv_i::MakeFillet2D" );
2922   MESSAGE("GEOM_Superv_i::MakeFillet2D");
2923   if (GEOM_List_i<GEOM::ListOfLong>* aListImplV = 
2924       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theVertexes, myPOA).in())) {
2925     getLocalOp();
2926     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFillet2D(theShape, theR, aListImplV->GetList());
2927     endService( " GEOM_Superv_i::MakeFillet2D" );
2928     return anObj;
2929   }
2930   endService( " GEOM_Superv_i::MakeFillet2D" );
2931   return NULL;
2932 }
2933
2934 //=============================================================================
2935 //  MakeFillet1D:
2936 //=============================================================================
2937 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFillet1D (GEOM::GEOM_Object_ptr theShape, 
2938                                                    CORBA::Double theR,
2939                                                    GEOM::GEOM_List_ptr theVertexes)
2940 {
2941   beginService( " GEOM_Superv_i::MakeFillet1D" );
2942   MESSAGE("GEOM_Superv_i::MakeFillet1D");
2943   if (GEOM_List_i<GEOM::ListOfLong>* aListImplV = 
2944       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theVertexes, myPOA).in())) {
2945     getLocalOp();
2946     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFillet1D(theShape, theR, aListImplV->GetList());
2947     endService( " GEOM_Superv_i::MakeFillet1D" );
2948     return anObj;
2949   }
2950   endService( " GEOM_Superv_i::MakeFillet1D" );
2951   return NULL;
2952 }
2953
2954 //=============================================================================
2955 //  MakeChamferAll:
2956 //=============================================================================
2957 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
2958 {
2959   beginService( " GEOM_Superv_i::MakeChamferAll" );
2960   MESSAGE("GEOM_Superv_i::MakeChamferAll");
2961   getLocalOp();
2962   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferAll(theShape, theD);
2963   endService( " GEOM_Superv_i::MakeChamferAll" );
2964   return anObj;
2965 }
2966   
2967 //=============================================================================
2968 //  MakeChamferEdge:
2969 //=============================================================================
2970 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
2971                                                       CORBA::Double theD1, CORBA::Double theD2,
2972                                                       CORBA::Long theFace1, CORBA::Long theFace2)
2973 {
2974   beginService( " GEOM_Superv_i::MakeChamferEdge" );
2975   MESSAGE("GEOM_Superv_i::MakeChamferEdge");
2976   getLocalOp();
2977   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
2978   endService( " GEOM_Superv_i::MakeChamferEdge" );
2979   return anObj;
2980 }
2981
2982 //=============================================================================
2983 //  MakeChamferEdgeAD:
2984 //=============================================================================
2985 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
2986                                                         CORBA::Double theD, CORBA::Double theAngle,
2987                                                         CORBA::Long theFace1, CORBA::Long theFace2)
2988 {
2989   beginService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2990   MESSAGE("GEOM_Superv_i::MakeChamferEdgeAD");
2991   getLocalOp();
2992   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2);
2993   endService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2994   return anObj;
2995 }
2996
2997 //=============================================================================
2998 //  MakeChamferFaces:
2999 //=============================================================================
3000 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
3001                                                        CORBA::Double theD1, CORBA::Double theD2,
3002                                                        GEOM::GEOM_List_ptr theFaces)
3003 {
3004   beginService( " GEOM_Superv_i::MakeChamferFaces" );
3005   MESSAGE("GEOM_Superv_i::MakeChamferFaces");
3006   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
3007       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
3008     getLocalOp();
3009     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
3010     endService( " GEOM_Superv_i::MakeChamferFaces" );
3011     return anObj;
3012   }
3013   endService( " GEOM_Superv_i::MakeChamferFaces" );
3014   return NULL;
3015 }
3016
3017 //=============================================================================
3018 //  MakeChamferFacesAD:
3019 //=============================================================================
3020 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
3021                                                          CORBA::Double theD, CORBA::Double theAngle,
3022                                                          GEOM::GEOM_List_ptr theFaces)
3023 {
3024   beginService( " GEOM_Superv_i::MakeChamferFacesAD" );
3025   MESSAGE("GEOM_Superv_i::MakeChamferFacesAD");
3026   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
3027       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
3028     getLocalOp();
3029     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFacesAD(theShape, theD, theAngle, aListImplF->GetList());
3030     endService( " GEOM_Superv_i::MakeChamferFacesAD" );
3031     return anObj;
3032   }
3033   endService( " GEOM_Superv_i::MakeChamferFacesAD" );
3034   return NULL;
3035 }
3036
3037 //=============================================================================
3038 //  MakeChamferEdges:
3039 //=============================================================================
3040 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
3041                                                        CORBA::Double theD1, CORBA::Double theD2,
3042                                                        GEOM::GEOM_List_ptr theEdges)
3043 {
3044   beginService( " GEOM_Superv_i::MakeChamferEdges" );
3045   MESSAGE("GEOM_Superv_i::MakeChamferEdges");
3046   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
3047       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
3048     getLocalOp();
3049     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdges(theShape, theD1, theD2, aListImplF->GetList());
3050     endService( " GEOM_Superv_i::MakeChamferEdges" );
3051     return anObj;
3052   }
3053   endService( " GEOM_Superv_i::MakeChamferEdges" );
3054   return NULL;
3055 }
3056
3057 //=============================================================================
3058 //  MakeChamferEdgesAD:
3059 //=============================================================================
3060 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
3061                                                          CORBA::Double theD, CORBA::Double theAngle,
3062                                                          GEOM::GEOM_List_ptr theEdges)
3063 {
3064   beginService( " GEOM_Superv_i::MakeChamferEdgesAD" );
3065   MESSAGE("GEOM_Superv_i::MakeChamferEdgesAD");
3066   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
3067       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
3068     getLocalOp();
3069     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgesAD(theShape, theD, theAngle, aListImplF->GetList());
3070     endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
3071     return anObj;
3072   }
3073   endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
3074   return NULL;
3075 }
3076
3077 //=============================================================================
3078 //  MakeArchimede:
3079 //=============================================================================
3080 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
3081                                                     CORBA::Double theWeight,
3082                                                     CORBA::Double theWaterDensity,
3083                                                     CORBA::Double theMeshingDeflection)
3084 {
3085   beginService( " GEOM_Superv_i::MakeArchimede" );
3086   MESSAGE("GEOM_Superv_i::MakeArchimede");
3087   getLocalOp();
3088   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
3089   endService( " GEOM_Superv_i::MakeArchimede" );
3090   return anObj;
3091 }
3092
3093 //=============================================================================
3094 //  GetSubShapeIndexMakeFilletAll:
3095 //=============================================================================
3096 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
3097                                              GEOM::GEOM_Object_ptr theSubShape)
3098 {
3099   beginService( " GEOM_Superv_i::GetSubShapeIndex" );
3100   MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
3101   getLocalOp();
3102   CORBA::Long aRes = myLocalOp->GetSubShapeIndex(theShape, theSubShape);
3103   endService( " GEOM_Superv_i::GetSubShapeIndex" );
3104   return aRes;
3105 }
3106
3107 //=============================== GroupOperations =============================
3108 //=============================================================================
3109 //  CreateGroup:
3110 //=============================================================================
3111 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape, 
3112                                                   CORBA::Long theShapeType)
3113 {
3114   beginService( " GEOM_Superv_i::CreateGroup" );
3115   MESSAGE("GEOM_Superv_i::CreateGroup");
3116   getGroupOp();
3117   GEOM::GEOM_Object_ptr anObj = myGroupOp->CreateGroup(theMainShape, theShapeType);
3118   endService( " GEOM_Superv_i::CreateGroup" );
3119   return anObj;
3120 }
3121
3122 //=============================================================================
3123 //  AddObject:
3124 //=============================================================================
3125 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup, 
3126                                CORBA::Long theSubShapeId)
3127 {
3128   beginService( " GEOM_Superv_i::AddObject" );
3129   MESSAGE("GEOM_Superv_i::AddObject");
3130   getGroupOp();
3131   myGroupOp->AddObject(theGroup, theSubShapeId);
3132   endService( " GEOM_Superv_i::AddObject" );
3133 }
3134
3135 //=============================================================================
3136 //  RemoveObject:
3137 //=============================================================================
3138 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup, 
3139                                   CORBA::Long theSubShapeId)
3140 {
3141   beginService( " GEOM_Superv_i::RemoveObject" );
3142   MESSAGE("GEOM_Superv_i::RemoveObject");
3143   getGroupOp();
3144   myGroupOp->RemoveObject(theGroup, theSubShapeId);
3145   endService( " GEOM_Superv_i::RemoveObject" );
3146 }
3147
3148 //=============================================================================
3149 //  GetType:
3150 //=============================================================================
3151 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
3152 {
3153   beginService( " GEOM_Superv_i::GetType" );
3154   MESSAGE("GEOM_Superv_i::GetType");
3155   getGroupOp();
3156   CORBA::Long aResult = myGroupOp->GetType(theGroup);
3157   endService( " GEOM_Superv_i::GetType" );
3158   return aResult;
3159 }
3160
3161 //=============================================================================
3162 //  GetMainShape:
3163 //=============================================================================
3164 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
3165 {
3166   beginService( " GEOM_Superv_i::GetMainShape" );
3167   MESSAGE("GEOM_Superv_i::GetMainShape");
3168   getGroupOp();
3169   GEOM::GEOM_Object_ptr anObj = myGroupOp->GetMainShape(theGroup);
3170   endService( " GEOM_Superv_i::GetMainShape" );
3171   return anObj;
3172 }
3173
3174 //=============================================================================
3175 //  GetObjects:
3176 //=============================================================================
3177 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
3178 {
3179   beginService( " GEOM_Superv_i::GetObjects" );
3180   MESSAGE("GEOM_Superv_i::GetObjects");
3181   getGroupOp();
3182
3183   GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
3184   GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
3185   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
3186   endService( " GEOM_Superv_i::GetObjects" );
3187   return aListPtr->_this();
3188 }
3189
3190 //=====================================================================================
3191 // EXPORTED METHODS
3192 //=====================================================================================
3193 extern "C"
3194 {
3195   PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
3196                                                       PortableServer::POA_ptr poa, 
3197                                                       PortableServer::ObjectId * contId,
3198                                                       const char *instanceName, 
3199                                                       const char * interfaceName)
3200   {
3201     GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
3202     //Don't understand the reason why this component is registered ???
3203 //    myGEOM_Superv_i->register_name("/myGEOM_Superv");
3204     return myGEOM_Superv_i->getId() ;
3205   }
3206 }