Salome HOME
SMH: Merged GEOM (NEWGUI, HEAD, POLYWORK)
[modules/geom.git] / src / GEOM_I_Superv / GEOM_Superv_i.cc
1 using namespace std;
2
3 #include "GEOM_Superv_i.hh"
4 #include "SALOME_LifeCycleCORBA.hxx"
5
6 //=============================================================================
7 //  constructor:
8 //=============================================================================
9 GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
10                              PortableServer::POA_ptr poa,
11                              PortableServer::ObjectId * contId, 
12                              const char *instanceName, 
13                              const char *interfaceName) :
14   Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
15 {
16   MESSAGE("GEOM_Superv_i::GEOM_Superv_i");
17
18   _thisObj = this ;
19   _id = _poa->activate_object(_thisObj);
20   name_service = new SALOME_NamingService(_orb);
21   //get RootPOA (the default)
22   //myPOA = PortableServer::RefCountServantBase::_default_POA();
23   CORBA::Object_var anObj = _orb->resolve_initial_references("RootPOA");
24   myPOA = PortableServer::POA::_narrow(anObj);
25
26   myGeomEngine = GEOM::GEOM_Gen::_nil();
27   myStudyID = -1;
28
29   myBasicOp = GEOM::GEOM_IBasicOperations::_nil();
30   my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil();
31   myBoolOp = GEOM::GEOM_IBooleanOperations::_nil();
32   myInsOp = GEOM::GEOM_IInsertOperations::_nil();
33   myTransfOp = GEOM::GEOM_ITransformOperations::_nil();
34   myShapesOp = GEOM::GEOM_IShapesOperations::_nil();
35   myBlocksOp = GEOM::GEOM_IBlocksOperations::_nil();
36   myCurvesOp = GEOM::GEOM_ICurvesOperations::_nil();
37   myLocalOp = GEOM::GEOM_ILocalOperations::_nil();
38   myGroupOp = GEOM::GEOM_IGroupOperations::_nil();
39 }
40
41 //=============================================================================
42 //  destructor
43 //=============================================================================
44 GEOM_Superv_i::~GEOM_Superv_i()
45 {
46   MESSAGE("GEOM_Superv_i::~GEOM_Superv_i");
47   delete name_service;
48 }
49
50 //============================================================================
51 // function : register() 
52 // purpose  : register 'name' in 'name_service'
53 //============================================================================
54 void GEOM_Superv_i::register_name(char * name)
55 {
56   GEOM::GEOM_Superv_ptr g = GEOM::GEOM_Superv::_narrow(POA_GEOM::GEOM_Superv::_this());
57   name_service->Register(g, strdup(name)); 
58 }
59
60 //=============================================================================
61 //  setGEOMEngine:
62 //=============================================================================
63 void GEOM_Superv_i::setGeomEngine()
64 {
65   // get GEOM_Gen engine
66   SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
67   Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" );
68
69   myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
70 }
71
72 //=============================================================================
73 //  SetStudyID:
74 //=============================================================================
75 void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
76 {
77   myStudyID = theId;
78 }
79
80 //=============================================================================
81 //  CreateListOfGO:
82 //=============================================================================
83 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfGO()
84 {
85   MESSAGE("GEOM_Superv_i::CreateListOfGO()");
86   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>();
87   return aListPtr->_this();
88 }
89
90 //=============================================================================
91 //  AddItemToListOfGO:
92 //=============================================================================
93 void GEOM_Superv_i::AddItemToListOfGO(GEOM::GEOM_List_ptr& theList, 
94                                       GEOM::GEOM_Object_ptr    theObject)
95 {
96   MESSAGE("GEOM_Superv_i::AddItemToListOfGO(...)");
97   if (GEOM_List_i<GEOM::ListOfGO>* aList = 
98       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theList, myPOA).in())) {
99     aList->AddObject(theObject);
100     MESSAGE(" NewLength = "<<aList->GetList().length());
101   }
102 }
103
104 //=============================================================================
105 //  CreateListOfLong:
106 //=============================================================================
107 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfLong()
108 {
109   MESSAGE("GEOM_Superv_i::CreateListOfLong()");
110   GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>();
111   return aListPtr->_this();
112 }
113
114 //=============================================================================
115 //  AddItemToListOfLong:
116 //=============================================================================
117 void GEOM_Superv_i::AddItemToListOfLong(GEOM::GEOM_List_ptr& theList, 
118                                         long                     theObject)
119 {
120   MESSAGE("GEOM_Superv_i::AddItemToListOfLong(...)");
121   if (GEOM_List_i<GEOM::ListOfLong>* aList = 
122       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theList, myPOA).in())) {
123     aList->AddObject(theObject);
124     MESSAGE(" NewLength = "<<aList->GetList().length());
125   }
126 }
127
128 //=============================================================================
129 //  CreateListOfDouble:
130 //=============================================================================
131 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfDouble()
132 {
133   MESSAGE("GEOM_Superv_i::CreateListOfDouble()");
134   GEOM_List_i<GEOM::ListOfDouble>* aListPtr = new GEOM_List_i<GEOM::ListOfDouble>();
135   return aListPtr->_this();
136 }
137
138 //=============================================================================
139 //  AddItemToListOfDouble:
140 //=============================================================================
141 void GEOM_Superv_i::AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList, 
142                                           double                   theObject)
143 {
144   MESSAGE("GEOM_Superv_i::AddItemToListOfDouble(...)");
145   if (GEOM_List_i<GEOM::ListOfDouble>* aList = 
146       dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theList, myPOA).in())) {
147     aList->AddObject(theObject);
148     MESSAGE(" NewLength = "<<aList->GetList().length());
149   }
150 }
151
152 //=============================================================================
153 //  getBasicOp:
154 //=============================================================================
155 void GEOM_Superv_i::getBasicOp()
156 {
157   if (CORBA::is_nil(myGeomEngine))
158     setGeomEngine();
159   // get GEOM_IBasicOperations interface
160   myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
161 }
162
163 //=============================================================================
164 //  get3DPrimOp:
165 //=============================================================================
166 void GEOM_Superv_i::get3DPrimOp()
167 {
168   if (CORBA::is_nil(myGeomEngine))
169     setGeomEngine();
170   // get GEOM_I3DPrimOperations interface
171   my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
172 }
173
174 //=============================================================================
175 //  getBoolOp:
176 //=============================================================================
177 void GEOM_Superv_i::getBoolOp()
178 {
179   if (CORBA::is_nil(myGeomEngine))
180     setGeomEngine();
181   // get GEOM_IBooleanOperations interface
182   myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
183 }
184
185 //=============================================================================
186 //  getInsOp:
187 //=============================================================================
188 void GEOM_Superv_i::getInsOp()
189 {
190   if (CORBA::is_nil(myGeomEngine))
191     setGeomEngine();
192   // get GEOM_IInsertOperations interface
193   myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
194 }
195
196 //=============================================================================
197 //  getTransfOp:
198 //=============================================================================
199 void GEOM_Superv_i::getTransfOp()
200 {
201   if (CORBA::is_nil(myGeomEngine))
202     setGeomEngine();
203   // get GEOM_ITransformOperations interface
204   myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
205 }
206
207 //=============================================================================
208 //  getShapesOp:
209 //=============================================================================
210 void GEOM_Superv_i::getShapesOp()
211 {
212   if (CORBA::is_nil(myGeomEngine))
213     setGeomEngine();
214   // get GEOM_IShapesOperations interface
215   myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
216 }
217
218 //=============================================================================
219 //  getBlocksOp:
220 //=============================================================================
221 void GEOM_Superv_i::getBlocksOp()
222 {
223   if (CORBA::is_nil(myGeomEngine))
224     setGeomEngine();
225   // get GEOM_IBlocksOperations interface
226   myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
227 }
228
229 //=============================================================================
230 //  getCurvesOp:
231 //=============================================================================
232 void GEOM_Superv_i::getCurvesOp()
233 {
234   if (CORBA::is_nil(myGeomEngine))
235     setGeomEngine();
236   // get GEOM_ICurvesOperations interface
237   myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
238 }
239
240 //=============================================================================
241 //  getLocalOp:
242 //=============================================================================
243 void GEOM_Superv_i::getLocalOp()
244 {
245   if (CORBA::is_nil(myGeomEngine))
246     setGeomEngine();
247   // get GEOM_ILocalOperations interface
248   myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
249 }
250
251 //=============================================================================
252 //  getGroupOp:
253 //=============================================================================
254 void GEOM_Superv_i::getGroupOp()
255 {
256   if (CORBA::is_nil(myGeomEngine))
257     setGeomEngine();
258   // get GEOM_IGroupOperations interface
259   myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
260 }
261
262 //=============================================================================
263 //  GetServant:
264 //=============================================================================
265 PortableServer::ServantBase_var GEOM_Superv_i::GetServant(CORBA::Object_ptr       theObject,
266                                                           PortableServer::POA_ptr thePOA)
267 {
268   if(CORBA::is_nil(theObject))  return NULL;
269   PortableServer::Servant aServant = thePOA->reference_to_servant(theObject);
270   return aServant;
271 }
272
273 //============================================================================
274 // function : Save()
275 // purpose  : save OCAF/Geom document
276 //============================================================================
277 SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
278                                        const char* theURL,
279                                        bool isMultiFile)
280 {
281   SALOMEDS::TMPFile_var aStreamFile;
282   return aStreamFile._retn();
283 }
284
285 //============================================================================
286 // function : SaveASCII()
287 // purpose  :
288 //============================================================================ 
289 SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
290                                             const char* theURL,
291                                             bool isMultiFile)
292 {
293   SALOMEDS::TMPFile_var aStreamFile;
294   return aStreamFile._retn();
295 }
296
297 //============================================================================
298 // function : Load()
299 // purpose  :
300 //============================================================================ 
301 CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
302                                    const SALOMEDS::TMPFile& theStream,
303                                    const char* theURL,
304                                    bool isMultiFile)
305 {
306   return false;
307 }
308
309 //============================================================================
310 // function : LoadASCII()
311 // purpose  :
312 //============================================================================ 
313 CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
314                                         const SALOMEDS::TMPFile& theStream,
315                                         const char* theURL,
316                                         bool isMultiFile)
317 {
318   return false;
319 }
320
321 //============================================================================
322 // function : Close()
323 // purpose  :
324 //============================================================================
325 void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr theComponent)
326 {}
327
328 //============================================================================
329 // function : ComponentDataType()
330 // purpose  :
331 //============================================================================
332 char* GEOM_Superv_i::ComponentDataType()
333 {
334   return 0;
335 }
336
337 //============================================================================
338 // function : IORToLocalPersistentID()
339 // purpose  :
340 //============================================================================
341 char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
342                                             const char* IORString,
343                                             CORBA::Boolean isMultiFile,
344                                             CORBA::Boolean isASCII)
345 {
346   return 0;
347 }
348
349 //============================================================================
350 // function : LocalPersistentIDToIOR()
351 // purpose  : Create/Load CORBA object from a persistent ref (an entry)
352 //          : Used when a study is loaded
353 //          : The IOR (IORName) of object created is returned
354 //============================================================================
355 char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
356                                             const char* aLocalPersistentID,
357                                             CORBA::Boolean isMultiFile,
358                                             CORBA::Boolean isASCII)
359 {
360   return 0;
361 }
362
363 //============================================================================
364 // function : CanPublishInStudy
365 // purpose  : 
366 //============================================================================
367 bool GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
368 {
369   if (CORBA::is_nil(myGeomEngine))
370     setGeomEngine();
371   return myGeomEngine->CanPublishInStudy(theIOR);
372 }
373
374 //============================================================================
375 // function : PublishInStudy
376 // purpose  : 
377 //============================================================================
378 SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
379                                                     SALOMEDS::SObject_ptr theSObject,
380                                                     CORBA::Object_ptr theObject,
381                                                     const char* theName) throw (SALOME::SALOME_Exception)
382 {
383   if (CORBA::is_nil(myGeomEngine))
384     setGeomEngine();
385   return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
386 }
387
388 //============================================================================
389 // function : CanCopy()
390 // purpose  :
391 //============================================================================
392 CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr theObject)
393 {
394   return false;
395 }
396
397 //============================================================================
398 // function : CopyFrom()
399 // purpose  :
400 //============================================================================
401 SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID)
402 {
403   SALOMEDS::TMPFile_var aStreamFile;
404   return aStreamFile._retn();
405 }
406
407 //============================================================================
408 // function : CanPaste()
409 // purpose  :
410 //============================================================================
411 CORBA::Boolean GEOM_Superv_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID)
412 {
413   return false;
414 }
415
416 //============================================================================
417 // function : PasteInto()
418 // purpose  :
419 //============================================================================
420 SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& theStream,
421                                                CORBA::Long theObjectID,
422                                                SALOMEDS::SObject_ptr theObject)
423 {
424   SALOMEDS::SObject_var aNewSO;
425   return aNewSO._retn();
426 }
427
428 //================= Primitives Construction : BasicOperations =================
429 //=============================================================================
430 //  MakePointXYZ:
431 //=============================================================================
432 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointXYZ(CORBA::Double theX,
433                                                   CORBA::Double theY,
434                                                   CORBA::Double theZ)
435 {
436   MESSAGE("GEOM_Superv_i::MakePointXYZ");
437   if (CORBA::is_nil(myBasicOp)) getBasicOp();
438   // make vertex and return
439   return myBasicOp->MakePointXYZ(theX, theY, theZ);
440 }
441
442 //=============================================================================
443 //  MakePointWithReference:
444 //=============================================================================
445 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
446                                                              CORBA::Double theX, 
447                                                              CORBA::Double theY, 
448                                                              CORBA::Double theZ)
449 {
450   MESSAGE("GEOM_Superv_i::MakePointWithReference");
451   if (CORBA::is_nil(myBasicOp)) getBasicOp();
452   return myBasicOp->MakePointWithReference(theReference, theX, theY, theZ);
453 }
454
455 //=============================================================================
456 //  MakePointOnCurve:
457 //=============================================================================
458 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
459                                                        CORBA::Double theParameter)
460 {
461   MESSAGE("GEOM_Superv_i::MakePointOnCurve");
462   if (CORBA::is_nil(myBasicOp)) getBasicOp();
463   return myBasicOp->MakePointOnCurve(theRefCurve, theParameter);
464 }
465
466 //=============================================================================
467 //  MakeVectorDXDYDZ:
468 //=============================================================================
469 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorDXDYDZ (CORBA::Double theDX,
470                                                        CORBA::Double theDY,
471                                                        CORBA::Double theDZ)
472 {
473   MESSAGE("GEOM_Superv_i::MakeVectorDXDYDZ");
474   if (CORBA::is_nil(myBasicOp)) getBasicOp();
475   return myBasicOp->MakeVectorDXDYDZ(theDX, theDY, theDZ);
476 }
477
478 //=============================================================================
479 //  MakeVectorTwoPnt:
480 //=============================================================================
481 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
482                                                        GEOM::GEOM_Object_ptr thePnt2)
483 {
484   MESSAGE("GEOM_Superv_i::MakeVector");
485   if (CORBA::is_nil(myBasicOp)) getBasicOp();
486   return myBasicOp->MakeVectorTwoPnt(thePnt1, thePnt2);
487 }
488
489 //=============================================================================
490 //  MakeLineTwoPnt:
491 //=============================================================================
492 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
493                                                      GEOM::GEOM_Object_ptr thePnt2)
494 {
495   MESSAGE("GEOM_Superv_i::MakeLineTwoPnt");
496   if (CORBA::is_nil(myBasicOp)) getBasicOp();
497   return myBasicOp->MakeLineTwoPnt(thePnt1, thePnt2);
498 }
499
500 //=============================================================================
501 //  MakePlaneThreePnt:
502 //=============================================================================
503 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
504                                                         GEOM::GEOM_Object_ptr thePnt2,
505                                                         GEOM::GEOM_Object_ptr thePnt3,
506                                                         CORBA::Double theTrimSize)
507 {
508   MESSAGE("GEOM_Superv_i::MakePlaneThreePnt");
509   if (CORBA::is_nil(myBasicOp)) getBasicOp();
510   return myBasicOp->MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize);
511 }
512
513 //=============================================================================
514 //  MakePlanePntVec:
515 //=============================================================================
516 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
517                                                       GEOM::GEOM_Object_ptr theVec,
518                                                       CORBA::Double theTrimSize)
519 {
520   MESSAGE("GEOM_Superv_i::MakePlanePntVec");
521   if (CORBA::is_nil(myBasicOp)) getBasicOp();
522   return myBasicOp->MakePlanePntVec(thePnt, theVec, theTrimSize);
523 }
524
525 //=============================================================================
526 //  MakePlaneFace:
527 //=============================================================================
528 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
529                                                     CORBA::Double theTrimSize)
530 {
531   MESSAGE("GEOM_Superv_i::MakePlaneFace");
532   if (CORBA::is_nil(myBasicOp)) getBasicOp();
533   return myBasicOp->MakePlaneFace(theFace, theTrimSize);
534 }
535
536 //=============================================================================
537 //  MakeMarker:
538 //=============================================================================
539 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarker 
540 (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
541  CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
542  CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
543 {
544   MESSAGE("GEOM_Superv_i::MakeMarker");
545   if (CORBA::is_nil(myBasicOp)) getBasicOp();
546   return myBasicOp->MakeMarker(theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ);
547 }
548
549 //================= Primitives Construction : 3DPrimOperations ================
550 //=============================================================================
551 //  MakeBox:
552 //=============================================================================
553 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBox (CORBA::Double theX1,
554                                               CORBA::Double theY1,
555                                               CORBA::Double theZ1,
556                                               CORBA::Double theX2,
557                                               CORBA::Double theY2,
558                                               CORBA::Double theZ2)
559 {
560   MESSAGE("GEOM_Superv_i::MakeBox");
561   if (CORBA::is_nil(myBasicOp)) getBasicOp();
562   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
563   return my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1),
564                                    myBasicOp->MakePointXYZ(theX2, theY2, theZ2));
565 }
566
567 //=============================================================================
568 //  MakeBoxDXDYDZ:
569 //=============================================================================
570 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxDXDYDZ (CORBA::Double theDX, 
571                                                     CORBA::Double theDY, 
572                                                     CORBA::Double theDZ)
573 {
574   MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ");
575   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
576   return my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ);
577 }
578
579 //=============================================================================
580 //  MakeBoxTwoPnt:
581 //=============================================================================
582 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1, 
583                                                     GEOM::GEOM_Object_ptr thePnt2)
584 {
585   MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt");
586   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
587   return my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2);
588 }
589
590 //=============================================================================
591 //  MakeCylinderPntVecRH:
592 //=============================================================================
593 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
594                                                            GEOM::GEOM_Object_ptr theAxis,
595                                                            CORBA::Double theRadius,
596                                                            CORBA::Double theHeight)
597 {
598   MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH");
599   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
600   return my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight); 
601 }
602
603 //=============================================================================
604 //  MakeCylinderRH:
605 //=============================================================================
606 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR, 
607                                                      CORBA::Double theH)
608 {
609   MESSAGE("GEOM_Superv_i::MakeCylinderRH");
610   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
611   return my3DPrimOp->MakeCylinderRH(theR, theH); 
612 }
613
614 //=============================================================================
615 //  MakeSphere:
616 //=============================================================================
617 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere  (CORBA::Double theX,
618                                                   CORBA::Double theY,
619                                                   CORBA::Double theZ,
620                                                   CORBA::Double theRadius)
621 {
622   MESSAGE("GEOM_Superv_i::MakeSphepe");
623   if (CORBA::is_nil(myBasicOp)) getBasicOp();
624   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
625   return my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
626 }
627
628 //=============================================================================
629 //  MakeSphereR:
630 //=============================================================================
631 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
632 {
633   MESSAGE("GEOM_Superv_i::MakeSphereR");
634   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
635   return my3DPrimOp->MakeSphereR(theR);
636 }
637
638 //=============================================================================
639 //  MakeSpherePntR:
640 //=============================================================================
641 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt, 
642                                                      CORBA::Double theR)
643 {
644   MESSAGE("GEOM_Superv_i::MakeSpherePntR");
645   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
646   return my3DPrimOp->MakeSpherePntR(thePnt, theR);
647 }
648
649 //=============================================================================
650 //  MakeTorusPntVecRR:
651 //=============================================================================
652 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
653                                                         GEOM::GEOM_Object_ptr theVec,
654                                                         CORBA::Double theRMajor,
655                                                         CORBA::Double theRMinor)
656 {
657   MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
658   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
659   return my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
660 }
661
662 //=============================================================================
663 //  MakeTorusRR:
664 //=============================================================================
665 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor,
666                                                   CORBA::Double theRMinor)
667 {
668   MESSAGE("GEOM_Superv_i::MakeTorusRR");
669   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
670   return my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
671 }
672
673 //=============================================================================
674 //  MakeConePntVecR1R2H:
675 //=============================================================================
676 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
677                                                           GEOM::GEOM_Object_ptr theAxis,
678                                                           CORBA::Double theR1,
679                                                           CORBA::Double theR2,
680                                                           CORBA::Double theHeight)
681 {
682   MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
683   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
684   return my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
685 }
686
687 //=============================================================================
688 //  MakeConeR1R2H:
689 //=============================================================================
690 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1, 
691                                                     CORBA::Double theR2, 
692                                                     CORBA::Double theHeight)
693 {
694   MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
695   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
696   return my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
697 }
698
699 //=============================================================================
700 //  MakePrismVecH:
701 //=============================================================================
702 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
703                                                     GEOM::GEOM_Object_ptr theVec,
704                                                     CORBA::Double         theH)
705 {
706   MESSAGE("GEOM_Superv_i::MakePrismVecH");
707   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
708   return my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
709 }
710
711
712 //=============================================================================
713 //  MakePrismTwoPnt:
714 //=============================================================================
715 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
716                                                       GEOM::GEOM_Object_ptr thePoint1,
717                                                       GEOM::GEOM_Object_ptr thePoint2)
718 {
719   MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
720   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
721   return my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
722 }
723
724 //=============================================================================
725 //  MakePipe:
726 //=============================================================================
727 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase, 
728                                                GEOM::GEOM_Object_ptr thePath)
729 {
730   MESSAGE("GEOM_Superv_i::MakePipe");
731   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
732   return my3DPrimOp->MakePipe(theBase, thePath);
733 }
734
735 //=============================================================================
736 //  MakeRevolutionAxisAngle:
737 //=============================================================================
738 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
739                                                               GEOM::GEOM_Object_ptr theAxis,
740                                                               CORBA::Double theAngle)
741 {
742   MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
743   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
744   return my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
745 }
746
747 //=============================================================================
748 //  MakeFilling:
749 //=============================================================================
750 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
751                                                   CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
752                                                   CORBA::Double theTol2D, CORBA::Double theTol3D,
753                                                   CORBA::Long theNbIter)
754 {
755   MESSAGE("GEOM_Superv_i::MakeFilling");
756   if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
757   return my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter);
758 }
759
760 //============================= BooleanOperations =============================
761 //=============================================================================
762 //  MakeBoolean:
763 //=============================================================================
764 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
765                                                   GEOM::GEOM_Object_ptr theShape2,
766                                                   CORBA::Long theOperation)
767 {
768   // theOperation indicates the operation to be done:
769   // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
770   MESSAGE("GEOM_Superv_i::MakeBoolean");
771   if (CORBA::is_nil(myBoolOp)) getBoolOp();
772   return myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
773 }
774
775 //=============================================================================
776 //  MakeFuse:
777 //=============================================================================
778 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1,
779                                                GEOM::GEOM_Object_ptr theShape2)
780 {
781   MESSAGE("GEOM_Superv_i::MakeFuse");
782   if (CORBA::is_nil(myBoolOp)) getBoolOp();
783   return myBoolOp->MakeBoolean(theShape1, theShape2, 3);
784 }
785
786 //=============================================================================
787 //  MakePartition:
788 //=============================================================================
789 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr   theShapes,
790                                                     GEOM::GEOM_List_ptr   theTools,
791                                                     GEOM::GEOM_List_ptr   theKeepInside,
792                                                     GEOM::GEOM_List_ptr   theRemoveInside,
793                                                     const CORBA::Short      theLimit,
794                                                     const CORBA::Boolean    theRemoveWebs,
795                                                     GEOM::GEOM_List_ptr theMaterials)
796 {
797   MESSAGE("GEOM_Superv_i::MakePartition");
798   GEOM_List_i<GEOM::ListOfGO>* aListImplS = 
799     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in());
800   GEOM_List_i<GEOM::ListOfGO>* aListImplT = 
801     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theTools, myPOA).in());
802   GEOM_List_i<GEOM::ListOfGO>* aListImplKI = 
803     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theKeepInside, myPOA).in());
804   GEOM_List_i<GEOM::ListOfGO>* aListImplRI = 
805     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theRemoveInside, myPOA).in());
806   GEOM_List_i<GEOM::ListOfLong>* aListImplM = 
807     dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theMaterials, myPOA).in());
808   if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
809     if (CORBA::is_nil(myBoolOp)) getBoolOp();
810     return myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(), 
811                                    aListImplKI->GetList(), aListImplRI->GetList(),
812                                    theLimit, theRemoveWebs, aListImplM->GetList());
813   }
814   return NULL;
815 }
816
817 //=============================================================================
818 //  MakeHalfPartition:
819 //=============================================================================
820 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
821                                                         GEOM::GEOM_Object_ptr thePlane)
822 {
823   MESSAGE("GEOM_Superv_i::MakeHalfPartition");
824   if (CORBA::is_nil(myBoolOp)) getBoolOp();
825   return myBoolOp->MakeHalfPartition(theShape, thePlane);
826 }
827
828 //============================== InsertOperations =============================
829 //=============================================================================
830 //  MakeCopy:
831 //=============================================================================
832 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
833 {
834   MESSAGE("GEOM_Superv_i::MakeCopy");
835   if (CORBA::is_nil(myInsOp)) getInsOp();
836   return myInsOp->MakeCopy(theOriginal);
837 }
838
839 //=============================================================================
840 //  Export:
841 //=============================================================================
842 void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject, 
843                             const char*           theFileName, 
844                             const char*           theFormatName)
845 {
846   MESSAGE("GEOM_Superv_i::Export");
847   if (CORBA::is_nil(myInsOp)) getInsOp();
848   myInsOp->Export(theObject, theFileName, theFormatName);
849 }
850
851 //=============================================================================
852 //  Import:
853 //=============================================================================
854 GEOM::GEOM_Object_ptr GEOM_Superv_i::Import (const char* theFileName, 
855                                              const char* theFormatName)
856 {
857   MESSAGE("GEOM_Superv_i::Import");
858   if (CORBA::is_nil(myInsOp)) getInsOp();
859   return myInsOp->Import(theFileName, theFormatName);
860 }
861
862 //=============================================================================
863 //  ImportTranslators:
864 //=============================================================================
865 void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
866                                        GEOM::string_array_out thePatterns)
867 {
868   MESSAGE("GEOM_Superv_i::ImportTranslators");
869   if (CORBA::is_nil(myInsOp)) getInsOp();
870   myInsOp->ImportTranslators(theFormats, thePatterns);
871 }
872
873 //=============================================================================
874 //  ExportTranslators:
875 //=============================================================================
876 void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
877                                        GEOM::string_array_out thePatterns)
878 {
879   MESSAGE("GEOM_Superv_i::ExportTranslators");
880   if (CORBA::is_nil(myInsOp)) getInsOp();
881   myInsOp->ExportTranslators(theFormats, thePatterns);
882 }
883
884 //============================= TransformOperations ===========================
885 //=============================================================================
886 //  TranslateTwoPoints:
887 //=============================================================================
888 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
889                                                          GEOM::GEOM_Object_ptr thePoint1,
890                                                          GEOM::GEOM_Object_ptr thePoint2)
891 {
892   MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
893   if (CORBA::is_nil(myTransfOp)) getTransfOp();
894   return myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
895 }
896
897 //=============================================================================
898 //  TranslateTwoPointsCopy:
899 //=============================================================================
900 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
901                                                              GEOM::GEOM_Object_ptr thePoint1,
902                                                              GEOM::GEOM_Object_ptr thePoint2)
903 {
904   MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
905   if (CORBA::is_nil(myTransfOp)) getTransfOp();
906   return myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
907 }
908
909 //=============================================================================
910 //  TranslateDXDYDZ:
911 //=============================================================================
912 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
913                                                       CORBA::Double theDX, 
914                                                       CORBA::Double theDY, 
915                                                       CORBA::Double theDZ)
916 {
917   MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
918   if (CORBA::is_nil(myTransfOp)) getTransfOp();
919   return myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
920 }
921
922 //=============================================================================
923 //  TranslateDXDYDZCopy:
924 //=============================================================================
925 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
926                                                           CORBA::Double theDX, 
927                                                           CORBA::Double theDY, 
928                                                           CORBA::Double theDZ)
929 {
930   MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
931   if (CORBA::is_nil(myTransfOp)) getTransfOp();
932   return myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
933 }
934
935 //=============================================================================
936 //  TranslateVector:
937 //=============================================================================
938 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject,
939                                                       GEOM::GEOM_Object_ptr theVector)
940 {
941   MESSAGE("GEOM_Superv_i::TranslateVector");
942   if (CORBA::is_nil(myTransfOp)) getTransfOp();
943   return myTransfOp->TranslateVector(theObject, theVector);
944 }
945
946 //=============================================================================
947 //  TranslateVectorCopy:
948 //=============================================================================
949 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
950                                                           GEOM::GEOM_Object_ptr theVector)
951 {
952   MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
953   if (CORBA::is_nil(myTransfOp)) getTransfOp();
954   return myTransfOp->TranslateVectorCopy(theObject, theVector);
955 }
956
957 //=============================================================================
958 //  MultiTranslate1D:
959 //=============================================================================
960 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
961                                                        GEOM::GEOM_Object_ptr theVector,
962                                                        CORBA::Double theStep,
963                                                        CORBA::Long theNbTimes)
964 {
965   MESSAGE("GEOM_Superv_i::MultiTranslate1D");
966   if (CORBA::is_nil(myTransfOp)) getTransfOp();
967   return myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
968 }
969
970 //=============================================================================
971 //  MultiTranslate2D:
972 //=============================================================================
973 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
974                                                        GEOM::GEOM_Object_ptr theVector1,
975                                                        CORBA::Double theStep1,
976                                                        CORBA::Long theNbTimes1,
977                                                        GEOM::GEOM_Object_ptr theVector2,
978                                                        CORBA::Double theStep2,
979                                                        CORBA::Long theNbTimes2)
980 {
981   MESSAGE("GEOM_Superv_i::MultiTranslate2D");
982   if (CORBA::is_nil(myTransfOp)) getTransfOp();
983   return myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
984                                       theVector2, theStep2, theNbTimes2);
985 }
986
987 //=============================================================================
988 //  Rotate:
989 //=============================================================================
990 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
991                                              GEOM::GEOM_Object_ptr theAxis,
992                                              CORBA::Double theAngle)
993 {
994   MESSAGE("GEOM_Superv_i::Rotate");
995   if (CORBA::is_nil(myTransfOp)) getTransfOp();
996   return myTransfOp->Rotate(theObject, theAxis, theAngle);
997 }
998
999 //=============================================================================
1000 //  RotateCopy:
1001 //=============================================================================
1002 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
1003                                                  GEOM::GEOM_Object_ptr theAxis,
1004                                                  CORBA::Double theAngle)
1005 {
1006   MESSAGE("GEOM_Superv_i::RotateCopy");
1007   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1008   return myTransfOp->RotateCopy(theObject, theAxis, theAngle);
1009 }
1010
1011 //=============================================================================
1012 //  MultiRotate1D:
1013 //=============================================================================
1014 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1015                                                     GEOM::GEOM_Object_ptr theAxis,
1016                                                     CORBA::Long theNbTimes)
1017 {
1018   MESSAGE("GEOM_Superv_i::MultiRotate1D");
1019   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1020   return myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
1021 }
1022
1023 //=============================================================================
1024 //  MultiRotate2D:
1025 //=============================================================================
1026 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1027                                                     GEOM::GEOM_Object_ptr theAxis,
1028                                                     CORBA::Double theAngle,
1029                                                     CORBA::Long theNbTimes1,
1030                                                     CORBA::Double theStep,
1031                                                     CORBA::Long theNbTimes2)
1032 {
1033   MESSAGE("GEOM_Superv_i::MultiRotate2D");
1034   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1035   return myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
1036 }
1037
1038 //=============================================================================
1039 //  MirrorPlane:
1040 //=============================================================================
1041 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject, 
1042                                                   GEOM::GEOM_Object_ptr thePlane)
1043 {
1044   MESSAGE("GEOM_Superv_i::MirrorPlane");
1045   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1046   return myTransfOp->MirrorPlane(theObject, thePlane);
1047 }
1048
1049 //=============================================================================
1050 //  MirrorPlaneCopy:
1051 //=============================================================================
1052 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject, 
1053                                                       GEOM::GEOM_Object_ptr thePlane)
1054 {
1055   MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
1056   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1057   return myTransfOp->MirrorPlaneCopy(theObject, thePlane);
1058 }
1059
1060 //=============================================================================
1061 //  MirrorAxis:
1062 //=============================================================================
1063 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject, 
1064                                                  GEOM::GEOM_Object_ptr theAxis)
1065 {
1066   MESSAGE("GEOM_Superv_i::MirrorAxis");
1067   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1068   return myTransfOp->MirrorAxis(theObject, theAxis);
1069 }
1070
1071 //=============================================================================
1072 //  MirrorAxisCopy:
1073 //=============================================================================
1074 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject, 
1075                                                      GEOM::GEOM_Object_ptr theAxis)
1076 {
1077   MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
1078   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1079   return myTransfOp->MirrorAxisCopy(theObject, theAxis);
1080 }
1081
1082 //=============================================================================
1083 //  MirrorPoint:
1084 //=============================================================================
1085 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject, 
1086                                                   GEOM::GEOM_Object_ptr thePoint)
1087 {
1088   MESSAGE("GEOM_Superv_i::MirrorPoint");
1089   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1090   return myTransfOp->MirrorPoint(theObject, thePoint);
1091 }
1092
1093 //=============================================================================
1094 //  MirrorPointCopy:
1095 //=============================================================================
1096 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject, 
1097                                                       GEOM::GEOM_Object_ptr thePoint)
1098 {
1099   MESSAGE("GEOM_Superv_i::MirrorPointCopy");
1100   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1101   return myTransfOp->MirrorPointCopy(theObject, thePoint);
1102 }
1103
1104 //=============================================================================
1105 //  OffsetShape:
1106 //=============================================================================
1107 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject, 
1108                                                   CORBA::Double theOffset)
1109 {
1110   MESSAGE("GEOM_Superv_i::OffsetShape");
1111   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1112   return myTransfOp->OffsetShape(theObject, theOffset);
1113 }
1114
1115 //=============================================================================
1116 //  OffsetShapeCopy:
1117 //=============================================================================
1118 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject, 
1119                                                       CORBA::Double theOffset)
1120 {
1121   MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1122   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1123   return myTransfOp->OffsetShapeCopy(theObject, theOffset);
1124 }
1125
1126 //=============================================================================
1127 //  ScaleShape:
1128 //=============================================================================
1129 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject, 
1130                                                  GEOM::GEOM_Object_ptr thePoint,
1131                                                  CORBA::Double theFactor)
1132 {
1133   MESSAGE("GEOM_Superv_i::ScaleShape");
1134   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1135   return myTransfOp->ScaleShape(theObject, thePoint, theFactor);
1136 }
1137
1138 //=============================================================================
1139 //  ScaleShapeCopy:
1140 //=============================================================================
1141 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject, 
1142                                                      GEOM::GEOM_Object_ptr thePoint,
1143                                                      CORBA::Double theFactor)
1144 {
1145   MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
1146   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1147   return myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
1148 }
1149
1150 //=============================================================================
1151 //  PositionShape:
1152 //=============================================================================
1153 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
1154                                                     GEOM::GEOM_Object_ptr theStartLCS,
1155                                                     GEOM::GEOM_Object_ptr theEndLCS)
1156 {
1157   MESSAGE("GEOM_Superv_i::PositionShape");
1158   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1159   return myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
1160 }
1161
1162 //=============================================================================
1163 //  PositionShapeCopy:
1164 //=============================================================================
1165 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
1166                                                         GEOM::GEOM_Object_ptr theStartLCS,
1167                                                         GEOM::GEOM_Object_ptr theEndLCS)
1168 {
1169   MESSAGE("GEOM_Superv_i::PositionShapeCopy");
1170   if (CORBA::is_nil(myTransfOp)) getTransfOp();
1171   return myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
1172 }
1173
1174 //=============================== ShapesOperations ============================
1175 //=============================================================================
1176 //  Make:
1177 //=============================================================================
1178 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
1179                                                GEOM::GEOM_Object_ptr thePnt2)
1180 {
1181   MESSAGE("GEOM_Superv_i::MakeEdge");
1182   if (CORBA::is_nil(myShapesOp)) getShapesOp();
1183   return myShapesOp->MakeEdge(thePnt1, thePnt2);
1184 }
1185
1186 //=============================================================================
1187 //  MakeWire:
1188 //=============================================================================
1189 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires)
1190 {
1191   MESSAGE("GEOM_Superv_i::MakeWire");
1192   if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW = 
1193       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
1194     if (CORBA::is_nil(myShapesOp)) getShapesOp();
1195     return myShapesOp->MakeWire(aListImplEW->GetList());
1196   }
1197   return NULL;
1198 }
1199
1200 //=============================================================================
1201 //  MakeFace:
1202 //=============================================================================
1203 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
1204                                                CORBA::Boolean isPlanarWanted)
1205 {
1206   MESSAGE("GEOM_Superv_i::MakeFace");
1207   if (CORBA::is_nil(myShapesOp)) getShapesOp();
1208   return myShapesOp->MakeFace(theWire, isPlanarWanted);
1209 }
1210
1211 //=============================================================================
1212 //  MakeFaceWires:
1213 //=============================================================================
1214 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires,
1215                                                     CORBA::Boolean isPlanarWanted)
1216 {
1217   MESSAGE("GEOM_Superv_i::MakeFaceWires");
1218   if (GEOM_List_i<GEOM::ListOfGO>* aListImplW = 
1219       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
1220     if (CORBA::is_nil(myShapesOp)) getShapesOp();
1221     return myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
1222   }
1223   return NULL;
1224 }
1225
1226 //=============================================================================
1227 //  MakeShell:
1228 //=============================================================================
1229 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells)
1230 {
1231   MESSAGE("GEOM_Superv_i::MakeShell");
1232   if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS = 
1233       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
1234     if (CORBA::is_nil(myShapesOp)) getShapesOp();
1235     return myShapesOp->MakeShell(aListImplFS->GetList());
1236   }
1237   return NULL;
1238 }
1239
1240 //=============================================================================
1241 //  MakeSolidShell:
1242 //=============================================================================
1243 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
1244 {
1245   MESSAGE("GEOM_Superv_i::MakeSolidShell");
1246   if (CORBA::is_nil(myShapesOp)) getShapesOp();
1247   return myShapesOp->MakeSolidShell(theShell);
1248 }
1249
1250 //=============================================================================
1251 //  MakeSolidShells:
1252 //=============================================================================
1253 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells)
1254 {
1255   MESSAGE("GEOM_Superv_i::MakeSolidShells");
1256   if (GEOM_List_i<GEOM::ListOfGO>* aListImplS = 
1257       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
1258     if (CORBA::is_nil(myShapesOp)) getShapesOp();
1259     return myShapesOp->MakeSolidShells(aListImplS->GetList());
1260   }
1261   return NULL;
1262 }
1263
1264 //=============================================================================
1265 //  MakeCompound:
1266 //=============================================================================
1267 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes)
1268 {
1269   MESSAGE("GEOM_Superv_i::MakeCompound");
1270   if (GEOM_List_i<GEOM::ListOfGO>* aListImpl = 
1271       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
1272     if (CORBA::is_nil(myShapesOp)) getShapesOp();
1273     return myShapesOp->MakeCompound(aListImpl->GetList());
1274   }
1275   return NULL;
1276 }
1277
1278 //=============================================================================
1279 //  MakeGlueFaces:
1280 //=============================================================================
1281 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
1282                                                     const CORBA::Double   theTolerance)
1283 {
1284   MESSAGE("GEOM_Superv_i::MakeGlueFaces");
1285   if (CORBA::is_nil(myShapesOp)) getShapesOp();
1286   return myShapesOp->MakeGlueFaces(theShape, theTolerance);
1287 }
1288
1289 //=============================================================================
1290 //  MakeExplode:
1291 //=============================================================================
1292 GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
1293                                                     const CORBA::Long theShapeType,
1294                                                     const CORBA::Boolean isSorted)
1295 {
1296   MESSAGE("GEOM_Superv_i::MakeExplode");
1297   if (CORBA::is_nil(myShapesOp)) getShapesOp();
1298
1299   GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
1300   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1301   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1302   return aListPtr->_this();
1303 }
1304
1305 //=============================================================================
1306 //  NumberOfFaces:
1307 //=============================================================================
1308 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
1309 {
1310   MESSAGE("GEOM_Superv_i::NumberOfFaces");
1311   if (CORBA::is_nil(myShapesOp)) getShapesOp();
1312   return myShapesOp->NumberOfFaces(theShape);
1313 }
1314
1315 //=============================================================================
1316 //  NumberOfEdges:
1317 //=============================================================================
1318 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
1319 {
1320   MESSAGE("GEOM_Superv_i::NumberOfEdges");
1321   if (CORBA::is_nil(myShapesOp)) getShapesOp();
1322   return myShapesOp->NumberOfEdges(theShape);
1323 }
1324
1325 //=============================================================================
1326 //  ChangeOrientation:
1327 //=============================================================================
1328 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
1329 {
1330   MESSAGE("GEOM_Superv_i::ChangeOrientation");
1331   if (CORBA::is_nil(myShapesOp)) getShapesOp();
1332   return myShapesOp->ChangeOrientation(theShape);
1333 }
1334
1335
1336 //=============================== BlocksOperations ============================
1337 //=============================================================================
1338 //  MakeQuad4Vertices:
1339 //=============================================================================
1340 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
1341                                                         GEOM::GEOM_Object_ptr thePnt2,
1342                                                         GEOM::GEOM_Object_ptr thePnt3,
1343                                                         GEOM::GEOM_Object_ptr thePnt4)
1344 {
1345   MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
1346   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1347   return myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
1348 }
1349
1350 //=============================================================================
1351 //  MakeQuad:
1352 //=============================================================================
1353 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
1354                                                GEOM::GEOM_Object_ptr theEdge2,
1355                                                GEOM::GEOM_Object_ptr theEdge3,
1356                                                GEOM::GEOM_Object_ptr theEdge4)
1357 {
1358   MESSAGE("GEOM_Superv_i::MakeQuad");
1359   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1360   return myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
1361 }
1362
1363 //=============================================================================
1364 //  MakeQuad2Edges:
1365 //=============================================================================
1366 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
1367                                                      GEOM::GEOM_Object_ptr theEdge2)
1368 {
1369   MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
1370   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1371   return myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
1372 }
1373
1374 //=============================================================================
1375 //  MakeHexa:
1376 //=============================================================================
1377 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
1378                                                GEOM::GEOM_Object_ptr theFace2,
1379                                                GEOM::GEOM_Object_ptr theFace3,
1380                                                GEOM::GEOM_Object_ptr theFace4,
1381                                                GEOM::GEOM_Object_ptr theFace5,
1382                                                GEOM::GEOM_Object_ptr theFace6)
1383 {
1384   MESSAGE("GEOM_Superv_i::MakeHexa");
1385   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1386   return myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
1387 }
1388
1389 //=============================================================================
1390 //  MakeHexa2Faces:
1391 //=============================================================================
1392 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
1393                                                      GEOM::GEOM_Object_ptr theFace2)
1394 {
1395   MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
1396   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1397   return myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
1398 }
1399
1400 //=============================================================================
1401 //  GetPoint:
1402 //=============================================================================
1403 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
1404                                                const CORBA::Double   theX,
1405                                                const CORBA::Double   theY,
1406                                                const CORBA::Double   theZ,
1407                                                const CORBA::Double   theEpsilon)
1408 {
1409   MESSAGE("GEOM_Superv_i::GetPoint");
1410   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1411   return myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
1412 }
1413
1414 //=============================================================================
1415 //  GetEdge:
1416 //=============================================================================
1417 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
1418                                               GEOM::GEOM_Object_ptr thePoint1,
1419                                               GEOM::GEOM_Object_ptr thePoint2)
1420 {
1421   MESSAGE("GEOM_Superv_i::GetEdge");
1422   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1423   return myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
1424 }
1425
1426 //=============================================================================
1427 //  GetEdgeNearPoint:
1428 //=============================================================================
1429 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
1430                                                        GEOM::GEOM_Object_ptr thePoint)
1431 {
1432   MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
1433   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1434   return myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
1435 }
1436
1437 //=============================================================================
1438 //  GetFaceByPoints:
1439 //=============================================================================
1440 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
1441                                                       GEOM::GEOM_Object_ptr thePoint1,
1442                                                       GEOM::GEOM_Object_ptr thePoint2,
1443                                                       GEOM::GEOM_Object_ptr thePoint3,
1444                                                       GEOM::GEOM_Object_ptr thePoint4)
1445 {
1446   MESSAGE("GEOM_Superv_i::GetFaceByPoints");
1447   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1448   return myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
1449 }
1450
1451 //=============================================================================
1452 //  GetFaceByEdges:
1453 //=============================================================================
1454 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
1455                                                      GEOM::GEOM_Object_ptr theEdge1,
1456                                                      GEOM::GEOM_Object_ptr theEdge2)
1457 {
1458   MESSAGE("GEOM_Superv_i::GetFaceByEdges");
1459   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1460   return myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
1461 }
1462
1463 //=============================================================================
1464 //  GetOppositeFace:
1465 //=============================================================================
1466 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
1467                                                       GEOM::GEOM_Object_ptr theFace)
1468 {
1469   MESSAGE("GEOM_Superv_i::GetOppositeFace");
1470   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1471   return myBlocksOp->GetOppositeFace(theBlock, theFace);
1472 }
1473
1474 //=============================================================================
1475 //  GetFaceNearPoint:
1476 //=============================================================================
1477 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
1478                                                        GEOM::GEOM_Object_ptr thePoint)
1479 {
1480   MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
1481   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1482   return myBlocksOp->GetFaceNearPoint(theShape, thePoint);
1483 }
1484
1485 //=============================================================================
1486 //  GetFaceByNormale:
1487 //=============================================================================
1488 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
1489                                                        GEOM::GEOM_Object_ptr theVector)
1490 {
1491   MESSAGE("GEOM_Superv_i::GetFaceByNormale");
1492   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1493   return myBlocksOp->GetFaceByNormale(theBlock, theVector);
1494 }
1495
1496 //=============================================================================
1497 //  IsCompoundOfBlocks:
1498 //=============================================================================
1499 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
1500                                                   const CORBA::Long     theMinNbFaces,
1501                                                   const CORBA::Long     theMaxNbFaces,
1502                                                   CORBA::Long&          theNbBlocks)
1503 {
1504   MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
1505   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1506   return myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
1507 }
1508
1509 //=============================================================================
1510 //  CheckCompoundOfBlocks:
1511 //=============================================================================
1512 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks 
1513 (GEOM::GEOM_Object_ptr theCompound,
1514  GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
1515 {
1516   MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
1517   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1518   return myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
1519 }
1520
1521 //=============================================================================
1522 //  PrintBCErrors:
1523 //=============================================================================
1524 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
1525                                     const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
1526 {
1527   MESSAGE("GEOM_Superv_i::PrintBCErrors");
1528   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1529   return myBlocksOp->PrintBCErrors(theCompound, theErrors);
1530 }
1531
1532 //=============================================================================
1533 //  ExplodeCompoundOfBlocks:
1534 //=============================================================================
1535 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
1536                                                                 const CORBA::Long     theMinNbFaces,
1537                                                                 const CORBA::Long     theMaxNbFaces)
1538 {
1539   MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
1540   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1541   GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
1542   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
1543   return aListPtr->_this();
1544 }
1545
1546 //=============================================================================
1547 //  GetBlockNearPoint:
1548 //=============================================================================
1549 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
1550                                                         GEOM::GEOM_Object_ptr thePoint)
1551 {
1552   MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
1553   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1554   return myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
1555 }
1556
1557 //=============================================================================
1558 //  GetBlockByParts:
1559 //=============================================================================
1560 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
1561                                                       GEOM::GEOM_List_ptr theParts)
1562 {
1563   MESSAGE("GEOM_Superv_i::GetBlockByParts");
1564   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
1565       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
1566     if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1567     return myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
1568   }
1569   return NULL;
1570 }
1571
1572 //=============================================================================
1573 //  GetBlocksByParts:
1574 //=============================================================================
1575 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
1576                                                          GEOM::GEOM_List_ptr theParts)
1577 {
1578   MESSAGE("GEOM_Superv_i::GetBlocksByParts");
1579   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
1580       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
1581     if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1582     
1583     GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
1584     GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
1585     return aListPtr->_this();
1586   }
1587   return NULL;
1588 }
1589
1590 //=============================================================================
1591 //  MakeMultiTransformation1D:
1592 //=============================================================================
1593 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
1594                                                                 const CORBA::Long     theDirFace1,
1595                                                                 const CORBA::Long     theDirFace2,
1596                                                                 const CORBA::Long     theNbTimes)
1597 {
1598   MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
1599   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1600   return myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
1601 }
1602
1603 //=============================================================================
1604 //  MakeMultiTransformation2D:
1605 //=============================================================================
1606 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D 
1607 (GEOM::GEOM_Object_ptr theBlock,
1608  const CORBA::Long     theDirFace1U,
1609  const CORBA::Long     theDirFace2U,
1610  const CORBA::Long     theNbTimesU,
1611  const CORBA::Long     theDirFace1V,
1612  const CORBA::Long     theDirFace2V,
1613  const CORBA::Long     theNbTimesV)
1614 {
1615   MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
1616   if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1617   return myBlocksOp->MakeMultiTransformation2D(theBlock, 
1618                                                theDirFace1U, theDirFace2U, theNbTimesU,
1619                                                theDirFace1V, theDirFace2V, theNbTimesV);
1620 }
1621
1622 //=============================== CurvesOperations ============================
1623 //=============================================================================
1624 //  MakeCirclePntVecR:
1625 //=============================================================================
1626 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
1627                                                         GEOM::GEOM_Object_ptr theVector,
1628                                                         CORBA::Double theR)
1629 {
1630   MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
1631   if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1632   return myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
1633 }
1634
1635 //=============================================================================
1636 //  MakeCircleThreePnt:
1637 //=============================================================================
1638 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
1639                                                          GEOM::GEOM_Object_ptr thePnt2,
1640                                                          GEOM::GEOM_Object_ptr thePnt3)
1641 {
1642   MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
1643   if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1644   return myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
1645 }
1646
1647 //=============================================================================
1648 //  MakeEllipse:
1649 //=============================================================================
1650 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
1651                                                   GEOM::GEOM_Object_ptr theVector,
1652                                                   CORBA::Double theRMajor, 
1653                                                   CORBA::Double theRMinor)
1654 {
1655   MESSAGE("GEOM_Superv_i::MakeEllipse");
1656   if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1657   return myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
1658 }
1659
1660 //=============================================================================
1661 //  MakeArc:
1662 //=============================================================================
1663 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
1664                                               GEOM::GEOM_Object_ptr thePnt2,
1665                                               GEOM::GEOM_Object_ptr thePnt3)
1666 {
1667   MESSAGE("GEOM_Superv_i::MakeArc");
1668   if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1669   return myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
1670 }
1671
1672 //=============================================================================
1673 //  MakePolyline:
1674 //=============================================================================
1675 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints)
1676 {
1677   MESSAGE("GEOM_Superv_i::MakePolyline");
1678   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
1679       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
1680     if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1681     return myCurvesOp->MakePolyline(aListImplP->GetList());
1682   }
1683   return NULL;
1684 }
1685
1686 //=============================================================================
1687 //  MakeSplineBezier:
1688 //=============================================================================
1689 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints)
1690 {
1691   MESSAGE("GEOM_Superv_i::MakeSplineBezier");
1692   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
1693       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
1694     if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1695     return myCurvesOp->MakeSplineBezier(aListImplP->GetList());
1696   }
1697   return NULL;
1698 }
1699
1700 //=============================================================================
1701 //  MakeSplineInterpolation:
1702 //=============================================================================
1703 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints)
1704 {
1705   MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
1706   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
1707       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
1708     if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1709     return myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
1710   }
1711   return NULL;
1712 }
1713
1714 //=============================================================================
1715 //  MakeSketcher:
1716 //=============================================================================
1717 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand, 
1718                                                    GEOM::GEOM_List_ptr theWorkingPlane)
1719 {
1720   MESSAGE("GEOM_Superv_i::MakeSketcher");
1721   if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP = 
1722       dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
1723     if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1724     return myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
1725   }
1726   return NULL;
1727 }
1728
1729 //=============================== LocalOperations =============================
1730 //=============================================================================
1731 //  MakeFilletAll:
1732 //=============================================================================
1733 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
1734                                                     CORBA::Double theR)
1735 {
1736   MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
1737   if (CORBA::is_nil(myLocalOp)) getLocalOp();
1738   return myLocalOp->MakeFilletAll(theShape, theR);
1739 }
1740
1741 //=============================================================================
1742 //  MakeFilletEdges:
1743 //=============================================================================
1744 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, 
1745                                                       CORBA::Double theR,
1746                                                       GEOM::GEOM_List_ptr theEdges)
1747 {
1748   MESSAGE("GEOM_Superv_i::MakeFilletEdges");
1749   if (GEOM_List_i<GEOM::ListOfLong>* aListImplE = 
1750       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
1751     if (CORBA::is_nil(myLocalOp)) getLocalOp();
1752     return myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
1753   }
1754   return NULL;
1755 }
1756
1757 //=============================================================================
1758 //  MakeFilletFaces:
1759 //=============================================================================
1760 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, 
1761                                                       CORBA::Double theR,
1762                                                       GEOM::GEOM_List_ptr theFaces)
1763 {
1764   MESSAGE("GEOM_Superv_i::MakeFilletFaces");
1765   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
1766       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
1767     if (CORBA::is_nil(myLocalOp)) getLocalOp();
1768     return myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
1769   }
1770   return NULL;
1771 }
1772
1773 //=============================================================================
1774 //  MakeChamferAll:
1775 //=============================================================================
1776 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
1777 {
1778   MESSAGE("GEOM_Superv_i::MakeChamferAll");
1779   if (CORBA::is_nil(myLocalOp)) getLocalOp();
1780   return myLocalOp->MakeChamferAll(theShape, theD);
1781 }
1782   
1783 //=============================================================================
1784 //  MakeChamferEdge:
1785 //=============================================================================
1786 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
1787                                                       CORBA::Double theD1, CORBA::Double theD2,
1788                                                       CORBA::Long theFace1, CORBA::Long theFace2)
1789 {
1790   MESSAGE("GEOM_Superv_i::MakeChamferEdge");
1791   if (CORBA::is_nil(myLocalOp)) getLocalOp();
1792   return myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
1793 }
1794
1795 //=============================================================================
1796 //  MakeChamferFaces:
1797 //=============================================================================
1798 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
1799                                                        CORBA::Double theD1, CORBA::Double theD2,
1800                                                        GEOM::GEOM_List_ptr theFaces)
1801 {
1802   MESSAGE("GEOM_Superv_i::MakeChamferFaces");
1803   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
1804       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
1805     if (CORBA::is_nil(myLocalOp)) getLocalOp();
1806     return myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
1807   }
1808   return NULL;
1809 }
1810
1811 //=============================================================================
1812 //  MakeArchimede:
1813 //=============================================================================
1814 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
1815                                                     CORBA::Double theWeight,
1816                                                     CORBA::Double theWaterDensity,
1817                                                     CORBA::Double theMeshingDeflection)
1818 {
1819   MESSAGE("GEOM_Superv_i::MakeArchimede");
1820   if (CORBA::is_nil(myLocalOp)) getLocalOp();
1821   return myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
1822 }
1823
1824 //=============================================================================
1825 //  GetSubShapeIndexMakeFilletAll:
1826 //=============================================================================
1827 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
1828                                              GEOM::GEOM_Object_ptr theSubShape)
1829 {
1830   MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
1831   if (CORBA::is_nil(myLocalOp)) getLocalOp();
1832   return myLocalOp->GetSubShapeIndex(theShape, theSubShape);
1833 }
1834
1835 //=============================== GroupOperations =============================
1836 //=============================================================================
1837 //  CreateGroup:
1838 //=============================================================================
1839 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape, 
1840                                                   CORBA::Long theShapeType)
1841 {
1842   MESSAGE("GEOM_Superv_i::CreateGroup");
1843   if (CORBA::is_nil(myGroupOp)) getGroupOp();
1844   return myGroupOp->CreateGroup(theMainShape, theShapeType);
1845 }
1846
1847 //=============================================================================
1848 //  AddObject:
1849 //=============================================================================
1850 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup, 
1851                                CORBA::Long theSubShapeId)
1852 {
1853   MESSAGE("GEOM_Superv_i::AddObject");
1854   if (CORBA::is_nil(myGroupOp)) getGroupOp();
1855   myGroupOp->AddObject(theGroup, theSubShapeId);
1856 }
1857
1858 //=============================================================================
1859 //  RemoveObject:
1860 //=============================================================================
1861 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup, 
1862                                   CORBA::Long theSubShapeId)
1863 {
1864   MESSAGE("GEOM_Superv_i::RemoveObject");
1865   if (CORBA::is_nil(myGroupOp)) getGroupOp();
1866   myGroupOp->RemoveObject(theGroup, theSubShapeId);
1867 }
1868
1869 //=============================================================================
1870 //  GetType:
1871 //=============================================================================
1872 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
1873 {
1874   MESSAGE("GEOM_Superv_i::GetType");
1875   if (CORBA::is_nil(myGroupOp)) getGroupOp();
1876   return myGroupOp->GetType(theGroup);
1877 }
1878
1879 //=============================================================================
1880 //  GetMainShape:
1881 //=============================================================================
1882 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
1883 {
1884   MESSAGE("GEOM_Superv_i::GetMainShape");
1885   if (CORBA::is_nil(myGroupOp)) getGroupOp();
1886   return myGroupOp->GetMainShape(theGroup);
1887 }
1888
1889 //=============================================================================
1890 //  GetObjects:
1891 //=============================================================================
1892 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
1893 {
1894   MESSAGE("GEOM_Superv_i::GetObjects");
1895   if (CORBA::is_nil(myGroupOp)) getGroupOp();
1896
1897   GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
1898   GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
1899   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1900   return aListPtr->_this();
1901 }
1902
1903 //=====================================================================================
1904 // EXPORTED METHODS
1905 //=====================================================================================
1906 extern "C"
1907 {
1908   PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
1909                                                       PortableServer::POA_ptr poa, 
1910                                                       PortableServer::ObjectId * contId,
1911                                                       const char *instanceName, 
1912                                                       const char * interfaceName)
1913   {
1914     GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
1915     myGEOM_Superv_i->register_name("/myGEOM_Superv");
1916     return myGEOM_Superv_i->getId() ;
1917   }
1918 }