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