Salome HOME
Update GUI documentation for bugs 16559
[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/ or email : webmaster.salome@opencascade.com
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 && aStudyID > 0) { // mkr : IPAL12128
112         MESSAGE("Warning : given study ID theId="<<theId<<" is wrong and will be replaced by the value "<<aStudyID);
113         myStudyID = aStudyID;
114       }
115       else
116         myStudyID = theId; // mkr : IPAL12128
117     }
118   }
119   
120   if ( isNewStudy(myLastStudyID,myStudyID) ) {
121     if (CORBA::is_nil(myGeomEngine)) setGeomEngine();
122     string anEngine = _orb->object_to_string( myGeomEngine );
123     
124     CORBA::Object_var anObj = name_service->Resolve("/myStudyManager");
125     if ( !CORBA::is_nil(anObj) ) {
126       SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(anObj);
127       if ( !CORBA::is_nil(aStudyManager) ) {
128         _PTR(Study) aDSStudy = ClientFactory::Study(aStudyManager->GetStudyByID(myStudyID));
129         if ( aDSStudy ) {
130           _PTR(SComponent) aSCO = aDSStudy->FindComponent(myGeomEngine->ComponentDataType());
131           if ( aSCO ) {
132             _PTR(StudyBuilder) aBuilder = aDSStudy->NewBuilder();
133             if ( aBuilder ) aBuilder->LoadWith( aSCO, anEngine );
134           }
135         }
136       }
137     }
138   }
139   // mkr : PAL10770 <--
140 }
141
142 //=============================================================================
143 //  CreateListOfGO:
144 //=============================================================================
145 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfGO()
146 {
147   MESSAGE("GEOM_Superv_i::CreateListOfGO()");
148   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>();
149   return aListPtr->_this();
150 }
151
152 //=============================================================================
153 //  AddItemToListOfGO:
154 //=============================================================================
155 void GEOM_Superv_i::AddItemToListOfGO(GEOM::GEOM_List_ptr& theList, 
156                                       GEOM::GEOM_Object_ptr    theObject)
157 {
158   MESSAGE("GEOM_Superv_i::AddItemToListOfGO(...)");
159   if (GEOM_List_i<GEOM::ListOfGO>* aList = 
160       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theList, myPOA).in())) {
161     aList->AddObject(theObject);
162     MESSAGE(" NewLength = "<<aList->GetList().length());
163   }
164 }
165
166 //=============================================================================
167 //  CreateListOfLong:
168 //=============================================================================
169 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfLong()
170 {
171   MESSAGE("GEOM_Superv_i::CreateListOfLong()");
172   GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>();
173   return aListPtr->_this();
174 }
175
176 //=============================================================================
177 //  AddItemToListOfLong:
178 //=============================================================================
179 void GEOM_Superv_i::AddItemToListOfLong(GEOM::GEOM_List_ptr& theList, 
180                                         CORBA::Long theObject)
181 {
182   MESSAGE("GEOM_Superv_i::AddItemToListOfLong(...)");
183   if (GEOM_List_i<GEOM::ListOfLong>* aList = 
184       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theList, myPOA).in())) {
185     aList->AddObject(theObject);
186     MESSAGE(" NewLength = "<<aList->GetList().length());
187   }
188 }
189
190 //=============================================================================
191 //  CreateListOfDouble:
192 //=============================================================================
193 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfDouble()
194 {
195   MESSAGE("GEOM_Superv_i::CreateListOfDouble()");
196   GEOM_List_i<GEOM::ListOfDouble>* aListPtr = new GEOM_List_i<GEOM::ListOfDouble>();
197   return aListPtr->_this();
198 }
199
200 //=============================================================================
201 //  AddItemToListOfDouble:
202 //=============================================================================
203 void GEOM_Superv_i::AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList, 
204                                           CORBA::Double theObject)
205 {
206   MESSAGE("GEOM_Superv_i::AddItemToListOfDouble(...)");
207   if (GEOM_List_i<GEOM::ListOfDouble>* aList = 
208       dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theList, myPOA).in())) {
209     aList->AddObject(theObject);
210     MESSAGE(" NewLength = "<<aList->GetList().length());
211   }
212 }
213
214 //=============================================================================
215 //  getBasicOp:
216 //=============================================================================
217 void GEOM_Superv_i::getBasicOp()
218 {
219   if (CORBA::is_nil(myGeomEngine))
220     setGeomEngine();
221   // get GEOM_IBasicOperations interface
222   if (CORBA::is_nil(myBasicOp) || isNewStudy(myLastStudyID,myStudyID))
223     myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
224 }
225
226 //=============================================================================
227 //  get3DPrimOp:
228 //=============================================================================
229 void GEOM_Superv_i::get3DPrimOp()
230 {
231   if (CORBA::is_nil(myGeomEngine))
232     setGeomEngine();
233   // get GEOM_I3DPrimOperations interface
234   if (CORBA::is_nil(my3DPrimOp) || isNewStudy(myLastStudyID,myStudyID))
235     my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
236 }
237
238 //=============================================================================
239 //  getBoolOp:
240 //=============================================================================
241 void GEOM_Superv_i::getBoolOp()
242 {
243   if (CORBA::is_nil(myGeomEngine))
244     setGeomEngine();
245   // get GEOM_IBooleanOperations interface
246   if (CORBA::is_nil(myBoolOp) || isNewStudy(myLastStudyID,myStudyID))
247     myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
248 }
249
250 //=============================================================================
251 //  getInsOp:
252 //=============================================================================
253 void GEOM_Superv_i::getInsOp()
254 {
255   if (CORBA::is_nil(myGeomEngine))
256     setGeomEngine();
257   // get GEOM_IInsertOperations interface
258   if (CORBA::is_nil(myInsOp) || isNewStudy(myLastStudyID,myStudyID))
259     myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
260 }
261
262 //=============================================================================
263 //  getTransfOp:
264 //=============================================================================
265 void GEOM_Superv_i::getTransfOp()
266 {
267   if (CORBA::is_nil(myGeomEngine))
268     setGeomEngine();
269   // get GEOM_ITransformOperations interface
270   if (CORBA::is_nil(myTransfOp) || isNewStudy(myLastStudyID,myStudyID))
271     myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
272 }
273
274 //=============================================================================
275 //  getShapesOp:
276 //=============================================================================
277 void GEOM_Superv_i::getShapesOp()
278 {
279   if (CORBA::is_nil(myGeomEngine))
280     setGeomEngine();
281   // get GEOM_IShapesOperations interface
282   if (CORBA::is_nil(myShapesOp) || isNewStudy(myLastStudyID,myStudyID))
283     myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
284 }
285
286 //=============================================================================
287 //  getBlocksOp:
288 //=============================================================================
289 void GEOM_Superv_i::getBlocksOp()
290 {
291   if (CORBA::is_nil(myGeomEngine))
292     setGeomEngine();
293   // get GEOM_IBlocksOperations interface
294   if (CORBA::is_nil(myBlocksOp) || isNewStudy(myLastStudyID,myStudyID))
295     myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
296 }
297
298 //=============================================================================
299 //  getCurvesOp:
300 //=============================================================================
301 void GEOM_Superv_i::getCurvesOp()
302 {
303   if (CORBA::is_nil(myGeomEngine))
304     setGeomEngine();
305   // get GEOM_ICurvesOperations interface
306   if (CORBA::is_nil(myCurvesOp) || isNewStudy(myLastStudyID,myStudyID))
307     myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
308 }
309
310 //=============================================================================
311 //  getLocalOp:
312 //=============================================================================
313 void GEOM_Superv_i::getLocalOp()
314 {
315   if (CORBA::is_nil(myGeomEngine))
316     setGeomEngine();
317   // get GEOM_ILocalOperations interface
318   if (CORBA::is_nil(myLocalOp) || isNewStudy(myLastStudyID,myStudyID))
319     myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
320 }
321
322 //=============================================================================
323 //  getGroupOp:
324 //=============================================================================
325 void GEOM_Superv_i::getGroupOp()
326 {
327   if (CORBA::is_nil(myGeomEngine))
328     setGeomEngine();
329   // get GEOM_IGroupOperations interface
330   if (CORBA::is_nil(myGroupOp) || isNewStudy(myLastStudyID,myStudyID))
331     myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
332 }
333
334 //=============================================================================
335 //  GetServant:
336 //=============================================================================
337 PortableServer::ServantBase_var GEOM_Superv_i::GetServant(CORBA::Object_ptr       theObject,
338                                                           PortableServer::POA_ptr thePOA)
339 {
340   if(CORBA::is_nil(theObject))  return NULL;
341   PortableServer::Servant aServant = thePOA->reference_to_servant(theObject);
342   return aServant;
343 }
344
345 //============================================================================
346 // function : Save()
347 // purpose  : save OCAF/Geom document
348 //============================================================================
349 SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
350                                        const char* theURL,
351                                        CORBA::Boolean isMultiFile)
352 {
353   SALOMEDS::TMPFile_var aStreamFile;
354   return aStreamFile._retn();
355 }
356
357 //============================================================================
358 // function : SaveASCII()
359 // purpose  :
360 //============================================================================ 
361 SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
362                                             const char* theURL,
363                                             CORBA::Boolean isMultiFile)
364 {
365   SALOMEDS::TMPFile_var aStreamFile;
366   return aStreamFile._retn();
367 }
368
369 //============================================================================
370 // function : Load()
371 // purpose  :
372 //============================================================================ 
373 CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
374                                    const SALOMEDS::TMPFile& theStream,
375                                    const char* theURL,
376                                    CORBA::Boolean isMultiFile)
377 {
378   return false;
379 }
380
381 //============================================================================
382 // function : LoadASCII()
383 // purpose  :
384 //============================================================================ 
385 CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
386                                         const SALOMEDS::TMPFile& theStream,
387                                         const char* theURL,
388                                         CORBA::Boolean isMultiFile)
389 {
390   return false;
391 }
392
393 //============================================================================
394 // function : Close()
395 // purpose  :
396 //============================================================================
397 void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr theComponent)
398 {
399 }
400
401 //============================================================================
402 // function : ComponentDataType()
403 // purpose  :
404 //============================================================================
405 char* GEOM_Superv_i::ComponentDataType()
406 {
407   return 0;
408 }
409
410 //============================================================================
411 // function : IORToLocalPersistentID()
412 // purpose  :
413 //============================================================================
414 char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
415                                             const char* IORString,
416                                             CORBA::Boolean isMultiFile,
417                                             CORBA::Boolean isASCII)
418 {
419   return 0;
420 }
421
422 //============================================================================
423 // function : LocalPersistentIDToIOR()
424 // purpose  : Create/Load CORBA object from a persistent ref (an entry)
425 //          : Used when a study is loaded
426 //          : The IOR (IORName) of object created is returned
427 //============================================================================
428 char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
429                                             const char* aLocalPersistentID,
430                                             CORBA::Boolean isMultiFile,
431                                             CORBA::Boolean isASCII)
432 {
433   return 0;
434 }
435
436 //============================================================================
437 // function : CanPublishInStudy
438 // purpose  : 
439 //============================================================================
440 CORBA::Boolean GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
441 {
442   if (CORBA::is_nil(myGeomEngine))
443     setGeomEngine();
444   return myGeomEngine->CanPublishInStudy(theIOR);
445 }
446
447 //============================================================================
448 // function : PublishInStudy
449 // purpose  : 
450 //============================================================================
451 SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
452                                                     SALOMEDS::SObject_ptr theSObject,
453                                                     CORBA::Object_ptr theObject,
454                                                     const char* theName) throw (SALOME::SALOME_Exception)
455 {
456   if (CORBA::is_nil(myGeomEngine))
457     setGeomEngine();
458   return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
459 }
460
461 //============================================================================
462 // function : CanCopy()
463 // purpose  :
464 //============================================================================
465 CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr theObject)
466 {
467   return false;
468 }
469
470 //============================================================================
471 // function : CopyFrom()
472 // purpose  :
473 //============================================================================
474 SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID)
475 {
476   SALOMEDS::TMPFile_var aStreamFile;
477   return aStreamFile._retn();
478 }
479
480 //============================================================================
481 // function : CanPaste()
482 // purpose  :
483 //============================================================================
484 CORBA::Boolean GEOM_Superv_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID)
485 {
486   return false;
487 }
488
489 //============================================================================
490 // function : PasteInto()
491 // purpose  :
492 //============================================================================
493 SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& theStream,
494                                                CORBA::Long theObjectID,
495                                                SALOMEDS::SObject_ptr theObject)
496 {
497   SALOMEDS::SObject_var aNewSO;
498   return aNewSO._retn();
499 }
500
501 //================= Primitives Construction : BasicOperations =================
502 //=============================================================================
503 //  MakePointXYZ:
504 //=============================================================================
505 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointXYZ(CORBA::Double theX,
506                                                   CORBA::Double theY,
507                                                   CORBA::Double theZ)
508 {
509   beginService( " GEOM_Superv_i::MakePointXYZ" );
510   MESSAGE("GEOM_Superv_i::MakePointXYZ");
511   getBasicOp();
512   // make vertex and return
513   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointXYZ(theX, theY, theZ);
514   endService( " GEOM_Superv_i::MakePointXYZ" );
515   return anObj;
516 }
517
518 //=============================================================================
519 //  MakePointWithReference:
520 //=============================================================================
521 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
522                                                              CORBA::Double theX, 
523                                                              CORBA::Double theY, 
524                                                              CORBA::Double theZ)
525 {
526   beginService( " GEOM_Superv_i::MakePointWithReference" );
527   MESSAGE("GEOM_Superv_i::MakePointWithReference");
528   getBasicOp();
529   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointWithReference(theReference, theX, theY, theZ);
530   endService( " GEOM_Superv_i::MakePointWithReference" );
531   return anObj;
532 }
533
534 //=============================================================================
535 //  MakePointOnCurve:
536 //=============================================================================
537 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
538                                                        CORBA::Double theParameter)
539 {
540   beginService( " GEOM_Superv_i::MakePointOnCurve" );
541   MESSAGE("GEOM_Superv_i::MakePointOnCurve");
542   getBasicOp();
543   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointOnCurve(theRefCurve, theParameter);
544   endService( " GEOM_Superv_i::MakePointOnCurve" );
545   return anObj;
546 }
547
548 //=============================================================================
549 //  MakeTangentOnCurve:
550 //=============================================================================
551 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
552                                                          CORBA::Double theParameter)
553 {
554   beginService( " GEOM_Superv_i::MakeTangentOnCurve" );
555   MESSAGE("GEOM_Superv_i::MakeTangentOnCurve");
556   getBasicOp();
557   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeTangentOnCurve(theRefCurve, theParameter);
558   endService( " GEOM_Superv_i::MakeTangentOnCurve" );
559   return anObj;
560 }
561
562 //=============================================================================
563 //  MakeVectorDXDYDZ:
564 //=============================================================================
565 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorDXDYDZ (CORBA::Double theDX,
566                                                        CORBA::Double theDY,
567                                                        CORBA::Double theDZ)
568 {
569   beginService( " GEOM_Superv_i::MakeVectorDXDYDZ" );
570   MESSAGE("GEOM_Superv_i::MakeVectorDXDYDZ");
571   getBasicOp();
572   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeVectorDXDYDZ(theDX, theDY, theDZ);
573   endService( " GEOM_Superv_i::MakeVectorDXDYDZ" );
574   return anObj;
575 }
576
577 //=============================================================================
578 //  MakeVectorTwoPnt:
579 //=============================================================================
580 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
581                                                        GEOM::GEOM_Object_ptr thePnt2)
582 {
583   beginService( " GEOM_Superv_i::MakeVectorTwoPnt" );
584   MESSAGE("GEOM_Superv_i::MakeVector");
585   getBasicOp();
586   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeVectorTwoPnt(thePnt1, thePnt2);
587   endService( " GEOM_Superv_i::MakeVectorTwoPnt" );
588   return anObj;
589 }
590
591 //=============================================================================
592 //  MakeLineTwoPnt:
593 //=============================================================================
594 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
595                                                      GEOM::GEOM_Object_ptr thePnt2)
596 {
597   beginService( " GEOM_Superv_i::MakeLineTwoPnt");
598   MESSAGE("GEOM_Superv_i::MakeLineTwoPnt");
599   getBasicOp();
600   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeLineTwoPnt(thePnt1, thePnt2);
601   endService( " GEOM_Superv_i::MakeLineTwoPnt");
602   return anObj;
603 }
604
605 //=============================================================================
606 //  MakePlaneThreePnt:
607 //=============================================================================
608 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
609                                                         GEOM::GEOM_Object_ptr thePnt2,
610                                                         GEOM::GEOM_Object_ptr thePnt3,
611                                                         CORBA::Double theTrimSize)
612 {
613   beginService( " GEOM_Superv_i::MakePlaneThreePnt");
614   MESSAGE("GEOM_Superv_i::MakePlaneThreePnt");
615   getBasicOp();
616   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize);
617   endService( " GEOM_Superv_i::MakePlaneThreePnt");
618   return anObj;
619 }
620
621 //=============================================================================
622 //  MakePlanePntVec:
623 //=============================================================================
624 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
625                                                       GEOM::GEOM_Object_ptr theVec,
626                                                       CORBA::Double theTrimSize)
627
628   beginService( " GEOM_Superv_i::MakePlanePntVec" );
629   MESSAGE("GEOM_Superv_i::MakePlanePntVec");
630   getBasicOp();
631   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlanePntVec(thePnt, theVec, theTrimSize);
632   endService( " GEOM_Superv_i::MakePlanePntVec" );
633   return anObj;
634 }
635
636 //=============================================================================
637 //  MakePlaneFace:
638 //=============================================================================
639 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
640                                                     CORBA::Double theTrimSize)
641 {
642   beginService( " GEOM_Superv_i::MakePlaneFace" );
643   MESSAGE("GEOM_Superv_i::MakePlaneFace");
644   getBasicOp();
645   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlaneFace(theFace, theTrimSize);
646   endService( " GEOM_Superv_i::MakePlaneFace" );
647   return anObj;
648 }
649
650 //=============================================================================
651 //  MakeMarker:
652 //=============================================================================
653 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarker 
654 (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
655  CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
656  CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
657 {
658   beginService( " GEOM_Superv_i::MakeMarker" );
659   MESSAGE("GEOM_Superv_i::MakeMarker");
660   getBasicOp();
661   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeMarker(theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ);
662   endService( " GEOM_Superv_i::MakeMarker" );
663   return anObj;
664 }
665
666 //=============================================================================
667 //  MakeTangentPlaneOnFace:
668 //=============================================================================
669 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTangentPlaneOnFace (GEOM::GEOM_Object_ptr theFace, 
670                                                  CORBA::Double theParameterU,
671                                                  CORBA::Double theParameterV,
672                                                  CORBA::Double theTrimSize)
673 {
674   beginService( " GEOM_Superv_i::MakeTangentPlaneOnFace" );
675   MESSAGE("GEOM_Superv_i::MakeTangentPlaneOnFace");
676   getBasicOp();
677   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeTangentPlaneOnFace(theFace, theParameterU,theParameterV,theTrimSize);
678   endService( " GEOM_Superv_i::MakeTangentPlaneOnFace" );
679   return anObj;
680 }
681
682 //================= Primitives Construction : 3DPrimOperations ================
683 //=============================================================================
684 //  MakeBox:
685 //=============================================================================
686 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBox (CORBA::Double theX1,
687                                               CORBA::Double theY1,
688                                               CORBA::Double theZ1,
689                                               CORBA::Double theX2,
690                                               CORBA::Double theY2,
691                                               CORBA::Double theZ2)
692 {
693   beginService( " GEOM_Superv_i::MakeBox" );
694   MESSAGE("GEOM_Superv_i::MakeBox");
695   getBasicOp();
696   get3DPrimOp();
697   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1),
698                                                           myBasicOp->MakePointXYZ(theX2, theY2, theZ2));
699   endService( " GEOM_Superv_i::MakeBox" );
700   return anObj;
701 }
702
703 //=============================================================================
704 //  MakeBoxDXDYDZ:
705 //=============================================================================
706 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxDXDYDZ (CORBA::Double theDX, 
707                                                     CORBA::Double theDY, 
708                                                     CORBA::Double theDZ)
709 {
710   beginService( " GEOM_Superv_i::MakeBoxDXDYDZ" );
711   MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ");
712   get3DPrimOp();
713   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ);
714   endService( " GEOM_Superv_i::MakeBoxDXDYDZ" );
715   return anObj;
716 }
717
718 //=============================================================================
719 //  MakeBoxTwoPnt:
720 //=============================================================================
721 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1, 
722                                                     GEOM::GEOM_Object_ptr thePnt2)
723 {
724   beginService( " GEOM_Superv_i::MakeBoxTwoPnt" );
725   MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt");
726   get3DPrimOp();
727   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2);
728   endService( " GEOM_Superv_i::MakeBoxTwoPnt" );
729   return anObj;
730 }
731
732 //=============================================================================
733 //  MakeCylinderPntVecRH:
734 //=============================================================================
735 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
736                                                            GEOM::GEOM_Object_ptr theAxis,
737                                                            CORBA::Double theRadius,
738                                                            CORBA::Double theHeight)
739 {
740   beginService( " GEOM_Superv_i::MakeCylinderPntVecRH" );
741   MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH");
742   get3DPrimOp();
743   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight);
744   endService( " GEOM_Superv_i::MakeCylinderPntVecRH" );
745   return anObj;
746 }
747
748 //=============================================================================
749 //  MakeCylinderRH:
750 //=============================================================================
751 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR, 
752                                                      CORBA::Double theH)
753 {
754   beginService( " GEOM_Superv_i::MakeCylinderRH" );
755   MESSAGE("GEOM_Superv_i::MakeCylinderRH");
756   get3DPrimOp();
757   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderRH(theR, theH);
758   endService( " GEOM_Superv_i::MakeCylinderRH" );
759   return anObj; 
760 }
761
762 //=============================================================================
763 //  MakeSphere:
764 //=============================================================================
765 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere  (CORBA::Double theX,
766                                                   CORBA::Double theY,
767                                                   CORBA::Double theZ,
768                                                   CORBA::Double theRadius)
769 {
770   beginService( " GEOM_Superv_i::MakeSphepe" );
771   MESSAGE("GEOM_Superv_i::MakeSphepe");
772   getBasicOp();
773   get3DPrimOp();
774   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
775   endService( " GEOM_Superv_i::MakeSphepe" );
776   return anObj;
777 }
778
779 //=============================================================================
780 //  MakeSphereR:
781 //=============================================================================
782 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
783 {
784   beginService( " GEOM_Superv_i::MakeSphereR" );
785   MESSAGE("GEOM_Superv_i::MakeSphereR");
786   get3DPrimOp();
787   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSphereR(theR);
788   endService( " GEOM_Superv_i::MakeSphereR" );
789   return anObj;
790 }
791
792 //=============================================================================
793 //  MakeSpherePntR:
794 //=============================================================================
795 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt, 
796                                                      CORBA::Double theR)
797 {
798   beginService( " GEOM_Superv_i::MakeSpherePntR" );
799   MESSAGE("GEOM_Superv_i::MakeSpherePntR");
800   get3DPrimOp();
801   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(thePnt, theR);
802   endService( " GEOM_Superv_i::MakeSpherePntR" );
803   return anObj;
804 }
805
806 //=============================================================================
807 //  MakeTorusPntVecRR:
808 //=============================================================================
809 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
810                                                         GEOM::GEOM_Object_ptr theVec,
811                                                         CORBA::Double theRMajor,
812                                                         CORBA::Double theRMinor)
813 {
814   beginService( " GEOM_Superv_i::MakeTorusPntVecRR" );
815   MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
816   get3DPrimOp();
817   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
818   endService( " GEOM_Superv_i::MakeTorusPntVecRR" );
819   return anObj;
820 }
821
822 //=============================================================================
823 //  MakeTorusRR:
824 //=============================================================================
825 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor,
826                                                   CORBA::Double theRMinor)
827 {
828   beginService( " GEOM_Superv_i::MakeTorusRR" );
829   MESSAGE("GEOM_Superv_i::MakeTorusRR");
830   get3DPrimOp();
831   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
832   endService( " GEOM_Superv_i::MakeTorusRR" );
833   return anObj;
834 }
835
836 //=============================================================================
837 //  MakeConePntVecR1R2H:
838 //=============================================================================
839 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
840                                                           GEOM::GEOM_Object_ptr theAxis,
841                                                           CORBA::Double theR1,
842                                                           CORBA::Double theR2,
843                                                           CORBA::Double theHeight)
844 {
845   beginService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
846   MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
847   get3DPrimOp();
848   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
849   endService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
850   return anObj;
851 }
852
853 //=============================================================================
854 //  MakeConeR1R2H:
855 //=============================================================================
856 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1, 
857                                                     CORBA::Double theR2, 
858                                                     CORBA::Double theHeight)
859 {
860   beginService( " GEOM_Superv_i::MakeConeR1R2H" );
861   MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
862   get3DPrimOp();
863   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
864   endService( " GEOM_Superv_i::MakeConeR1R2H" );
865   return anObj;
866 }
867
868 //=============================================================================
869 //  MakePrismVecH:
870 //=============================================================================
871 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
872                                                     GEOM::GEOM_Object_ptr theVec,
873                                                     CORBA::Double         theH)
874 {
875   beginService( " GEOM_Superv_i::MakePrismVecH" );
876   MESSAGE("GEOM_Superv_i::MakePrismVecH");
877   get3DPrimOp();
878   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
879   endService( " GEOM_Superv_i::MakePrismVecH" );
880   return anObj;
881 }
882
883
884 //=============================================================================
885 //  MakePrismTwoPnt:
886 //=============================================================================
887 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
888                                                       GEOM::GEOM_Object_ptr thePoint1,
889                                                       GEOM::GEOM_Object_ptr thePoint2)
890 {
891   beginService( " GEOM_Superv_i::MakePrismTwoPnt" );
892   MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
893   get3DPrimOp();
894   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
895   endService( " GEOM_Superv_i::MakePrismTwoPnt" );
896   return anObj;
897 }
898
899 //=============================================================================
900 //  MakePipe:
901 //=============================================================================
902 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase, 
903                                                GEOM::GEOM_Object_ptr thePath)
904 {
905   beginService( " GEOM_Superv_i::MakePipe" );
906   MESSAGE("GEOM_Superv_i::MakePipe");
907   get3DPrimOp();
908   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipe(theBase, thePath);
909   endService( " GEOM_Superv_i::MakePipe" );
910   return anObj;
911 }
912
913 //=============================================================================
914 //  MakeRevolutionAxisAngle:
915 //=============================================================================
916 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
917                                                               GEOM::GEOM_Object_ptr theAxis,
918                                                               CORBA::Double theAngle)
919 {
920   beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
921   MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
922   get3DPrimOp();
923   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
924   endService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
925   return anObj;
926 }
927
928 //=============================================================================
929 //  MakeFilling:
930 //=============================================================================
931 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
932                                                   CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
933                                                   CORBA::Double theTol2D, CORBA::Double theTol3D,
934                                                   CORBA::Long theNbIter)
935 {
936   beginService( " GEOM_Superv_i::MakeFilling" );
937   MESSAGE("GEOM_Superv_i::MakeFilling");
938   get3DPrimOp();
939   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter);
940   endService( " GEOM_Superv_i::MakeFilling" );
941   return anObj;
942 }
943
944 //============================= BooleanOperations =============================
945 //=============================================================================
946 //  MakeBoolean:
947 //=============================================================================
948 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
949                                                   GEOM::GEOM_Object_ptr theShape2,
950                                                   CORBA::Long theOperation)
951 {
952   beginService( " GEOM_Superv_i::MakeBoolean" );
953   // theOperation indicates the operation to be done:
954   // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
955   MESSAGE("GEOM_Superv_i::MakeBoolean");
956   getBoolOp();
957   GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
958   endService( " GEOM_Superv_i::MakeBoolean" );
959   return anObj;
960 }
961
962 //=============================================================================
963 //  MakeThruSections:
964 //=============================================================================
965 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeThruSections(const GEOM::ListOfGO& theSeqSections,
966                                          CORBA::Boolean theModeSolid,
967                                          CORBA::Double thePreci,
968                                          CORBA::Boolean theRuled)
969 {
970   beginService( " GEOM_Superv_i::MakeThruSections" );
971   MESSAGE("GEOM_Superv_i::MakeThruSections");
972   get3DPrimOp();
973   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeThruSections(theSeqSections, theModeSolid,thePreci,theRuled);
974   endService( " GEOM_Superv_i::MakeThruSections" );
975   return anObj;
976 }
977
978 //=============================================================================
979 //  MakePipe:
980 //=============================================================================
981 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithDifferentSections
982                      (const GEOM::ListOfGO& theBases,
983                       const GEOM::ListOfGO& theLocations,
984                       GEOM::GEOM_Object_ptr thePath,
985                       CORBA::Boolean theWithContact,
986                       CORBA::Boolean theWithCorrections)
987 {
988   beginService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
989   MESSAGE("GEOM_Superv_i::MakePipeWithDifferentSections");
990   get3DPrimOp();
991   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipeWithDifferentSections(theBases,theLocations, thePath,theWithContact,theWithCorrections);
992   endService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
993   return anObj;
994 }
995
996
997 //=============================================================================
998 //  MakePipe:
999 //=============================================================================
1000 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithShellSections
1001                    (const GEOM::ListOfGO& theBases,
1002                     const GEOM::ListOfGO& theSubBases,
1003                     const GEOM::ListOfGO& theLocations,
1004                     GEOM::GEOM_Object_ptr thePath,
1005                     CORBA::Boolean theWithContact,
1006                     CORBA::Boolean theWithCorrections)
1007 {
1008   beginService( " GEOM_Superv_i::MakePipeWithShellSections" );
1009   MESSAGE("GEOM_Superv_i::MakePipeWithShellSections");
1010   get3DPrimOp();
1011   GEOM::GEOM_Object_ptr anObj =
1012     my3DPrimOp->MakePipeWithShellSections(theBases, theSubBases,
1013                                           theLocations, thePath,
1014                                           theWithContact, theWithCorrections);
1015   endService( " GEOM_Superv_i::MakePipeWithShellSections" );
1016   return anObj;
1017 }
1018
1019
1020 //=============================================================================
1021 //  MakePipe:
1022 //=============================================================================
1023 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeShellsWithoutPath
1024                    (const GEOM::ListOfGO& theBases,
1025                     const GEOM::ListOfGO& theLocations)
1026 {
1027   beginService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1028   MESSAGE("GEOM_Superv_i::MakePipeShellsWithoutPath");
1029   get3DPrimOp();
1030   GEOM::GEOM_Object_ptr anObj =
1031     my3DPrimOp->MakePipeShellsWithoutPath(theBases,theLocations);
1032   endService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1033   return anObj;
1034 }
1035
1036
1037 //=============================================================================
1038 //  MakeFuse:
1039 //=============================================================================
1040 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1,
1041                                                GEOM::GEOM_Object_ptr theShape2)
1042 {
1043   beginService( " GEOM_Superv_i::MakeFuse" );
1044   MESSAGE("GEOM_Superv_i::MakeFuse");
1045   getBoolOp();
1046   GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeBoolean(theShape1, theShape2, 3);
1047   endService( " GEOM_Superv_i::MakeFuse" );
1048   return anObj;
1049 }
1050
1051 //=============================================================================
1052 //  MakePartition:
1053 //=============================================================================
1054 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr   theShapes,
1055                                                     GEOM::GEOM_List_ptr   theTools,
1056                                                     GEOM::GEOM_List_ptr   theKeepInside,
1057                                                     GEOM::GEOM_List_ptr   theRemoveInside,
1058                                                     CORBA::Short      theLimit,
1059                                                     CORBA::Boolean    theRemoveWebs,
1060                                                     GEOM::GEOM_List_ptr theMaterials,
1061                                                     CORBA::Short theKeepNonlimitShapes)
1062 {
1063   beginService( " GEOM_Superv_i::MakePartition" );
1064   MESSAGE("GEOM_Superv_i::MakePartition");
1065   GEOM_List_i<GEOM::ListOfGO>* aListImplS = 
1066     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in());
1067   GEOM_List_i<GEOM::ListOfGO>* aListImplT = 
1068     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theTools, myPOA).in());
1069   GEOM_List_i<GEOM::ListOfGO>* aListImplKI = 
1070     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theKeepInside, myPOA).in());
1071   GEOM_List_i<GEOM::ListOfGO>* aListImplRI = 
1072     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theRemoveInside, myPOA).in());
1073   GEOM_List_i<GEOM::ListOfLong>* aListImplM = 
1074     dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theMaterials, myPOA).in());
1075   if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
1076     getBoolOp();
1077     GEOM::GEOM_Object_ptr anObj =
1078       myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(), 
1079                               aListImplKI->GetList(), aListImplRI->GetList(),
1080                               theLimit, theRemoveWebs, aListImplM->GetList(),
1081                               theKeepNonlimitShapes);
1082     endService( " GEOM_Superv_i::MakePartition" );
1083     return anObj;
1084   }
1085   endService( " GEOM_Superv_i::MakePartition" );
1086   return NULL;
1087 }
1088
1089 //=============================================================================
1090 //  MakeHalfPartition:
1091 //=============================================================================
1092 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
1093                                                         GEOM::GEOM_Object_ptr thePlane)
1094 {
1095   beginService( " GEOM_Superv_i::MakeHalfPartition" );
1096   MESSAGE("GEOM_Superv_i::MakeHalfPartition");
1097   getBoolOp();
1098   GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeHalfPartition(theShape, thePlane);
1099   endService( " GEOM_Superv_i::MakeHalfPartition" );
1100   return anObj;
1101 }
1102
1103 //============================== InsertOperations =============================
1104 //=============================================================================
1105 //  MakeCopy:
1106 //=============================================================================
1107 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
1108 {
1109   beginService( " GEOM_Superv_i::MakeCopy" );
1110   MESSAGE("GEOM_Superv_i::MakeCopy");
1111   getInsOp();
1112   GEOM::GEOM_Object_ptr anObj = myInsOp->MakeCopy(theOriginal);
1113   endService( " GEOM_Superv_i::MakeCopy" );
1114   return anObj;
1115 }
1116
1117 //=============================================================================
1118 //  Export:
1119 //=============================================================================
1120 void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject, 
1121                             const char*           theFileName, 
1122                             const char*           theFormatName)
1123 {
1124   beginService( " GEOM_Superv_i::Export" );
1125   MESSAGE("GEOM_Superv_i::Export");
1126   getInsOp();
1127   myInsOp->Export(theObject, theFileName, theFormatName);
1128   endService( " GEOM_Superv_i::Export" );
1129 }
1130
1131 //=============================================================================
1132 //  Import:
1133 //=============================================================================
1134 GEOM::GEOM_Object_ptr GEOM_Superv_i::Import (const char* theFileName, 
1135                                              const char* theFormatName)
1136 {
1137   beginService( " GEOM_Superv_i::Import" );
1138   MESSAGE("GEOM_Superv_i::Import");
1139   getInsOp();
1140   GEOM::GEOM_Object_ptr anObj = myInsOp->Import(theFileName, theFormatName);
1141   endService( " GEOM_Superv_i::Import" );
1142   return anObj;
1143 }
1144
1145 //=============================================================================
1146 //  ImportTranslators:
1147 //=============================================================================
1148 void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
1149                                        GEOM::string_array_out thePatterns)
1150 {
1151   beginService( " GEOM_Superv_i::ImportTranslators" );
1152   MESSAGE("GEOM_Superv_i::ImportTranslators");
1153   getInsOp();
1154   myInsOp->ImportTranslators(theFormats, thePatterns);
1155   endService( " GEOM_Superv_i::ImportTranslators" );
1156 }
1157
1158 //=============================================================================
1159 //  ExportTranslators:
1160 //=============================================================================
1161 void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
1162                                        GEOM::string_array_out thePatterns)
1163 {
1164   beginService( " GEOM_Superv_i::ExportTranslators" );
1165   MESSAGE("GEOM_Superv_i::ExportTranslators");
1166   getInsOp();
1167   myInsOp->ExportTranslators(theFormats, thePatterns);
1168   endService( " GEOM_Superv_i::ExportTranslators" );
1169 }
1170
1171 //============================= TransformOperations ===========================
1172 //=============================================================================
1173 //  TranslateTwoPoints:
1174 //=============================================================================
1175 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
1176                                                          GEOM::GEOM_Object_ptr thePoint1,
1177                                                          GEOM::GEOM_Object_ptr thePoint2)
1178 {
1179   beginService( " GEOM_Superv_i::TranslateTwoPoints" );
1180   MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
1181   getTransfOp();
1182   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
1183   endService( " GEOM_Superv_i::TranslateTwoPoints" );
1184   return anObj;
1185 }
1186
1187 //=============================================================================
1188 //  TranslateTwoPointsCopy:
1189 //=============================================================================
1190 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
1191                                                              GEOM::GEOM_Object_ptr thePoint1,
1192                                                              GEOM::GEOM_Object_ptr thePoint2)
1193 {
1194   beginService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1195   MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
1196   getTransfOp();
1197   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
1198   endService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1199   return anObj;
1200 }
1201
1202 //=============================================================================
1203 //  TranslateDXDYDZ:
1204 //=============================================================================
1205 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
1206                                                       CORBA::Double theDX, 
1207                                                       CORBA::Double theDY, 
1208                                                       CORBA::Double theDZ)
1209 {
1210   beginService( " GEOM_Superv_i::TranslateDXDYDZ" );
1211   MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
1212   getTransfOp();
1213   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
1214   endService( " GEOM_Superv_i::TranslateDXDYDZ" );
1215   return anObj;
1216 }
1217
1218 //=============================================================================
1219 //  TranslateDXDYDZCopy:
1220 //=============================================================================
1221 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
1222                                                           CORBA::Double theDX, 
1223                                                           CORBA::Double theDY, 
1224                                                           CORBA::Double theDZ)
1225 {
1226   beginService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1227   MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
1228   getTransfOp();
1229   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
1230   endService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1231   return anObj;
1232 }
1233
1234 //=============================================================================
1235 //  TranslateVector:
1236 //=============================================================================
1237 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject,
1238                                                       GEOM::GEOM_Object_ptr theVector)
1239 {
1240   beginService( " GEOM_Superv_i::TranslateVector" );
1241   MESSAGE("GEOM_Superv_i::TranslateVector");
1242   getTransfOp();
1243   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVector(theObject, theVector);
1244   endService( " GEOM_Superv_i::TranslateVector" );
1245   return anObj;
1246 }
1247
1248 //=============================================================================
1249 //  TranslateVectorCopy:
1250 //=============================================================================
1251 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
1252                                                           GEOM::GEOM_Object_ptr theVector)
1253 {
1254   beginService( " GEOM_Superv_i::TranslateVectorCopy" );
1255   MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
1256   getTransfOp();
1257   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorCopy(theObject, theVector);
1258   endService( " GEOM_Superv_i::TranslateVectorCopy" );
1259   return anObj;
1260 }
1261
1262 //=============================================================================
1263 //  MultiTranslate1D:
1264 //=============================================================================
1265 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
1266                                                        GEOM::GEOM_Object_ptr theVector,
1267                                                        CORBA::Double theStep,
1268                                                        CORBA::Long theNbTimes)
1269 {
1270   beginService( " GEOM_Superv_i::MultiTranslate1D" );
1271   MESSAGE("GEOM_Superv_i::MultiTranslate1D");
1272   getTransfOp();
1273   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
1274   endService( " GEOM_Superv_i::MultiTranslate1D" );
1275   return anObj;
1276 }
1277
1278 //=============================================================================
1279 //  MultiTranslate2D:
1280 //=============================================================================
1281 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
1282                                                        GEOM::GEOM_Object_ptr theVector1,
1283                                                        CORBA::Double theStep1,
1284                                                        CORBA::Long theNbTimes1,
1285                                                        GEOM::GEOM_Object_ptr theVector2,
1286                                                        CORBA::Double theStep2,
1287                                                        CORBA::Long theNbTimes2)
1288 {
1289   beginService( " GEOM_Superv_i::MultiTranslate2D" );
1290   MESSAGE("GEOM_Superv_i::MultiTranslate2D");
1291   getTransfOp();
1292   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
1293                                                              theVector2, theStep2, theNbTimes2);
1294   endService( " GEOM_Superv_i::MultiTranslate2D" );
1295   return anObj;
1296 }
1297
1298 //=============================================================================
1299 //  Rotate:
1300 //=============================================================================
1301 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
1302                                              GEOM::GEOM_Object_ptr theAxis,
1303                                              CORBA::Double theAngle)
1304 {
1305   beginService( " GEOM_Superv_i::Rotate" );
1306   MESSAGE("GEOM_Superv_i::Rotate");
1307   getTransfOp();
1308   GEOM::GEOM_Object_ptr anObj = myTransfOp->Rotate(theObject, theAxis, theAngle);
1309   endService( " GEOM_Superv_i::Rotate" );
1310   return anObj;
1311 }
1312
1313 //=============================================================================
1314 //  RotateCopy:
1315 //=============================================================================
1316 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
1317                                                  GEOM::GEOM_Object_ptr theAxis,
1318                                                  CORBA::Double theAngle)
1319 {
1320   beginService( " GEOM_Superv_i::RotateCopy" );
1321   MESSAGE("GEOM_Superv_i::RotateCopy");
1322   getTransfOp();
1323   GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateCopy(theObject, theAxis, theAngle);
1324   endService( " GEOM_Superv_i::RotateCopy" );
1325   return anObj;
1326 }
1327 //=============================================================================
1328 //  RotateThreePoints:
1329 //=============================================================================
1330 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
1331                                                         GEOM::GEOM_Object_ptr theCentPoint,
1332                                                         GEOM::GEOM_Object_ptr thePoint1,
1333                                                         GEOM::GEOM_Object_ptr thePoint2)
1334 {
1335   beginService( " GEOM_Superv_i::RotateThreePoints" );
1336   MESSAGE("GEOM_Superv_i::RotateThreePoints");
1337   getTransfOp();
1338   GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2);
1339   endService( " GEOM_Superv_i::RotateThreePoints" );
1340   return anObj;
1341 }
1342
1343 //=============================================================================
1344 //  RotateThreePointsCopy:
1345 //=============================================================================
1346 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
1347                                                             GEOM::GEOM_Object_ptr theCentPoint,
1348                                                             GEOM::GEOM_Object_ptr thePoint1,
1349                                                             GEOM::GEOM_Object_ptr thePoint2)
1350 {
1351   beginService( " GEOM_Superv_i::RotateThreePointsCopy" );
1352   MESSAGE("GEOM_Superv_i::RotateThreePointsCopy");
1353   getTransfOp();
1354   GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2);
1355   endService( " GEOM_Superv_i::RotateThreePointsCopy" );
1356   return anObj;
1357 }
1358
1359 //=============================================================================
1360 //  MultiRotate1D:
1361 //=============================================================================
1362 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1363                                                     GEOM::GEOM_Object_ptr theAxis,
1364                                                     CORBA::Long theNbTimes)
1365 {
1366   beginService( " GEOM_Superv_i::MultiRotate1D" );
1367   MESSAGE("GEOM_Superv_i::MultiRotate1D");
1368   getTransfOp();
1369   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
1370   endService( " GEOM_Superv_i::MultiRotate1D" );
1371   return anObj;
1372 }
1373
1374 //=============================================================================
1375 //  MultiRotate2D:
1376 //=============================================================================
1377 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1378                                                     GEOM::GEOM_Object_ptr theAxis,
1379                                                     CORBA::Double theAngle,
1380                                                     CORBA::Long theNbTimes1,
1381                                                     CORBA::Double theStep,
1382                                                     CORBA::Long theNbTimes2)
1383 {
1384   beginService( " GEOM_Superv_i::MultiRotate2D" );
1385   MESSAGE("GEOM_Superv_i::MultiRotate2D");
1386   getTransfOp();
1387   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
1388   endService( " GEOM_Superv_i::MultiRotate2D" );
1389   return anObj;
1390 }
1391
1392 //=============================================================================
1393 //  MirrorPlane:
1394 //=============================================================================
1395 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject, 
1396                                                   GEOM::GEOM_Object_ptr thePlane)
1397 {
1398   beginService( " GEOM_Superv_i::MirrorPlane" );
1399   MESSAGE("GEOM_Superv_i::MirrorPlane");
1400   getTransfOp();
1401   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlane(theObject, thePlane);
1402   endService( " GEOM_Superv_i::MirrorPlane" );
1403   return anObj;
1404 }
1405
1406 //=============================================================================
1407 //  MirrorPlaneCopy:
1408 //=============================================================================
1409 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject, 
1410                                                       GEOM::GEOM_Object_ptr thePlane)
1411 {
1412   beginService( " GEOM_Superv_i::MirrorPlaneCopy" );
1413   MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
1414   getTransfOp();
1415   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlaneCopy(theObject, thePlane);
1416   endService( " GEOM_Superv_i::MirrorPlaneCopy" );
1417   return anObj;
1418 }
1419
1420 //=============================================================================
1421 //  MirrorAxis:
1422 //=============================================================================
1423 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject, 
1424                                                  GEOM::GEOM_Object_ptr theAxis)
1425 {
1426   beginService( " GEOM_Superv_i::MirrorAxis" );
1427   MESSAGE("GEOM_Superv_i::MirrorAxis");
1428   getTransfOp();
1429   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxis(theObject, theAxis);
1430   endService( " GEOM_Superv_i::MirrorAxis" );
1431   return anObj;
1432 }
1433
1434 //=============================================================================
1435 //  MirrorAxisCopy:
1436 //=============================================================================
1437 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject, 
1438                                                      GEOM::GEOM_Object_ptr theAxis)
1439 {
1440   beginService( " GEOM_Superv_i::MirrorAxisCopy" );
1441   MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
1442   getTransfOp();
1443   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxisCopy(theObject, theAxis);
1444   endService( " GEOM_Superv_i::MirrorAxisCopy" );
1445   return anObj;
1446 }
1447
1448 //=============================================================================
1449 //  MirrorPoint:
1450 //=============================================================================
1451 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject, 
1452                                                   GEOM::GEOM_Object_ptr thePoint)
1453 {
1454   beginService( " GEOM_Superv_i::MirrorPoint" );
1455   MESSAGE("GEOM_Superv_i::MirrorPoint");
1456   getTransfOp();
1457   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPoint(theObject, thePoint);
1458   endService( " GEOM_Superv_i::MirrorPoint" );
1459   return anObj;
1460 }
1461
1462 //=============================================================================
1463 //  MirrorPointCopy:
1464 //=============================================================================
1465 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject, 
1466                                                       GEOM::GEOM_Object_ptr thePoint)
1467 {
1468   beginService( " GEOM_Superv_i::MirrorPoint" );
1469   MESSAGE("GEOM_Superv_i::MirrorPointCopy");
1470   getTransfOp();
1471   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPointCopy(theObject, thePoint);
1472   endService( " GEOM_Superv_i::MirrorPoint" );
1473   return anObj;
1474 }
1475
1476 //=============================================================================
1477 //  OffsetShape:
1478 //=============================================================================
1479 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject, 
1480                                                   CORBA::Double theOffset)
1481 {
1482   beginService( " GEOM_Superv_i::OffsetShape" );
1483   MESSAGE("GEOM_Superv_i::OffsetShape");
1484   getTransfOp();
1485   GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset);
1486   endService( " GEOM_Superv_i::OffsetShape" );
1487   return anObj;
1488 }
1489
1490 //=============================================================================
1491 //  OffsetShapeCopy:
1492 //=============================================================================
1493 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject, 
1494                                                       CORBA::Double theOffset)
1495 {
1496   beginService( " GEOM_Superv_i::OffsetShapeCopy" );
1497   MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1498   getTransfOp();
1499   GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset);
1500   endService( " GEOM_Superv_i::OffsetShapeCopy" );
1501   return anObj;
1502 }
1503
1504 //=============================================================================
1505 //  ScaleShape:
1506 //=============================================================================
1507 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject, 
1508                                                  GEOM::GEOM_Object_ptr thePoint,
1509                                                  CORBA::Double theFactor)
1510 {
1511   beginService( " GEOM_Superv_i::ScaleShape" );
1512   MESSAGE("GEOM_Superv_i::ScaleShape");
1513   getTransfOp();
1514   GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShape(theObject, thePoint, theFactor);
1515   endService( " GEOM_Superv_i::ScaleShape" );
1516   return anObj;
1517 }
1518
1519 //=============================================================================
1520 //  ScaleShapeCopy:
1521 //=============================================================================
1522 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject, 
1523                                                      GEOM::GEOM_Object_ptr thePoint,
1524                                                      CORBA::Double theFactor)
1525 {
1526   beginService( " GEOM_Superv_i::ScaleShapeCopy" );
1527   MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
1528   getTransfOp();
1529   GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
1530   endService( " GEOM_Superv_i::ScaleShapeCopy" );
1531   return anObj;
1532 }
1533
1534 //=============================================================================
1535 //  PositionShape:
1536 //=============================================================================
1537 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
1538                                                     GEOM::GEOM_Object_ptr theStartLCS,
1539                                                     GEOM::GEOM_Object_ptr theEndLCS)
1540 {
1541   beginService( " GEOM_Superv_i::PositionShape" );
1542   MESSAGE("GEOM_Superv_i::PositionShape");
1543   getTransfOp();
1544   GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
1545   endService( " GEOM_Superv_i::PositionShape" );
1546   return anObj;
1547 }
1548
1549 //=============================================================================
1550 //  PositionShapeCopy:
1551 //=============================================================================
1552 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
1553                                                         GEOM::GEOM_Object_ptr theStartLCS,
1554                                                         GEOM::GEOM_Object_ptr theEndLCS)
1555 {
1556   beginService( " GEOM_Superv_i::PositionShapeCopy" );
1557   MESSAGE("GEOM_Superv_i::PositionShapeCopy");
1558   getTransfOp();
1559   GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
1560   endService( " GEOM_Superv_i::PositionShapeCopy" );
1561   return anObj;
1562 }
1563
1564 //=============================== ShapesOperations ============================
1565 //=============================================================================
1566 //  Make:
1567 //=============================================================================
1568 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
1569                                                GEOM::GEOM_Object_ptr thePnt2)
1570 {
1571   beginService( " GEOM_Superv_i::MakeEdge" );
1572   MESSAGE("GEOM_Superv_i::MakeEdge");
1573   getShapesOp();
1574   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeEdge(thePnt1, thePnt2);
1575   endService( " GEOM_Superv_i::MakeEdge" );
1576   return anObj;
1577 }
1578
1579 //=============================================================================
1580 //  MakeWire:
1581 //=============================================================================
1582 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires)
1583 {
1584   beginService( " GEOM_Superv_i::MakeWire" );
1585   MESSAGE("GEOM_Superv_i::MakeWire");
1586   if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW = 
1587       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
1588     getShapesOp();
1589     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeWire(aListImplEW->GetList());
1590     endService( " GEOM_Superv_i::MakeWire" );
1591     return anObj;
1592   }
1593   endService( " GEOM_Superv_i::MakeWire" );
1594   return NULL;
1595 }
1596
1597 //=============================================================================
1598 //  MakeFace:
1599 //=============================================================================
1600 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
1601                                                CORBA::Boolean isPlanarWanted)
1602 {
1603   beginService( " GEOM_Superv_i::MakeFace" );
1604   MESSAGE("GEOM_Superv_i::MakeFace");
1605   getShapesOp();
1606   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFace(theWire, isPlanarWanted);
1607   endService( " GEOM_Superv_i::MakeFace" );
1608   return anObj;
1609 }
1610
1611 //=============================================================================
1612 //  MakeFaceWires:
1613 //=============================================================================
1614 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires,
1615                                                     CORBA::Boolean isPlanarWanted)
1616 {
1617   beginService( " GEOM_Superv_i::MakeFaceWires" );
1618   MESSAGE("GEOM_Superv_i::MakeFaceWires");
1619   if (GEOM_List_i<GEOM::ListOfGO>* aListImplW = 
1620       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
1621     getShapesOp();
1622     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
1623     endService( " GEOM_Superv_i::MakeFaceWires" );
1624     return anObj;
1625   }
1626   endService( " GEOM_Superv_i::MakeFaceWires" );
1627   return NULL;
1628 }
1629
1630 //=============================================================================
1631 //  MakeShell:
1632 //=============================================================================
1633 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells)
1634 {
1635   beginService( " GEOM_Superv_i::MakeShell" );
1636   MESSAGE("GEOM_Superv_i::MakeShell");
1637   if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS = 
1638       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
1639     getShapesOp();
1640     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeShell(aListImplFS->GetList());
1641     endService( " GEOM_Superv_i::MakeShell" );
1642     return anObj;
1643   }
1644   endService( " GEOM_Superv_i::MakeShell" );
1645   return NULL;
1646 }
1647
1648 //=============================================================================
1649 //  MakeSolidShell:
1650 //=============================================================================
1651 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
1652 {
1653   beginService( " GEOM_Superv_i::MakeSolidShell" );
1654   MESSAGE("GEOM_Superv_i::MakeSolidShell");
1655   getShapesOp();
1656   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShell(theShell);
1657   endService( " GEOM_Superv_i::MakeSolidShell" );
1658   return anObj;
1659 }
1660
1661 //=============================================================================
1662 //  MakeSolidShells:
1663 //=============================================================================
1664 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells)
1665 {
1666   beginService( " GEOM_Superv_i::MakeSolidShells" );
1667   MESSAGE("GEOM_Superv_i::MakeSolidShells");
1668   if (GEOM_List_i<GEOM::ListOfGO>* aListImplS = 
1669       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
1670     getShapesOp();
1671     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShells(aListImplS->GetList());
1672     endService( " GEOM_Superv_i::MakeSolidShells" );
1673     return anObj;
1674   }
1675   endService( " GEOM_Superv_i::MakeSolidShells" );
1676   return NULL;
1677 }
1678
1679 //=============================================================================
1680 //  MakeCompound:
1681 //=============================================================================
1682 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes)
1683 {
1684   beginService( " GEOM_Superv_i::MakeCompound" );
1685   MESSAGE("GEOM_Superv_i::MakeCompound");
1686   if (GEOM_List_i<GEOM::ListOfGO>* aListImpl = 
1687       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
1688     getShapesOp();
1689     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeCompound(aListImpl->GetList());
1690     endService( " GEOM_Superv_i::MakeCompound" );
1691     return anObj;
1692   }
1693   endService( " GEOM_Superv_i::MakeCompound" );
1694   return NULL;
1695 }
1696
1697 //=============================================================================
1698 //  MakeGlueFaces:
1699 //=============================================================================
1700 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
1701                                                     CORBA::Double   theTolerance,
1702                                                     CORBA::Boolean doKeepNonSolids)
1703 {
1704   beginService( " GEOM_Superv_i::MakeGlueFaces" );
1705   MESSAGE("GEOM_Superv_i::MakeGlueFaces");
1706   getShapesOp();
1707   GEOM::GEOM_Object_ptr anObj =
1708     myShapesOp->MakeGlueFaces(theShape, theTolerance, doKeepNonSolids);
1709   endService( " GEOM_Superv_i::MakeGlueFaces" );
1710   return anObj;
1711 }
1712
1713 //=============================================================================
1714 //  GetGlueFaces:
1715 //=============================================================================
1716 GEOM::GEOM_List_ptr GEOM_Superv_i::GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
1717                                                  CORBA::Double theTolerance)
1718 {
1719   beginService( " GEOM_Superv_i::GetGlueFaces" );
1720   MESSAGE("GEOM_Superv_i::GetGlueFaces");
1721   getShapesOp();
1722   GEOM::ListOfGO* aList = myShapesOp->GetGlueFaces(theShape, theTolerance);
1723   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1724   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1725   endService( " GEOM_Superv_i::GetGlueFaces" );
1726   return aListPtr->_this();
1727 }
1728
1729 //=============================================================================
1730 //  MakeGlueFacesByList:
1731 //=============================================================================
1732 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
1733                                                           CORBA::Double theTolerance,
1734                                                           const GEOM::ListOfGO& theFaces,
1735                                                           CORBA::Boolean doKeepNonSolids)
1736 {
1737   beginService( " GEOM_Superv_i::MakeGlueFacesByList" );
1738   MESSAGE("GEOM_Superv_i::MakeGlueFacesByList");
1739   getShapesOp();
1740   GEOM::GEOM_Object_ptr anObj =
1741     myShapesOp->MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids);
1742   endService( " GEOM_Superv_i::MakeGlueFacesByList" );
1743   return anObj;
1744 }
1745
1746 //=============================================================================
1747 //  MakeExplode:
1748 //=============================================================================
1749 GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
1750                                                     CORBA::Long theShapeType,
1751                                                     CORBA::Boolean isSorted)
1752 {
1753   beginService( " GEOM_Superv_i::MakeExplode" );
1754   MESSAGE("GEOM_Superv_i::MakeExplode");
1755   getShapesOp();
1756
1757   GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
1758   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1759   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1760   endService( " GEOM_Superv_i::MakeExplode" );
1761   return aListPtr->_this();
1762 }
1763
1764 //=============================================================================
1765 //  NumberOfFaces:
1766 //=============================================================================
1767 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
1768 {
1769   beginService( " GEOM_Superv_i::NumberOfFaces" );
1770   MESSAGE("GEOM_Superv_i::NumberOfFaces");
1771   getShapesOp();
1772   CORBA::Long aRes = myShapesOp->NumberOfFaces(theShape);
1773   endService( " GEOM_Superv_i::NumberOfFaces" );
1774   return aRes;
1775 }
1776
1777 //=============================================================================
1778 //  NumberOfEdges:
1779 //=============================================================================
1780 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
1781 {
1782   beginService( " GEOM_Superv_i::NumberOfEdges" );
1783   MESSAGE("GEOM_Superv_i::NumberOfEdges");
1784   getShapesOp();
1785   CORBA::Long aRes = myShapesOp->NumberOfEdges(theShape);
1786   endService( " GEOM_Superv_i::NumberOfEdges" );
1787   return aRes;
1788 }
1789
1790 //=============================================================================
1791 //  ChangeOrientation:
1792 //=============================================================================
1793 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
1794 {
1795   beginService( " GEOM_Superv_i::ChangeOrientation" );
1796   MESSAGE("GEOM_Superv_i::ChangeOrientation");
1797   getShapesOp();
1798   GEOM::GEOM_Object_ptr anObj = myShapesOp->ChangeOrientation(theShape);
1799   endService( " GEOM_Superv_i::ChangeOrientation" );
1800   return anObj;
1801 }
1802
1803
1804 //=============================== BlocksOperations ============================
1805 //=============================================================================
1806 //  MakeQuad4Vertices:
1807 //=============================================================================
1808 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
1809                                                         GEOM::GEOM_Object_ptr thePnt2,
1810                                                         GEOM::GEOM_Object_ptr thePnt3,
1811                                                         GEOM::GEOM_Object_ptr thePnt4)
1812 {
1813   beginService( " GEOM_Superv_i::MakeQuad4Vertices" );
1814   MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
1815   getBlocksOp();
1816   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
1817   endService( " GEOM_Superv_i::MakeQuad4Vertices" );
1818   return anObj;
1819 }
1820
1821 //=============================================================================
1822 //  MakeQuad:
1823 //=============================================================================
1824 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
1825                                                GEOM::GEOM_Object_ptr theEdge2,
1826                                                GEOM::GEOM_Object_ptr theEdge3,
1827                                                GEOM::GEOM_Object_ptr theEdge4)
1828 {
1829   beginService( " GEOM_Superv_i::MakeQuad" );
1830   MESSAGE("GEOM_Superv_i::MakeQuad");
1831   getBlocksOp();
1832   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
1833   endService( " GEOM_Superv_i::MakeQuad" );
1834   return anObj;
1835 }
1836
1837 //=============================================================================
1838 //  MakeQuad2Edges:
1839 //=============================================================================
1840 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
1841                                                      GEOM::GEOM_Object_ptr theEdge2)
1842 {
1843   beginService( " GEOM_Superv_i::MakeQuad2Edges" );
1844   MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
1845   getBlocksOp();
1846   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
1847   endService( " GEOM_Superv_i::MakeQuad2Edges" );
1848   return anObj;
1849 }
1850
1851 //=============================================================================
1852 //  MakeHexa:
1853 //=============================================================================
1854 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
1855                                                GEOM::GEOM_Object_ptr theFace2,
1856                                                GEOM::GEOM_Object_ptr theFace3,
1857                                                GEOM::GEOM_Object_ptr theFace4,
1858                                                GEOM::GEOM_Object_ptr theFace5,
1859                                                GEOM::GEOM_Object_ptr theFace6)
1860 {
1861   beginService( " GEOM_Superv_i::MakeHexa" );
1862   MESSAGE("GEOM_Superv_i::MakeHexa");
1863   getBlocksOp();
1864   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
1865   endService( " GEOM_Superv_i::MakeHexa" );
1866   return anObj;
1867 }
1868
1869 //=============================================================================
1870 //  MakeHexa2Faces:
1871 //=============================================================================
1872 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
1873                                                      GEOM::GEOM_Object_ptr theFace2)
1874 {
1875   beginService( " GEOM_Superv_i::MakeHexa2Faces" );
1876   MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
1877   getBlocksOp();
1878   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
1879   endService( " GEOM_Superv_i::MakeHexa2Faces" );
1880   return anObj;
1881 }
1882
1883 //=============================================================================
1884 //  GetPoint:
1885 //=============================================================================
1886 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
1887                                                CORBA::Double   theX,
1888                                                CORBA::Double   theY,
1889                                                CORBA::Double   theZ,
1890                                                CORBA::Double   theEpsilon)
1891 {
1892   beginService( " GEOM_Superv_i::GetPoint" );
1893   MESSAGE("GEOM_Superv_i::GetPoint");
1894   getBlocksOp();
1895   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
1896   endService( " GEOM_Superv_i::GetPoint" );
1897   return anObj;
1898 }
1899
1900 //=============================================================================
1901 //  GetEdge:
1902 //=============================================================================
1903 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
1904                                               GEOM::GEOM_Object_ptr thePoint1,
1905                                               GEOM::GEOM_Object_ptr thePoint2)
1906 {
1907   beginService( " GEOM_Superv_i::GetEdge" );
1908   MESSAGE("GEOM_Superv_i::GetEdge");
1909   getBlocksOp();
1910   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
1911   endService( " GEOM_Superv_i::GetEdge" );
1912   return anObj;
1913 }
1914
1915 //=============================================================================
1916 //  GetEdgeNearPoint:
1917 //=============================================================================
1918 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
1919                                                        GEOM::GEOM_Object_ptr thePoint)
1920 {
1921   beginService( " GEOM_Superv_i::GetEdgeNearPoint" );
1922   MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
1923   getBlocksOp();
1924   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
1925   endService( " GEOM_Superv_i::GetEdgeNearPoint" );
1926   return anObj;
1927 }
1928
1929 //=============================================================================
1930 //  GetFaceByPoints:
1931 //=============================================================================
1932 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
1933                                                       GEOM::GEOM_Object_ptr thePoint1,
1934                                                       GEOM::GEOM_Object_ptr thePoint2,
1935                                                       GEOM::GEOM_Object_ptr thePoint3,
1936                                                       GEOM::GEOM_Object_ptr thePoint4)
1937 {
1938   beginService( " GEOM_Superv_i::GetFaceByPoints" );
1939   MESSAGE("GEOM_Superv_i::GetFaceByPoints");
1940   getBlocksOp();
1941   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
1942   endService( " GEOM_Superv_i::GetFaceByPoints" );
1943   return anObj;
1944 }
1945
1946 //=============================================================================
1947 //  GetFaceByEdges:
1948 //=============================================================================
1949 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
1950                                                      GEOM::GEOM_Object_ptr theEdge1,
1951                                                      GEOM::GEOM_Object_ptr theEdge2)
1952 {
1953   beginService( " GEOM_Superv_i::GetFaceByEdges" );
1954   MESSAGE("GEOM_Superv_i::GetFaceByEdges");
1955   getBlocksOp();
1956   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
1957   endService( " GEOM_Superv_i::GetFaceByEdges" );
1958   return anObj;
1959 }
1960
1961 //=============================================================================
1962 //  GetOppositeFace:
1963 //=============================================================================
1964 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
1965                                                       GEOM::GEOM_Object_ptr theFace)
1966 {
1967   beginService( " GEOM_Superv_i::GetOppositeFace" );
1968   MESSAGE("GEOM_Superv_i::GetOppositeFace");
1969   getBlocksOp();
1970   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetOppositeFace(theBlock, theFace);
1971   endService( " GEOM_Superv_i::GetOppositeFace" );
1972   return anObj;
1973 }
1974
1975 //=============================================================================
1976 //  GetFaceNearPoint:
1977 //=============================================================================
1978 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
1979                                                        GEOM::GEOM_Object_ptr thePoint)
1980 {
1981   beginService( " GEOM_Superv_i::GetFaceNearPoint" );
1982   MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
1983   getBlocksOp();
1984   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceNearPoint(theShape, thePoint);
1985   endService( " GEOM_Superv_i::GetFaceNearPoint" );
1986   return anObj;
1987 }
1988
1989 //=============================================================================
1990 //  GetFaceByNormale:
1991 //=============================================================================
1992 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
1993                                                        GEOM::GEOM_Object_ptr theVector)
1994 {
1995   beginService( " GEOM_Superv_i::GetFaceByNormale" );
1996   MESSAGE("GEOM_Superv_i::GetFaceByNormale");
1997   getBlocksOp();
1998   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByNormale(theBlock, theVector);
1999   endService( " GEOM_Superv_i::GetFaceByNormale" );
2000   return anObj;
2001 }
2002
2003 //=============================================================================
2004 //  IsCompoundOfBlocks:
2005 //=============================================================================
2006 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2007                                                   CORBA::Long     theMinNbFaces,
2008                                                   CORBA::Long     theMaxNbFaces,
2009                                                   CORBA::Long&          theNbBlocks)
2010 {
2011   beginService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2012   MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
2013   getBlocksOp();
2014   CORBA::Boolean aRes = myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
2015   endService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2016   return aRes;
2017 }
2018
2019 //=============================================================================
2020 //  CheckCompoundOfBlocks:
2021 //=============================================================================
2022 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks 
2023 (GEOM::GEOM_Object_ptr theCompound,
2024  GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
2025 {
2026   beginService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2027   MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
2028   getBlocksOp();
2029   CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
2030   endService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2031   return aRes;
2032 }
2033
2034 //=============================================================================
2035 //  PrintBCErrors:
2036 //=============================================================================
2037 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
2038                                     const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
2039 {
2040   beginService( " GEOM_Superv_i::PrintBCErrors" );
2041   MESSAGE("GEOM_Superv_i::PrintBCErrors");
2042   getBlocksOp();
2043   char* anErrors = myBlocksOp->PrintBCErrors(theCompound, theErrors);
2044   endService( " GEOM_Superv_i::PrintBCErrors" );
2045   return anErrors;
2046 }
2047
2048 //=============================================================================
2049 //  ExplodeCompoundOfBlocks:
2050 //=============================================================================
2051 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2052                                                                 CORBA::Long     theMinNbFaces,
2053                                                                 CORBA::Long     theMaxNbFaces)
2054 {
2055   beginService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2056   MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
2057   getBlocksOp();
2058   GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
2059   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2060   endService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2061   return aListPtr->_this();
2062 }
2063
2064 //=============================================================================
2065 //  GetBlockNearPoint:
2066 //=============================================================================
2067 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
2068                                                         GEOM::GEOM_Object_ptr thePoint)
2069 {
2070   beginService( " GEOM_Superv_i::GetBlockNearPoint" );
2071   MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
2072   getBlocksOp();
2073   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
2074   endService( " GEOM_Superv_i::GetBlockNearPoint" );
2075   return anObj;
2076 }
2077
2078 //=============================================================================
2079 //  GetBlockByParts:
2080 //=============================================================================
2081 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
2082                                                       GEOM::GEOM_List_ptr theParts)
2083 {
2084   beginService( " GEOM_Superv_i::GetBlockByParts" );
2085   MESSAGE("GEOM_Superv_i::GetBlockByParts");
2086   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2087       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2088     getBlocksOp();
2089     GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
2090     endService( " GEOM_Superv_i::GetBlockByParts" );
2091     return anObj;
2092   }
2093   endService( " GEOM_Superv_i::GetBlockByParts" );
2094   return NULL;
2095 }
2096
2097 //=============================================================================
2098 //  GetBlocksByParts:
2099 //=============================================================================
2100 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
2101                                                          GEOM::GEOM_List_ptr theParts)
2102 {
2103   beginService( " GEOM_Superv_i::GetBlocksByParts" );
2104   MESSAGE("GEOM_Superv_i::GetBlocksByParts");
2105   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2106       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2107     getBlocksOp();
2108     
2109     GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
2110     GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2111     endService( " GEOM_Superv_i::GetBlocksByParts" );
2112     return aListPtr->_this();
2113   }
2114   endService( " GEOM_Superv_i::GetBlocksByParts" );
2115   return NULL;
2116 }
2117
2118 //=============================================================================
2119 //  MakeMultiTransformation1D:
2120 //=============================================================================
2121 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
2122                                                                 CORBA::Long     theDirFace1,
2123                                                                 CORBA::Long     theDirFace2,
2124                                                                 CORBA::Long     theNbTimes)
2125 {
2126   beginService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2127   MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
2128   getBlocksOp();
2129   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
2130   endService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2131   return anObj;
2132 }
2133
2134 //=============================================================================
2135 //  MakeMultiTransformation2D:
2136 //=============================================================================
2137 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D 
2138 (GEOM::GEOM_Object_ptr theBlock,
2139  CORBA::Long     theDirFace1U,
2140  CORBA::Long     theDirFace2U,
2141  CORBA::Long     theNbTimesU,
2142  CORBA::Long     theDirFace1V,
2143  CORBA::Long     theDirFace2V,
2144  CORBA::Long     theNbTimesV)
2145 {
2146   beginService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2147   MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
2148   getBlocksOp();
2149   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation2D(theBlock, 
2150                                                                       theDirFace1U, theDirFace2U, theNbTimesU,
2151                                                                       theDirFace1V, theDirFace2V, theNbTimesV);
2152   endService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2153   return anObj;
2154 }
2155
2156 //=============================== CurvesOperations ============================
2157 //=============================================================================
2158 //  MakeCirclePntVecR:
2159 //=============================================================================
2160 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
2161                                                         GEOM::GEOM_Object_ptr theVector,
2162                                                         CORBA::Double theR)
2163 {
2164   beginService( " GEOM_Superv_i::MakeCirclePntVecR" );
2165   MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
2166   getCurvesOp();
2167   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
2168   endService( " GEOM_Superv_i::MakeCirclePntVecR" );
2169   return anObj;
2170 }
2171
2172 //=============================================================================
2173 //  MakeCircleThreePnt:
2174 //=============================================================================
2175 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
2176                                                          GEOM::GEOM_Object_ptr thePnt2,
2177                                                          GEOM::GEOM_Object_ptr thePnt3)
2178 {
2179   beginService( " GEOM_Superv_i::MakeCircleThreePnt" );
2180   MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
2181   getCurvesOp();
2182   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
2183   endService( " GEOM_Superv_i::MakeCircleThreePnt" );
2184   return anObj;
2185 }
2186 //=============================================================================
2187 //  MakeCircleCenter2Pnt:
2188 //=============================================================================
2189 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
2190                                                            GEOM::GEOM_Object_ptr thePnt2,
2191                                                            GEOM::GEOM_Object_ptr thePnt3)
2192 {
2193   beginService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2194   MESSAGE("GEOM_Superv_i::MakeCircleCenter2Pnt");
2195   getCurvesOp();
2196   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3);
2197   endService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2198   return anObj;
2199 }
2200
2201 //=============================================================================
2202 //  MakeEllipse:
2203 //=============================================================================
2204 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
2205                                                   GEOM::GEOM_Object_ptr theVector,
2206                                                   CORBA::Double theRMajor, 
2207                                                   CORBA::Double theRMinor)
2208 {
2209   beginService( " GEOM_Superv_i::MakeEllipse" );
2210   MESSAGE("GEOM_Superv_i::MakeEllipse");
2211   getCurvesOp();
2212   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
2213   endService( " GEOM_Superv_i::MakeEllipse" );
2214   return anObj;
2215 }
2216
2217 //=============================================================================
2218 //  MakeArc:
2219 //=============================================================================
2220 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
2221                                               GEOM::GEOM_Object_ptr thePnt2,
2222                                               GEOM::GEOM_Object_ptr thePnt3)
2223 {
2224   beginService( " GEOM_Superv_i::MakeArc" );
2225   MESSAGE("GEOM_Superv_i::MakeArc");
2226   getCurvesOp();
2227   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
2228   endService( " GEOM_Superv_i::MakeArc" );
2229   return anObj;
2230 }
2231
2232 //=============================================================================
2233 //  MakeArcCenter:
2234 //=============================================================================
2235 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
2236                                                     GEOM::GEOM_Object_ptr thePnt1,
2237                                                     GEOM::GEOM_Object_ptr thePnt2,
2238                                                     CORBA::Boolean theSense)
2239 {
2240   beginService( " GEOM_Superv_i::MakeArcCenter" );
2241   MESSAGE("GEOM_Superv_i::MakeArcCenter");
2242   getCurvesOp();
2243   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArcCenter(theCenter, thePnt1, thePnt2,theSense);
2244   endService( " GEOM_Superv_i::MakeArcCenter" );
2245   return anObj;
2246 }
2247
2248 //=============================================================================
2249 //  MakePolyline:
2250 //=============================================================================
2251 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints)
2252 {
2253   beginService( " GEOM_Superv_i::MakePolyline" );
2254   MESSAGE("GEOM_Superv_i::MakePolyline");
2255   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2256       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2257     getCurvesOp();
2258     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakePolyline(aListImplP->GetList());
2259     endService( " GEOM_Superv_i::MakePolyline" );
2260     return anObj;
2261   }
2262   endService( " GEOM_Superv_i::MakePolyline" );
2263   return NULL;
2264 }
2265
2266 //=============================================================================
2267 //  MakeSplineBezier:
2268 //=============================================================================
2269 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints)
2270 {
2271   beginService( " GEOM_Superv_i::MakeSplineBezier" );
2272   MESSAGE("GEOM_Superv_i::MakeSplineBezier");
2273   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2274       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2275     getCurvesOp();
2276     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineBezier(aListImplP->GetList());
2277     endService( " GEOM_Superv_i::MakeSplineBezier" );
2278     return anObj;
2279   }
2280   endService( " GEOM_Superv_i::MakeSplineBezier" );
2281   return NULL;
2282 }
2283
2284 //=============================================================================
2285 //  MakeSplineInterpolation:
2286 //=============================================================================
2287 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints)
2288 {
2289   beginService( " GEOM_Superv_i::MakeSplineInterpolation" );
2290   MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
2291   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP = 
2292       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2293     getCurvesOp();
2294     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
2295     endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2296     return anObj;
2297   }
2298   endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2299   return NULL;
2300 }
2301
2302 //=============================================================================
2303 //  MakeSketcher:
2304 //=============================================================================
2305 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand, 
2306                                                    GEOM::GEOM_List_ptr theWorkingPlane)
2307 {
2308   beginService( " GEOM_Superv_i::MakeSketcher" );
2309   MESSAGE("GEOM_Superv_i::MakeSketcher");
2310   if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP = 
2311       dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
2312     getCurvesOp();
2313     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
2314     endService( " GEOM_Superv_i::MakeSketcher" );
2315     return anObj;
2316   }
2317   endService( " GEOM_Superv_i::MakeSketcher" );
2318   return NULL;
2319 }
2320
2321 //=============================== LocalOperations =============================
2322 //=============================================================================
2323 //  MakeFilletAll:
2324 //=============================================================================
2325 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
2326                                                     CORBA::Double theR)
2327 {
2328   beginService( " GEOM_Superv_i::MakeFilletAll" );
2329   MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
2330   getLocalOp();
2331   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletAll(theShape, theR);
2332   endService( " GEOM_Superv_i::MakeFilletAll" );
2333   return anObj;
2334 }
2335
2336 //=============================================================================
2337 //  MakeFilletEdges:
2338 //=============================================================================
2339 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, 
2340                                                       CORBA::Double theR,
2341                                                       GEOM::GEOM_List_ptr theEdges)
2342 {
2343   beginService( " GEOM_Superv_i::MakeFilletEdges" );
2344   MESSAGE("GEOM_Superv_i::MakeFilletEdges");
2345   if (GEOM_List_i<GEOM::ListOfLong>* aListImplE = 
2346       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2347     getLocalOp();
2348     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
2349     endService( " GEOM_Superv_i::MakeFilletEdges" );
2350     return anObj;
2351   }
2352   endService( " GEOM_Superv_i::MakeFilletEdges" );
2353   return NULL;
2354 }
2355
2356 //=============================================================================
2357 //  MakeFilletEdges R1 R2:
2358 //=============================================================================
2359 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape, 
2360                                                           CORBA::Double theR1,
2361                                                           CORBA::Double theR2,
2362                                                           GEOM::GEOM_List_ptr theEdges)
2363 {
2364   beginService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2365   MESSAGE("GEOM_Superv_i::MakeFilletEdgesR1R2");
2366   if (GEOM_List_i<GEOM::ListOfLong>* aListImplE = 
2367       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2368     getLocalOp();
2369     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdgesR1R2(theShape, theR1,
2370                                                                  theR2, aListImplE->GetList());
2371     endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2372     return anObj;
2373   }
2374   endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2375   return NULL;
2376 }
2377
2378 //=============================================================================
2379 //  MakeFilletFaces:
2380 //=============================================================================
2381 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, 
2382                                                       CORBA::Double theR,
2383                                                       GEOM::GEOM_List_ptr theFaces)
2384 {
2385   beginService( " GEOM_Superv_i::MakeFilletFaces" );
2386   MESSAGE("GEOM_Superv_i::MakeFilletFaces");
2387   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2388       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2389     getLocalOp();
2390     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
2391     endService( " GEOM_Superv_i::MakeFilletFaces" );
2392     return anObj;
2393   }
2394   endService( " GEOM_Superv_i::MakeFilletFaces" );
2395   return NULL;
2396 }
2397
2398 //=============================================================================
2399 //  MakeFilletFaces R1 R2:
2400 //=============================================================================
2401 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape, 
2402                                                           CORBA::Double theR1,
2403                                                           CORBA::Double theR2,
2404                                                           GEOM::GEOM_List_ptr theFaces)
2405 {
2406   beginService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2407   MESSAGE("GEOM_Superv_i::MakeFilletFacesR1R2");
2408   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2409       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2410     getLocalOp();
2411     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFacesR1R2(theShape, theR1, theR2,
2412                                                                  aListImplF->GetList());
2413     endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2414     return anObj;
2415   }
2416   endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2417   return NULL;
2418 }
2419
2420 //=============================================================================
2421 //  MakeChamferAll:
2422 //=============================================================================
2423 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
2424 {
2425   beginService( " GEOM_Superv_i::MakeChamferAll" );
2426   MESSAGE("GEOM_Superv_i::MakeChamferAll");
2427   getLocalOp();
2428   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferAll(theShape, theD);
2429   endService( " GEOM_Superv_i::MakeChamferAll" );
2430   return anObj;
2431 }
2432   
2433 //=============================================================================
2434 //  MakeChamferEdge:
2435 //=============================================================================
2436 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
2437                                                       CORBA::Double theD1, CORBA::Double theD2,
2438                                                       CORBA::Long theFace1, CORBA::Long theFace2)
2439 {
2440   beginService( " GEOM_Superv_i::MakeChamferEdge" );
2441   MESSAGE("GEOM_Superv_i::MakeChamferEdge");
2442   getLocalOp();
2443   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
2444   endService( " GEOM_Superv_i::MakeChamferEdge" );
2445   return anObj;
2446 }
2447
2448 //=============================================================================
2449 //  MakeChamferEdgeAD:
2450 //=============================================================================
2451 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
2452                                                         CORBA::Double theD, CORBA::Double theAngle,
2453                                                         CORBA::Long theFace1, CORBA::Long theFace2)
2454 {
2455   beginService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2456   MESSAGE("GEOM_Superv_i::MakeChamferEdgeAD");
2457   getLocalOp();
2458   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2);
2459   endService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2460   return anObj;
2461 }
2462
2463 //=============================================================================
2464 //  MakeChamferFaces:
2465 //=============================================================================
2466 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
2467                                                        CORBA::Double theD1, CORBA::Double theD2,
2468                                                        GEOM::GEOM_List_ptr theFaces)
2469 {
2470   beginService( " GEOM_Superv_i::MakeChamferFaces" );
2471   MESSAGE("GEOM_Superv_i::MakeChamferFaces");
2472   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2473       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2474     getLocalOp();
2475     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
2476     endService( " GEOM_Superv_i::MakeChamferFaces" );
2477     return anObj;
2478   }
2479   endService( " GEOM_Superv_i::MakeChamferFaces" );
2480   return NULL;
2481 }
2482
2483 //=============================================================================
2484 //  MakeChamferFacesAD:
2485 //=============================================================================
2486 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
2487                                                          CORBA::Double theD, CORBA::Double theAngle,
2488                                                          GEOM::GEOM_List_ptr theFaces)
2489 {
2490   beginService( " GEOM_Superv_i::MakeChamferFacesAD" );
2491   MESSAGE("GEOM_Superv_i::MakeChamferFacesAD");
2492   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2493       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2494     getLocalOp();
2495     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFacesAD(theShape, theD, theAngle, aListImplF->GetList());
2496     endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2497     return anObj;
2498   }
2499   endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2500   return NULL;
2501 }
2502
2503 //=============================================================================
2504 //  MakeChamferEdges:
2505 //=============================================================================
2506 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
2507                                                        CORBA::Double theD1, CORBA::Double theD2,
2508                                                        GEOM::GEOM_List_ptr theEdges)
2509 {
2510   beginService( " GEOM_Superv_i::MakeChamferEdges" );
2511   MESSAGE("GEOM_Superv_i::MakeChamferEdges");
2512   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2513       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2514     getLocalOp();
2515     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdges(theShape, theD1, theD2, aListImplF->GetList());
2516     endService( " GEOM_Superv_i::MakeChamferEdges" );
2517     return anObj;
2518   }
2519   endService( " GEOM_Superv_i::MakeChamferEdges" );
2520   return NULL;
2521 }
2522
2523 //=============================================================================
2524 //  MakeChamferEdgesAD:
2525 //=============================================================================
2526 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
2527                                                          CORBA::Double theD, CORBA::Double theAngle,
2528                                                          GEOM::GEOM_List_ptr theEdges)
2529 {
2530   beginService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2531   MESSAGE("GEOM_Superv_i::MakeChamferEdgesAD");
2532   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF = 
2533       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2534     getLocalOp();
2535     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgesAD(theShape, theD, theAngle, aListImplF->GetList());
2536     endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2537     return anObj;
2538   }
2539   endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2540   return NULL;
2541 }
2542
2543 //=============================================================================
2544 //  MakeArchimede:
2545 //=============================================================================
2546 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
2547                                                     CORBA::Double theWeight,
2548                                                     CORBA::Double theWaterDensity,
2549                                                     CORBA::Double theMeshingDeflection)
2550 {
2551   beginService( " GEOM_Superv_i::MakeArchimede" );
2552   MESSAGE("GEOM_Superv_i::MakeArchimede");
2553   getLocalOp();
2554   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
2555   endService( " GEOM_Superv_i::MakeArchimede" );
2556   return anObj;
2557 }
2558
2559 //=============================================================================
2560 //  GetSubShapeIndexMakeFilletAll:
2561 //=============================================================================
2562 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
2563                                              GEOM::GEOM_Object_ptr theSubShape)
2564 {
2565   beginService( " GEOM_Superv_i::GetSubShapeIndex" );
2566   MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
2567   getLocalOp();
2568   CORBA::Long aRes = myLocalOp->GetSubShapeIndex(theShape, theSubShape);
2569   endService( " GEOM_Superv_i::GetSubShapeIndex" );
2570   return aRes;
2571 }
2572
2573 //=============================== GroupOperations =============================
2574 //=============================================================================
2575 //  CreateGroup:
2576 //=============================================================================
2577 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape, 
2578                                                   CORBA::Long theShapeType)
2579 {
2580   beginService( " GEOM_Superv_i::CreateGroup" );
2581   MESSAGE("GEOM_Superv_i::CreateGroup");
2582   getGroupOp();
2583   GEOM::GEOM_Object_ptr anObj = myGroupOp->CreateGroup(theMainShape, theShapeType);
2584   endService( " GEOM_Superv_i::CreateGroup" );
2585   return anObj;
2586 }
2587
2588 //=============================================================================
2589 //  AddObject:
2590 //=============================================================================
2591 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup, 
2592                                CORBA::Long theSubShapeId)
2593 {
2594   beginService( " GEOM_Superv_i::AddObject" );
2595   MESSAGE("GEOM_Superv_i::AddObject");
2596   getGroupOp();
2597   myGroupOp->AddObject(theGroup, theSubShapeId);
2598   endService( " GEOM_Superv_i::AddObject" );
2599 }
2600
2601 //=============================================================================
2602 //  RemoveObject:
2603 //=============================================================================
2604 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup, 
2605                                   CORBA::Long theSubShapeId)
2606 {
2607   beginService( " GEOM_Superv_i::RemoveObject" );
2608   MESSAGE("GEOM_Superv_i::RemoveObject");
2609   getGroupOp();
2610   myGroupOp->RemoveObject(theGroup, theSubShapeId);
2611   endService( " GEOM_Superv_i::RemoveObject" );
2612 }
2613
2614 //=============================================================================
2615 //  GetType:
2616 //=============================================================================
2617 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
2618 {
2619   beginService( " GEOM_Superv_i::GetType" );
2620   MESSAGE("GEOM_Superv_i::GetType");
2621   getGroupOp();
2622   CORBA::Long aResult = myGroupOp->GetType(theGroup);
2623   endService( " GEOM_Superv_i::GetType" );
2624   return aResult;
2625 }
2626
2627 //=============================================================================
2628 //  GetMainShape:
2629 //=============================================================================
2630 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
2631 {
2632   beginService( " GEOM_Superv_i::GetMainShape" );
2633   MESSAGE("GEOM_Superv_i::GetMainShape");
2634   getGroupOp();
2635   GEOM::GEOM_Object_ptr anObj = myGroupOp->GetMainShape(theGroup);
2636   endService( " GEOM_Superv_i::GetMainShape" );
2637   return anObj;
2638 }
2639
2640 //=============================================================================
2641 //  GetObjects:
2642 //=============================================================================
2643 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
2644 {
2645   beginService( " GEOM_Superv_i::GetObjects" );
2646   MESSAGE("GEOM_Superv_i::GetObjects");
2647   getGroupOp();
2648
2649   GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
2650   GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
2651   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2652   endService( " GEOM_Superv_i::GetObjects" );
2653   return aListPtr->_this();
2654 }
2655
2656 //=====================================================================================
2657 // EXPORTED METHODS
2658 //=====================================================================================
2659 extern "C"
2660 {
2661   PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
2662                                                       PortableServer::POA_ptr poa, 
2663                                                       PortableServer::ObjectId * contId,
2664                                                       const char *instanceName, 
2665                                                       const char * interfaceName)
2666   {
2667     GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
2668     myGEOM_Superv_i->register_name("/myGEOM_Superv");
2669     return myGEOM_Superv_i->getId() ;
2670   }
2671 }