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