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