Salome HOME
0302781ddcb73dddc1a35cc117a48299af072148
[modules/geom.git] / src / GEOM_I_Superv / GEOM_Superv_i.cc
1 // Copyright (C) 2007-2023  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #include "GEOM_Superv_i.hh"
24 #include "SALOME_LifeCycleCORBA.hxx"
25 #include "Utils_CorbaException.hxx"
26 #include "SALOME_Fake_NamingService.hxx"
27 #include "SALOME_Container_i.hxx"
28
29 #include CORBA_SERVER_HEADER(SALOME_Session)
30 #include "SALOMEDSClient_ClientFactory.hxx"
31
32 #define isNewStudy(a,b) (a > 0 && a != b)
33
34 //=============================================================================
35 //  constructor:
36 //=============================================================================
37 GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
38                              PortableServer::POA_ptr poa,
39                              PortableServer::ObjectId * contId,
40                              const char *instanceName,
41                              const char *interfaceName, bool withRegistry,
42                              SALOME_NamingService_Abstract *my_name_service):name_service(my_name_service),Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, withRegistry)
43 {
44   MESSAGE("GEOM_Superv_i::GEOM_Superv_i");
45
46   _thisObj = this ;
47   _id = _poa->activate_object(_thisObj);
48   //get RootPOA (the default)
49   //myPOA = PortableServer::RefCountServantBase::_default_POA();
50   CORBA::Object_var anObj = _orb->resolve_initial_references("RootPOA");
51   myPOA = PortableServer::POA::_narrow(anObj);
52
53   setGeomEngine();
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   myMeasureOp = GEOM::GEOM_IMeasureOperations::_nil();
65   myGroupOp = GEOM::GEOM_IGroupOperations::_nil();
66 }
67
68 //=============================================================================
69 //  destructor
70 //=============================================================================
71 GEOM_Superv_i::~GEOM_Superv_i()
72 {
73   MESSAGE("GEOM_Superv_i::~GEOM_Superv_i");
74   if (!CORBA::is_nil(myBasicOp))
75     myBasicOp->UnRegister();
76   if (!CORBA::is_nil(myBoolOp))
77     myBoolOp->UnRegister();
78   if (!CORBA::is_nil(my3DPrimOp))
79     my3DPrimOp->UnRegister();
80   delete name_service;
81 }
82
83 //============================================================================
84 // function : register()
85 // purpose  : register 'name' in 'name_service'
86 //============================================================================
87 void GEOM_Superv_i::register_name(char * name)
88 {
89   GEOM::GEOM_Superv_var g = _this();
90   name_service->Register(g, name);
91 }
92
93 //=============================================================================
94 //  setGEOMEngine:
95 //=============================================================================
96 void GEOM_Superv_i::setGeomEngine()
97 {
98   if ( !CORBA::is_nil(myGeomEngine) )
99     return;
100
101   // get GEOM_Gen engine
102   Engines::Container_var cont=GetContainerRef();
103   CORBA::String_var container_name=cont->name();
104   std::string shortName=container_name.in();
105   shortName=shortName.substr(12); // substract "/Containers/"
106   SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
107   Engines::EngineComponent_var comp = lcc->FindOrLoad_Component( shortName.c_str(), "GEOM" );
108   delete lcc;
109
110   myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
111 }
112
113 //=============================================================================
114 //  CreateListOfGO:
115 //=============================================================================
116 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfGO()
117 {
118   MESSAGE("GEOM_Superv_i::CreateListOfGO()");
119   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>();
120   return aListPtr->_this();
121 }
122
123 //=============================================================================
124 //  AddItemToListOfGO:
125 //=============================================================================
126 void GEOM_Superv_i::AddItemToListOfGO(GEOM::GEOM_List_ptr& theList,
127                                       GEOM::GEOM_Object_ptr theObject)
128 {
129   MESSAGE("GEOM_Superv_i::AddItemToListOfGO(...)");
130   GEOM::GEOM_Object_var anObj =  GEOM::GEOM_Object::_duplicate(theObject);
131   if (GEOM_List_i<GEOM::ListOfGO>* aList =
132       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theList, myPOA).in())) {
133     aList->AddObject(anObj);
134     MESSAGE(" NewLength = "<<aList->GetList().length());
135   }
136 }
137
138 //=============================================================================
139 //  CreateListOfLong:
140 //=============================================================================
141 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfLong()
142 {
143   MESSAGE("GEOM_Superv_i::CreateListOfLong()");
144   GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>();
145   return aListPtr->_this();
146 }
147
148 //=============================================================================
149 //  AddItemToListOfLong:
150 //=============================================================================
151 void GEOM_Superv_i::AddItemToListOfLong(GEOM::GEOM_List_ptr& theList,
152                                         CORBA::Long theObject)
153 {
154   MESSAGE("GEOM_Superv_i::AddItemToListOfLong(...)");
155   if (GEOM_List_i<GEOM::ListOfLong>* aList =
156       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theList, myPOA).in())) {
157     aList->AddObject(theObject);
158     MESSAGE(" NewLength = "<<aList->GetList().length());
159   }
160 }
161
162 //=============================================================================
163 //  CreateListOfDouble:
164 //=============================================================================
165 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfDouble()
166 {
167   MESSAGE("GEOM_Superv_i::CreateListOfDouble()");
168   GEOM_List_i<GEOM::ListOfDouble>* aListPtr = new GEOM_List_i<GEOM::ListOfDouble>();
169   return aListPtr->_this();
170 }
171
172 //=============================================================================
173 //  AddItemToListOfDouble:
174 //=============================================================================
175 void GEOM_Superv_i::AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList,
176                                           CORBA::Double theObject)
177 {
178   MESSAGE("GEOM_Superv_i::AddItemToListOfDouble(...)");
179   if (GEOM_List_i<GEOM::ListOfDouble>* aList =
180       dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theList, myPOA).in())) {
181     aList->AddObject(theObject);
182     MESSAGE(" NewLength = "<<aList->GetList().length());
183   }
184 }
185
186 //=============================================================================
187 //  getBasicOp:
188 //=============================================================================
189 void GEOM_Superv_i::getBasicOp()
190 {
191   if (CORBA::is_nil(myGeomEngine))
192     setGeomEngine();
193   // get GEOM_IBasicOperations interface
194   if (CORBA::is_nil(myBasicOp)) {
195     myBasicOp = myGeomEngine->GetIBasicOperations();
196   }
197 }
198
199 //=============================================================================
200 //  get3DPrimOp:
201 //=============================================================================
202 void GEOM_Superv_i::get3DPrimOp()
203 {
204   if (CORBA::is_nil(myGeomEngine))
205     setGeomEngine();
206   // get GEOM_I3DPrimOperations interface
207   if (CORBA::is_nil(my3DPrimOp)) {
208     my3DPrimOp = myGeomEngine->GetI3DPrimOperations();
209   }
210 }
211
212 //=============================================================================
213 //  getBoolOp:
214 //=============================================================================
215 void GEOM_Superv_i::getBoolOp()
216 {
217   if (CORBA::is_nil(myGeomEngine))
218     setGeomEngine();
219   // get GEOM_IBooleanOperations interface
220   if (CORBA::is_nil(myBoolOp)) {
221     myBoolOp = myGeomEngine->GetIBooleanOperations();
222   }
223 }
224
225 //=============================================================================
226 //  getInsOp:
227 //=============================================================================
228 void GEOM_Superv_i::getInsOp()
229 {
230   if (CORBA::is_nil(myGeomEngine))
231     setGeomEngine();
232   // get GEOM_IInsertOperations interface
233   if (CORBA::is_nil(myInsOp)) {
234     myInsOp = myGeomEngine->GetIInsertOperations();
235   }
236 }
237
238 //=============================================================================
239 //  getTransfOp:
240 //=============================================================================
241 void GEOM_Superv_i::getTransfOp()
242 {
243   if (CORBA::is_nil(myGeomEngine))
244     setGeomEngine();
245   // get GEOM_ITransformOperations interface
246   if (CORBA::is_nil(myTransfOp)) {
247     myTransfOp = myGeomEngine->GetITransformOperations();
248   }
249 }
250
251 //=============================================================================
252 //  getShapesOp:
253 //=============================================================================
254 void GEOM_Superv_i::getShapesOp()
255 {
256   if (CORBA::is_nil(myGeomEngine))
257     setGeomEngine();
258   // get GEOM_IShapesOperations interface
259   if (CORBA::is_nil(myShapesOp)) {
260     myShapesOp = myGeomEngine->GetIShapesOperations();
261   }
262 }
263
264 //=============================================================================
265 //  getBlocksOp:
266 //=============================================================================
267 void GEOM_Superv_i::getBlocksOp()
268 {
269   if (CORBA::is_nil(myGeomEngine))
270     setGeomEngine();
271   // get GEOM_IBlocksOperations interface
272   if (CORBA::is_nil(myBlocksOp)) {
273     myBlocksOp = myGeomEngine->GetIBlocksOperations();
274   }
275 }
276
277 //=============================================================================
278 //  getCurvesOp:
279 //=============================================================================
280 void GEOM_Superv_i::getCurvesOp()
281 {
282   if (CORBA::is_nil(myGeomEngine))
283     setGeomEngine();
284   // get GEOM_ICurvesOperations interface
285   if (CORBA::is_nil(myCurvesOp)) {
286     myCurvesOp = myGeomEngine->GetICurvesOperations();
287   }
288 }
289
290 //=============================================================================
291 //  getLocalOp:
292 //=============================================================================
293 void GEOM_Superv_i::getLocalOp()
294 {
295   if (CORBA::is_nil(myGeomEngine))
296     setGeomEngine();
297   // get GEOM_ILocalOperations interface
298   if (CORBA::is_nil(myLocalOp)) {
299     myLocalOp = myGeomEngine->GetILocalOperations();
300   }
301 }
302
303 //=============================================================================
304 //  getMeasureOp:
305 //=============================================================================
306 void GEOM_Superv_i::getMeasureOp()
307 {
308   if (CORBA::is_nil(myGeomEngine))
309     setGeomEngine();
310   // get GEOM_IMeasureOperations interface
311   if (CORBA::is_nil(myMeasureOp))
312   {
313     myMeasureOp = myGeomEngine->GetIMeasureOperations();
314   }
315 }
316
317 //=============================================================================
318 //  getGroupOp:
319 //=============================================================================
320 void GEOM_Superv_i::getGroupOp()
321 {
322   if (CORBA::is_nil(myGeomEngine))
323     setGeomEngine();
324   // get GEOM_IGroupOperations interface
325   if (CORBA::is_nil(myGroupOp)) {
326     myGroupOp = myGeomEngine->GetIGroupOperations();
327   }
328 }
329
330 //=============================================================================
331 //  getAdvancedOp:
332 //=============================================================================
333 void GEOM_Superv_i::getAdvancedOp()
334 {
335   if (CORBA::is_nil(myGeomEngine))
336     setGeomEngine();
337   // get GEOM::IAdvancedOperations interface
338   if (CORBA::is_nil(myAdvancedOp)) {
339     myAdvancedOp = GEOM::IAdvancedOperations::_narrow(myGeomEngine->GetPluginOperations("AdvancedEngine"));
340   }
341 }
342
343 //=============================================================================
344 //  getSTLPluginOp:
345 //=============================================================================
346 void GEOM_Superv_i::getSTLPluginOp()
347 {
348   if (CORBA::is_nil(myGeomEngine))
349     setGeomEngine();
350   // get GEOM::ISTLOperations interface
351   if (CORBA::is_nil(mySTLOp)) {
352     mySTLOp = GEOM::ISTLOperations::_narrow(myGeomEngine->GetPluginOperations("STLPluginEngine"));
353   }
354 }
355
356 //=============================================================================
357 //  getBREPPluginOp:
358 //=============================================================================
359 void GEOM_Superv_i::getBREPPluginOp()
360 {
361   if (CORBA::is_nil(myGeomEngine))
362     setGeomEngine();
363   // get GEOM:IBREPOperations interface
364   if (CORBA::is_nil(myBREPOp)) {
365     myBREPOp = GEOM::IBREPOperations::_narrow(myGeomEngine->GetPluginOperations("BREPPluginEngine"));
366   }
367 }
368
369 //=============================================================================
370 //  getSTEPPluginOp:
371 //=============================================================================
372 void GEOM_Superv_i::getSTEPPluginOp()
373 {
374   if (CORBA::is_nil(myGeomEngine))
375     setGeomEngine();
376   // get GEOM::ISTEPOperations interface
377   if (CORBA::is_nil(mySTEPOp)) {
378     mySTEPOp = GEOM::ISTEPOperations::_narrow(myGeomEngine->GetPluginOperations("STEPPluginEngine"));
379   }
380 }
381
382 //=============================================================================
383 //  getIGESPluginOp:
384 //=============================================================================
385 void GEOM_Superv_i::getIGESPluginOp()
386 {
387   if (CORBA::is_nil(myGeomEngine))
388     setGeomEngine();
389   // get GEOM::IIGESOperations interface
390   if (CORBA::is_nil(myIGESOp)) {
391     myIGESOp = GEOM::IIGESOperations::_narrow(myGeomEngine->GetPluginOperations("IGESPluginEngine"));
392   }
393 }
394
395 //=============================================================================
396 //  getXAOPluginOp:
397 //=============================================================================
398 void GEOM_Superv_i::getXAOPluginOp()
399 {
400   if (CORBA::is_nil(myGeomEngine))
401     setGeomEngine();
402   // get GEOM::IXAOOperations interface
403   if (CORBA::is_nil(myXAOOp)) {
404     myXAOOp = GEOM::IXAOOperations::_narrow(myGeomEngine->GetPluginOperations("XAOPluginEngine"));
405   }
406 }
407
408 #ifdef WITH_VTK
409 //=============================================================================
410 //  getVTKPluginOp:
411 //=============================================================================
412 void GEOM_Superv_i::getVTKPluginOp()
413 {
414   if (CORBA::is_nil(myGeomEngine))
415     setGeomEngine();
416   // get GEOM::IVTKOperations interface
417   if (CORBA::is_nil(myVTKOp)) {
418     myVTKOp = GEOM::IVTKOperations::_narrow(myGeomEngine->GetPluginOperations("VTKPluginEngine"));
419   }
420 }
421 #endif
422
423 //=============================================================================
424 //  GetServant:
425 //=============================================================================
426 PortableServer::ServantBase_var GEOM_Superv_i::GetServant(CORBA::Object_ptr       theObject,
427                                                           PortableServer::POA_ptr thePOA)
428 {
429   if(CORBA::is_nil(theObject))  return NULL;
430   PortableServer::Servant aServant = thePOA->reference_to_servant(theObject);
431   return aServant;
432 }
433
434 //============================================================================
435 // function : Save()
436 // purpose  : save OCAF/Geom document
437 //============================================================================
438 SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr /*theComponent*/,
439                                        const char* /*theURL*/,
440                                        CORBA::Boolean /*isMultiFile*/)
441 {
442   SALOMEDS::TMPFile_var aStreamFile;
443   return aStreamFile._retn();
444 }
445
446 //============================================================================
447 // function : SaveASCII()
448 // purpose  :
449 //============================================================================
450 SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr /*theComponent*/,
451                                             const char* /*theURL*/,
452                                             CORBA::Boolean /*isMultiFile*/)
453 {
454   SALOMEDS::TMPFile_var aStreamFile;
455   return aStreamFile._retn();
456 }
457
458 //============================================================================
459 // function : Load()
460 // purpose  :
461 //============================================================================
462 CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr /*theComponent*/,
463                                    const SALOMEDS::TMPFile& /*theStream*/,
464                                    const char* /*theURL*/,
465                                    CORBA::Boolean /*isMultiFile*/)
466 {
467   return false;
468 }
469
470 //============================================================================
471 // function : LoadASCII()
472 // purpose  :
473 //============================================================================
474 CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr /*theComponent*/,
475                                         const SALOMEDS::TMPFile& /*theStream*/,
476                                         const char* /*theURL*/,
477                                         CORBA::Boolean /*isMultiFile*/)
478 {
479   return false;
480 }
481
482 //============================================================================
483 // function : Close()
484 // purpose  :
485 //============================================================================
486 void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr /*theComponent*/)
487 {
488 }
489
490 //============================================================================
491 // function : ComponentDataType()
492 // purpose  :
493 //============================================================================
494 char* GEOM_Superv_i::ComponentDataType()
495 {
496   return 0;
497 }
498
499 //============================================================================
500 // function : IORToLocalPersistentID()
501 // purpose  :
502 //============================================================================
503 char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr /*theSObject*/,
504                                             const char* /*IORString*/,
505                                             CORBA::Boolean /*isMultiFile*/,
506                                             CORBA::Boolean /*isASCII*/)
507 {
508   return 0;
509 }
510
511 //============================================================================
512 // function : LocalPersistentIDToIOR()
513 // purpose  : Create/Load CORBA object from a persistent ref (an entry)
514 //          : Used when a study is loaded
515 //          : The IOR (IORName) of object created is returned
516 //============================================================================
517 char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr /*theSObject*/,
518                                             const char* /*aLocalPersistentID*/,
519                                             CORBA::Boolean /*isMultiFile*/,
520                                             CORBA::Boolean /*isASCII*/)
521 {
522   return 0;
523 }
524
525 //============================================================================
526 // function : CanPublishInStudy
527 // purpose  :
528 //============================================================================
529 CORBA::Boolean GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
530 {
531   if (CORBA::is_nil(myGeomEngine))
532     setGeomEngine();
533   return myGeomEngine->CanPublishInStudy(theIOR);
534 }
535
536 //============================================================================
537 // function : PublishInStudy
538 // purpose  :
539 //============================================================================
540 SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::SObject_ptr theSObject,
541                                                     CORBA::Object_ptr theObject,
542                                                     const char* theName) 
543 {
544   if (CORBA::is_nil(myGeomEngine))
545     setGeomEngine();
546   return myGeomEngine->PublishInStudy(theSObject, theObject, theName);
547 }
548
549 //============================================================================
550 // function : PublishNamedShapesInStudy
551 // purpose  :
552 //============================================================================
553 GEOM::ListOfGO*
554 GEOM_Superv_i::PublishNamedShapesInStudy(//SALOMEDS::SObject_ptr theSObject,
555                                          CORBA::Object_ptr theObject)
556 {
557   if (CORBA::is_nil(myGeomEngine))
558     setGeomEngine();
559   return myGeomEngine->PublishNamedShapesInStudy(theObject);
560 }
561
562 //============================================================================
563 // function : CanCopy()
564 // purpose  :
565 //============================================================================
566 CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr /*theObject*/)
567 {
568   return false;
569 }
570
571 //============================================================================
572 // function : CopyFrom()
573 // purpose  :
574 //============================================================================
575 SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr /*theObject*/, CORBA::Long& /*theObjectID*/)
576 {
577   SALOMEDS::TMPFile_var aStreamFile;
578   return aStreamFile._retn();
579 }
580
581 //============================================================================
582 // function : CanPaste()
583 // purpose  :
584 //============================================================================
585 CORBA::Boolean GEOM_Superv_i::CanPaste(const char* /*theComponentName*/, CORBA::Long /*theObjectID*/)
586 {
587   return false;
588 }
589
590 //============================================================================
591 // function : PasteInto()
592 // purpose  :
593 //============================================================================
594 SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& /*theStream*/,
595                                                CORBA::Long /*theObjectID*/,
596                                                SALOMEDS::SObject_ptr /*theObject*/)
597 {
598   SALOMEDS::SObject_var aNewSO;
599   return aNewSO._retn();
600 }
601
602 //================= Primitives Construction : BasicOperations =================
603 //=============================================================================
604 //  MakePointXYZ:
605 //=============================================================================
606 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointXYZ(CORBA::Double theX,
607                                                   CORBA::Double theY,
608                                                   CORBA::Double theZ)
609 {
610   beginService( " GEOM_Superv_i::MakePointXYZ" );
611   MESSAGE("GEOM_Superv_i::MakePointXYZ");
612   getBasicOp();
613   // make vertex and return
614   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointXYZ(theX, theY, theZ);
615   endService( " GEOM_Superv_i::MakePointXYZ" );
616   return anObj;
617 }
618
619 //=============================================================================
620 //  MakePointWithReference:
621 //=============================================================================
622 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
623                                                              CORBA::Double theX,
624                                                              CORBA::Double theY,
625                                                              CORBA::Double theZ)
626 {
627   beginService( " GEOM_Superv_i::MakePointWithReference" );
628   MESSAGE("GEOM_Superv_i::MakePointWithReference");
629   getBasicOp();
630   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointWithReference(theReference, theX, theY, theZ);
631   endService( " GEOM_Superv_i::MakePointWithReference" );
632   return anObj;
633 }
634
635 //=============================================================================
636 //  MakePointOnCurve:
637 //=============================================================================
638 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
639                                                        CORBA::Double theParameter)
640 {
641   beginService( " GEOM_Superv_i::MakePointOnCurve" );
642   MESSAGE("GEOM_Superv_i::MakePointOnCurve");
643   getBasicOp();
644   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointOnCurve(theRefCurve, theParameter, false);
645   endService( " GEOM_Superv_i::MakePointOnCurve" );
646   return anObj;
647 }
648
649 //=============================================================================
650 //  MakePointOnCurveByLength:
651 //=============================================================================
652 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurveByLength (GEOM::GEOM_Object_ptr theRefCurve,
653                                                                CORBA::Double theLength,
654                                                                GEOM::GEOM_Object_ptr theStartPoint)
655 {
656   beginService( " GEOM_Superv_i::MakePointOnCurveByLength" );
657   MESSAGE("GEOM_Superv_i::MakePointOnCurveByLength");
658   getBasicOp();
659   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint);
660   endService( " GEOM_Superv_i::MakePointOnCurveByLength" );
661   return anObj;
662 }
663
664 //=============================================================================
665 //  MakePointOnCurveByCoord
666 //=============================================================================
667 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurveByCoord (GEOM::GEOM_Object_ptr theRefCurve,
668                                                               CORBA::Double theXParameter,
669                                                               CORBA::Double theYParameter,
670                                                               CORBA::Double theZParameter)
671 {
672   beginService( " GEOM_Superv_i::MakePointOnCurveByCoord" );
673   MESSAGE("GEOM_Superv_i::MakePointOnCurveByCoord");
674   getBasicOp();
675   GEOM::GEOM_Object_ptr anObj =
676     myBasicOp->MakePointOnCurveByCoord(theRefCurve, theXParameter,
677                                 theYParameter, theZParameter);
678   endService( " GEOM_Superv_i::MakePointOnCurveByCoord" );
679   return anObj;
680 }
681
682 //=============================================================================
683 //  MakePointOnSurface:
684 //=============================================================================
685 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnSurface (GEOM::GEOM_Object_ptr theRefSurface,
686                                                          CORBA::Double theUParameter,
687                                                          CORBA::Double theVParameter)
688 {
689   beginService( " GEOM_Superv_i::MakePointOnSurface" );
690   MESSAGE("GEOM_Superv_i::MakePointOnSurface");
691   getBasicOp();
692   GEOM::GEOM_Object_ptr anObj =
693     myBasicOp->MakePointOnSurface(theRefSurface, theUParameter, theVParameter);
694   endService( " GEOM_Superv_i::MakePointOnSurface" );
695   return anObj;
696 }
697
698 //=============================================================================
699 //  MakePointOnSurfaceByCoord
700 //=============================================================================
701 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnSurfaceByCoord (GEOM::GEOM_Object_ptr theRefSurface,
702                                                                 CORBA::Double theXParameter,
703                                                                 CORBA::Double theYParameter,
704                                                                 CORBA::Double theZParameter)
705 {
706   beginService( " GEOM_Superv_i::MakePointOnSurfaceByCoord" );
707   MESSAGE("GEOM_Superv_i::MakePointOnSurfaceByCoord");
708   getBasicOp();
709   GEOM::GEOM_Object_ptr anObj =
710     myBasicOp->MakePointOnSurfaceByCoord(theRefSurface, theXParameter,
711                                 theYParameter, theZParameter);
712   endService( " GEOM_Superv_i::MakePointOnSurfaceByCoord" );
713   return anObj;
714 }
715
716 //=============================================================================
717 //  MakePointOnLinesIntersection:
718 //=============================================================================
719 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnLinesIntersection (GEOM::GEOM_Object_ptr theRefLine1,
720                                                                    GEOM::GEOM_Object_ptr theRefLine2)
721 {
722   beginService( " GEOM_Superv_i::MakePointOnLinesIntersection" );
723   MESSAGE("GEOM_Superv_i::MakePointOnLinesIntersection");
724   getBasicOp();
725   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointOnLinesIntersection(theRefLine1, theRefLine2);
726   endService( " GEOM_Superv_i::MakePointOnLinesIntersection" );
727   return anObj;
728 }
729
730 //=============================================================================
731 //  MakeTangentOnCurve:
732 //=============================================================================
733 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
734                                                          CORBA::Double theParameter)
735 {
736   beginService( " GEOM_Superv_i::MakeTangentOnCurve" );
737   MESSAGE("GEOM_Superv_i::MakeTangentOnCurve");
738   getBasicOp();
739   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeTangentOnCurve(theRefCurve, theParameter);
740   endService( " GEOM_Superv_i::MakeTangentOnCurve" );
741   return anObj;
742 }
743
744 //=============================================================================
745 //  MakeVectorDXDYDZ:
746 //=============================================================================
747 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorDXDYDZ (CORBA::Double theDX,
748                                                        CORBA::Double theDY,
749                                                        CORBA::Double theDZ)
750 {
751   beginService( " GEOM_Superv_i::MakeVectorDXDYDZ" );
752   MESSAGE("GEOM_Superv_i::MakeVectorDXDYDZ");
753   getBasicOp();
754   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeVectorDXDYDZ(theDX, theDY, theDZ);
755   endService( " GEOM_Superv_i::MakeVectorDXDYDZ" );
756   return anObj;
757 }
758
759 //=============================================================================
760 //  MakeVectorTwoPnt:
761 //=============================================================================
762 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
763                                                        GEOM::GEOM_Object_ptr thePnt2)
764 {
765   beginService( " GEOM_Superv_i::MakeVectorTwoPnt" );
766   MESSAGE("GEOM_Superv_i::MakeVector");
767   getBasicOp();
768   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeVectorTwoPnt(thePnt1, thePnt2);
769   endService( " GEOM_Superv_i::MakeVectorTwoPnt" );
770   return anObj;
771 }
772
773 //=============================================================================
774 //  MakeLineTwoPnt:
775 //=============================================================================
776 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
777                                                      GEOM::GEOM_Object_ptr thePnt2)
778 {
779   beginService( " GEOM_Superv_i::MakeLineTwoPnt");
780   MESSAGE("GEOM_Superv_i::MakeLineTwoPnt");
781   getBasicOp();
782   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeLineTwoPnt(thePnt1, thePnt2);
783   endService( " GEOM_Superv_i::MakeLineTwoPnt");
784   return anObj;
785 }
786
787 //=============================================================================
788 //  MakeLineTwoFaces:
789 //=============================================================================
790 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoFaces (GEOM::GEOM_Object_ptr theFace1,
791                                                        GEOM::GEOM_Object_ptr theFace2)
792 {
793   beginService( " GEOM_Superv_i::MakeLineTwoFaces");
794   MESSAGE("GEOM_Superv_i::MakeLineTwoFaces");
795   getBasicOp();
796   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeLineTwoFaces(theFace1, theFace2);
797   endService( " GEOM_Superv_i::MakeLineTwoFaces");
798   return anObj;
799 }
800
801 //=============================================================================
802 //  MakePlaneThreePnt:
803 //=============================================================================
804 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
805                                                         GEOM::GEOM_Object_ptr thePnt2,
806                                                         GEOM::GEOM_Object_ptr thePnt3,
807                                                         CORBA::Double theTrimSize)
808 {
809   beginService( " GEOM_Superv_i::MakePlaneThreePnt");
810   MESSAGE("GEOM_Superv_i::MakePlaneThreePnt");
811   getBasicOp();
812   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize);
813   endService( " GEOM_Superv_i::MakePlaneThreePnt");
814   return anObj;
815 }
816
817 //=============================================================================
818 //  MakePlanePntVec:
819 //=============================================================================
820 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
821                                                       GEOM::GEOM_Object_ptr theVec,
822                                                       CORBA::Double theTrimSize)
823 {
824   beginService( " GEOM_Superv_i::MakePlanePntVec" );
825   MESSAGE("GEOM_Superv_i::MakePlanePntVec");
826   getBasicOp();
827   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlanePntVec(thePnt, theVec, theTrimSize);
828   endService( " GEOM_Superv_i::MakePlanePntVec" );
829   return anObj;
830 }
831
832 //=============================================================================
833 //  MakePlaneFace:
834 //=============================================================================
835 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
836                                                     CORBA::Double theTrimSize)
837 {
838   beginService( " GEOM_Superv_i::MakePlaneFace" );
839   MESSAGE("GEOM_Superv_i::MakePlaneFace");
840   getBasicOp();
841   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlaneFace(theFace, theTrimSize);
842   endService( " GEOM_Superv_i::MakePlaneFace" );
843   return anObj;
844 }
845
846 //=============================================================================
847 //  MakePlane2Vec:
848 //=============================================================================
849 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlane2Vec (GEOM::GEOM_Object_ptr theVec1,
850                                                     GEOM::GEOM_Object_ptr theVec2,
851                                                     CORBA::Double theTrimSize)
852 {
853   beginService( " GEOM_Superv_i::MakePlane2Vec" );
854   MESSAGE("GEOM_Superv_i::MakePlane2Vec");
855   getBasicOp();
856   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlane2Vec(theVec1, theVec2, theTrimSize);
857   endService( " GEOM_Superv_i::MakePlane2Vec" );
858   return anObj;
859 }
860
861 //=============================================================================
862 //  MakePlaneLCS:
863 //=============================================================================
864 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneLCS (GEOM::GEOM_Object_ptr theLCS,
865                                                    CORBA::Double theTrimSize,
866                                                    CORBA::Double theOrientation)
867 {
868   beginService( " GEOM_Superv_i::MakePlaneLCS" );
869   MESSAGE("GEOM_Superv_i::MakePlaneLCS");
870   getBasicOp();
871   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlaneLCS(theLCS, theTrimSize, theOrientation);
872   endService( " GEOM_Superv_i::MakePlaneLCS" );
873   return anObj;
874 }
875
876 //=============================================================================
877 //  MakeMarker:
878 //=============================================================================
879 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarker
880 (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
881  CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
882  CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
883 {
884   beginService( " GEOM_Superv_i::MakeMarker" );
885   MESSAGE("GEOM_Superv_i::MakeMarker");
886   getBasicOp();
887   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeMarker(theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ);
888   endService( " GEOM_Superv_i::MakeMarker" );
889   return anObj;
890 }
891
892 //=============================================================================
893 //  MakeMarkerFromShape:
894 //=============================================================================
895 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarkerFromShape (GEOM::GEOM_Object_ptr theShape)
896 {
897   beginService( " GEOM_Superv_i::MakeMarkerFromShape" );
898   MESSAGE("GEOM_Superv_i::MakeMarkerFromShape");
899   getBasicOp();
900   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeMarkerFromShape(theShape);
901   endService( " GEOM_Superv_i::MakeMarkerFromShape" );
902   return anObj;
903 }
904
905 //=============================================================================
906 //  MakeMarkerPntTwoVec:
907 //=============================================================================
908 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarkerPntTwoVec (GEOM::GEOM_Object_ptr theOrigin,
909                                                           GEOM::GEOM_Object_ptr theXVec,
910                                                           GEOM::GEOM_Object_ptr theYVec)
911 {
912   beginService( " GEOM_Superv_i::MakeMarkerPntTwoVec" );
913   MESSAGE("GEOM_Superv_i::MakeMarkerPntTwoVec");
914   getBasicOp();
915   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec);
916   endService( " GEOM_Superv_i::MakeMarkerPntTwoVec" );
917   return anObj;
918 }
919
920 //=============================================================================
921 //  MakeTangentPlaneOnFace:
922 //=============================================================================
923 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTangentPlaneOnFace (GEOM::GEOM_Object_ptr theFace,
924                                                  CORBA::Double theParameterU,
925                                                  CORBA::Double theParameterV,
926                                                  CORBA::Double theTrimSize)
927 {
928   beginService( " GEOM_Superv_i::MakeTangentPlaneOnFace" );
929   MESSAGE("GEOM_Superv_i::MakeTangentPlaneOnFace");
930   getBasicOp();
931   GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeTangentPlaneOnFace(theFace, theParameterU,theParameterV,theTrimSize);
932   endService( " GEOM_Superv_i::MakeTangentPlaneOnFace" );
933   return anObj;
934 }
935
936 //================= Primitives Construction : 3DPrimOperations ================
937 //=============================================================================
938 //  MakeBox:
939 //=============================================================================
940 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBox (CORBA::Double theX1,
941                                               CORBA::Double theY1,
942                                               CORBA::Double theZ1,
943                                               CORBA::Double theX2,
944                                               CORBA::Double theY2,
945                                               CORBA::Double theZ2)
946 {
947   beginService( " GEOM_Superv_i::MakeBox" );
948   MESSAGE("GEOM_Superv_i::MakeBox");
949   getBasicOp();
950   get3DPrimOp();
951   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1),
952                                                           myBasicOp->MakePointXYZ(theX2, theY2, theZ2));
953   endService( " GEOM_Superv_i::MakeBox" );
954   return anObj;
955 }
956
957 //=============================================================================
958 //  MakeBoxDXDYDZ:
959 //=============================================================================
960 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxDXDYDZ (CORBA::Double theDX,
961                                                     CORBA::Double theDY,
962                                                     CORBA::Double theDZ)
963 {
964   beginService( " GEOM_Superv_i::MakeBoxDXDYDZ" );
965   MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ");
966   get3DPrimOp();
967   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ);
968   endService( " GEOM_Superv_i::MakeBoxDXDYDZ" );
969   return anObj;
970 }
971
972 //=============================================================================
973 //  MakeBoxTwoPnt:
974 //=============================================================================
975 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
976                                                     GEOM::GEOM_Object_ptr thePnt2)
977 {
978   beginService( " GEOM_Superv_i::MakeBoxTwoPnt" );
979   MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt");
980   get3DPrimOp();
981   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2);
982   endService( " GEOM_Superv_i::MakeBoxTwoPnt" );
983   return anObj;
984 }
985
986 //=============================================================================
987 //  MakeFaceHW:
988 //=============================================================================
989 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceHW (CORBA::Double theH,
990                                                  CORBA::Double theW,
991                                                  CORBA::Short  theOrientation)
992 {
993   beginService( " GEOM_Superv_i::MakeFaceHW" );
994   MESSAGE("GEOM_Superv_i::MakeFaceHW");
995   get3DPrimOp();
996   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFaceHW(theH, theW, theOrientation);
997   endService( " GEOM_Superv_i::MakeFaceHW" );
998   return anObj;
999 }
1000
1001 //=============================================================================
1002 //  MakeFaceObjHW:
1003 //=============================================================================
1004 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceObjHW (GEOM::GEOM_Object_ptr theObj,
1005                                                     CORBA::Double theH,
1006                                                     CORBA::Double theW)
1007 {
1008   beginService( " GEOM_Superv_i::MakeFaceObjHW" );
1009   MESSAGE("GEOM_Superv_i::MakeFaceObjHW");
1010   get3DPrimOp();
1011   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFaceObjHW(theObj, theH, theW);
1012   endService( " GEOM_Superv_i::MakeFaceObjHW" );
1013   return anObj;
1014 }
1015
1016 //=============================================================================
1017 //  MakeDiskPntVecR:
1018 //=============================================================================
1019 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDiskPntVecR (GEOM::GEOM_Object_ptr theCenter,
1020                                                       GEOM::GEOM_Object_ptr theVector,
1021                                                       CORBA::Double theR)
1022 {
1023   beginService( " GEOM_Superv_i::MakeDiskPntVecR" );
1024   MESSAGE("GEOM_Superv_i::MakeDiskPntVecR");
1025   get3DPrimOp();
1026   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeDiskPntVecR(theCenter, theVector, theR);
1027   endService( " GEOM_Superv_i::MakeDiskPntVecR" );
1028   return anObj;
1029 }
1030
1031 //=============================================================================
1032 //  MakeDiskThreePnt:
1033 //=============================================================================
1034 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDiskThreePnt (GEOM::GEOM_Object_ptr thePnt1,
1035                                                        GEOM::GEOM_Object_ptr thePnt2,
1036                                                        GEOM::GEOM_Object_ptr thePnt3)
1037 {
1038   beginService( " GEOM_Superv_i::MakeDiskThreePnt" );
1039   MESSAGE("GEOM_Superv_i::MakeDiskThreePnt");
1040   get3DPrimOp();
1041   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeDiskThreePnt(thePnt1, thePnt2, thePnt3);
1042   endService( " GEOM_Superv_i::MakeDiskThreePnt" );
1043   return anObj;
1044 }
1045
1046 //=============================================================================
1047 //  MakeDiskR:
1048 //=============================================================================
1049 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDiskR (CORBA::Double theR,
1050                                                 CORBA::Short  theOrientation)
1051 {
1052   beginService( " GEOM_Superv_i::MakeDiskR" );
1053   MESSAGE("GEOM_Superv_i::MakeDiskR");
1054   get3DPrimOp();
1055   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeDiskR(theR, theOrientation);
1056   endService( " GEOM_Superv_i::MakeDiskR" );
1057   return anObj;
1058 }
1059
1060 //=============================================================================
1061 //  MakeCylinderPntVecRH:
1062 //=============================================================================
1063 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
1064                                                            GEOM::GEOM_Object_ptr theAxis,
1065                                                            CORBA::Double theRadius,
1066                                                            CORBA::Double theHeight)
1067 {
1068   beginService( " GEOM_Superv_i::MakeCylinderPntVecRH" );
1069   MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH");
1070   get3DPrimOp();
1071   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight);
1072   endService( " GEOM_Superv_i::MakeCylinderPntVecRH" );
1073   return anObj;
1074 }
1075
1076 //=============================================================================
1077 //  MakeCylinderRH:
1078 //=============================================================================
1079 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR,
1080                                                      CORBA::Double theH)
1081 {
1082   beginService( " GEOM_Superv_i::MakeCylinderRH" );
1083   MESSAGE("GEOM_Superv_i::MakeCylinderRH");
1084   get3DPrimOp();
1085   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderRH(theR, theH);
1086   endService( " GEOM_Superv_i::MakeCylinderRH" );
1087   return anObj;
1088 }
1089
1090 //=============================================================================
1091 //  MakeCylinderPntVecRHA:
1092 //=============================================================================
1093 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRHA (GEOM::GEOM_Object_ptr thePnt,
1094                                                             GEOM::GEOM_Object_ptr theAxis,
1095                                                             CORBA::Double theRadius,
1096                                                             CORBA::Double theHeight,
1097                                                             CORBA::Double theAngle)
1098 {
1099   beginService( " GEOM_Superv_i::MakeCylinderPntVecRHA" );
1100   MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRHA");
1101   get3DPrimOp();
1102   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderPntVecRHA(thePnt, theAxis, theRadius, theHeight, theAngle);
1103   endService( " GEOM_Superv_i::MakeCylinderPntVecRHA" );
1104   return anObj;
1105 }
1106
1107 //=============================================================================
1108 //  MakeCylinderRHA:
1109 //=============================================================================
1110 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRHA (CORBA::Double theR,
1111                                                       CORBA::Double theH,
1112                                                       CORBA::Double theA)
1113 {
1114   beginService( " GEOM_Superv_i::MakeCylinderRHA" );
1115   MESSAGE("GEOM_Superv_i::MakeCylinderRHA");
1116   get3DPrimOp();
1117   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderRHA(theR, theH, theA);
1118   endService( " GEOM_Superv_i::MakeCylinderRHA" );
1119   return anObj;
1120 }
1121
1122 //=============================================================================
1123 //  MakeSphere:
1124 //=============================================================================
1125 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere  (CORBA::Double theX,
1126                                                   CORBA::Double theY,
1127                                                   CORBA::Double theZ,
1128                                                   CORBA::Double theRadius)
1129 {
1130   beginService( " GEOM_Superv_i::MakeSphepe" );
1131   MESSAGE("GEOM_Superv_i::MakeSphepe");
1132   getBasicOp();
1133   get3DPrimOp();
1134   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
1135   endService( " GEOM_Superv_i::MakeSphepe" );
1136   return anObj;
1137 }
1138
1139 //=============================================================================
1140 //  MakeSphereR:
1141 //=============================================================================
1142 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
1143 {
1144   beginService( " GEOM_Superv_i::MakeSphereR" );
1145   MESSAGE("GEOM_Superv_i::MakeSphereR");
1146   get3DPrimOp();
1147   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSphereR(theR);
1148   endService( " GEOM_Superv_i::MakeSphereR" );
1149   return anObj;
1150 }
1151
1152 //=============================================================================
1153 //  MakeSpherePntR:
1154 //=============================================================================
1155 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
1156                                                      CORBA::Double theR)
1157 {
1158   beginService( " GEOM_Superv_i::MakeSpherePntR" );
1159   MESSAGE("GEOM_Superv_i::MakeSpherePntR");
1160   get3DPrimOp();
1161   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(thePnt, theR);
1162   endService( " GEOM_Superv_i::MakeSpherePntR" );
1163   return anObj;
1164 }
1165
1166 //=============================================================================
1167 //  MakeTorusPntVecRR:
1168 //=============================================================================
1169 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
1170                                                         GEOM::GEOM_Object_ptr theVec,
1171                                                         CORBA::Double theRMajor,
1172                                                         CORBA::Double theRMinor)
1173 {
1174   beginService( " GEOM_Superv_i::MakeTorusPntVecRR" );
1175   MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
1176   get3DPrimOp();
1177   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
1178   endService( " GEOM_Superv_i::MakeTorusPntVecRR" );
1179   return anObj;
1180 }
1181
1182 //=============================================================================
1183 //  MakeTorusRR:
1184 //=============================================================================
1185 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor,
1186                                                   CORBA::Double theRMinor)
1187 {
1188   beginService( " GEOM_Superv_i::MakeTorusRR" );
1189   MESSAGE("GEOM_Superv_i::MakeTorusRR");
1190   get3DPrimOp();
1191   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
1192   endService( " GEOM_Superv_i::MakeTorusRR" );
1193   return anObj;
1194 }
1195
1196 //=============================================================================
1197 //  MakeConePntVecR1R2H:
1198 //=============================================================================
1199 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
1200                                                           GEOM::GEOM_Object_ptr theAxis,
1201                                                           CORBA::Double theR1,
1202                                                           CORBA::Double theR2,
1203                                                           CORBA::Double theHeight)
1204 {
1205   beginService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
1206   MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
1207   get3DPrimOp();
1208   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
1209   endService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
1210   return anObj;
1211 }
1212
1213 //=============================================================================
1214 //  MakeConeR1R2H:
1215 //=============================================================================
1216 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1,
1217                                                     CORBA::Double theR2,
1218                                                     CORBA::Double theHeight)
1219 {
1220   beginService( " GEOM_Superv_i::MakeConeR1R2H" );
1221   MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
1222   get3DPrimOp();
1223   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
1224   endService( " GEOM_Superv_i::MakeConeR1R2H" );
1225   return anObj;
1226 }
1227
1228 //=============================================================================
1229 //  MakePrismVecH:
1230 //=============================================================================
1231 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
1232                                                     GEOM::GEOM_Object_ptr theVec,
1233                                                     CORBA::Double         theH)
1234 {
1235   beginService( " GEOM_Superv_i::MakePrismVecH" );
1236   MESSAGE("GEOM_Superv_i::MakePrismVecH");
1237   get3DPrimOp();
1238   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
1239   endService( " GEOM_Superv_i::MakePrismVecH" );
1240   return anObj;
1241 }
1242
1243 //=============================================================================
1244 //  MakePrismVecH2Ways:
1245 //=============================================================================
1246 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
1247                                                          GEOM::GEOM_Object_ptr theVec,
1248                                                          CORBA::Double         theH)
1249 {
1250   beginService( " GEOM_Superv_i::MakePrismVecH2Ways" );
1251   MESSAGE("GEOM_Superv_i::MakePrismVecH2Ways");
1252   get3DPrimOp();
1253   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH2Ways(theBase, theVec, theH);
1254   endService( " GEOM_Superv_i::MakePrismVecH2Ways" );
1255   return anObj;
1256 }
1257
1258 //=============================================================================
1259 //  MakePrismTwoPnt:
1260 //=============================================================================
1261 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
1262                                                       GEOM::GEOM_Object_ptr thePoint1,
1263                                                       GEOM::GEOM_Object_ptr thePoint2)
1264 {
1265   beginService( " GEOM_Superv_i::MakePrismTwoPnt" );
1266   MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
1267   get3DPrimOp();
1268   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
1269   endService( " GEOM_Superv_i::MakePrismTwoPnt" );
1270   return anObj;
1271 }
1272
1273 //=============================================================================
1274 //  MakePrismTwoPnt2Ways:
1275 //=============================================================================
1276 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
1277                                                            GEOM::GEOM_Object_ptr thePoint1,
1278                                                            GEOM::GEOM_Object_ptr thePoint2)
1279 {
1280   beginService( " GEOM_Superv_i::MakePrismTwoPnt2Ways" );
1281   MESSAGE("GEOM_Superv_i::MakePrismTwoPnt2Ways");
1282   get3DPrimOp();
1283   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2);
1284   endService( " GEOM_Superv_i::MakePrismTwoPnt2Ways" );
1285   return anObj;
1286 }
1287
1288 //=============================================================================
1289 //  MakePrismDXDYDZ:
1290 //=============================================================================
1291 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismDXDYDZ (GEOM::GEOM_Object_ptr theBase,
1292                       CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ)
1293 {
1294   beginService( " GEOM_Superv_i::MakePrismDXDYDZ" );
1295   MESSAGE("GEOM_Superv_i::MakePrismDXDYDZ");
1296   get3DPrimOp();
1297   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismDXDYDZ(theBase, theDX, theDY, theDZ);
1298   endService( " GEOM_Superv_i::MakePrismDXDYDZ" );
1299   return anObj;
1300 }
1301
1302 //=============================================================================
1303 //  MakePrismDXDYDZ:
1304 //=============================================================================
1305 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismDXDYDZ2Ways (GEOM::GEOM_Object_ptr theBase,
1306                       CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ)
1307 {
1308   beginService( " GEOM_Superv_i::MakePrismDXDYDZ2Ways" );
1309   MESSAGE("GEOM_Superv_i::MakePrismDXDYDZ2Ways");
1310   get3DPrimOp();
1311   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ);
1312   endService( " GEOM_Superv_i::MakePrismDXDYDZ2Ways" );
1313   return anObj;
1314 }
1315
1316 //=============================================================================
1317 //  MakePipe:
1318 //=============================================================================
1319 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase,
1320                                                GEOM::GEOM_Object_ptr thePath)
1321 {
1322   beginService( " GEOM_Superv_i::MakePipe" );
1323   MESSAGE("GEOM_Superv_i::MakePipe");
1324   get3DPrimOp();
1325   GEOM::ListOfGO_var aList = my3DPrimOp->MakePipe(theBase, thePath, false);
1326   endService( " GEOM_Superv_i::MakePipe" );
1327   return aList[0];
1328 }
1329
1330 //=============================================================================
1331 //  MakeRevolutionAxisAngle:
1332 //=============================================================================
1333 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
1334                                                               GEOM::GEOM_Object_ptr theAxis,
1335                                                               CORBA::Double theAngle)
1336 {
1337   beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
1338   MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
1339   get3DPrimOp();
1340   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
1341   endService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
1342   return anObj;
1343 }
1344
1345 //=============================================================================
1346 //  MakeRevolutionAxisAngle:
1347 //=============================================================================
1348 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
1349                                                                    GEOM::GEOM_Object_ptr theAxis,
1350                                                                    CORBA::Double theAngle)
1351 {
1352   beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle2Ways" );
1353   MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle2Ways");
1354   get3DPrimOp();
1355   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle);
1356   endService( " GEOM_Superv_i::MakeRevolutionAxisAngle2Ways" );
1357   return anObj;
1358 }
1359
1360 //=============================================================================
1361 //  MakeFilling:
1362 //=============================================================================
1363 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
1364                                                   CORBA::Long theMinDeg,
1365                                                   CORBA::Long theMaxDeg,
1366                                                   CORBA::Double theTol2D,
1367                                                   CORBA::Double theTol3D,
1368                                                   CORBA::Long theNbIter,
1369                                                   GEOM::filling_oper_method theMethod,
1370                                                   CORBA::Boolean theApprox)
1371 {
1372   beginService( " GEOM_Superv_i::MakeFilling" );
1373   MESSAGE("GEOM_Superv_i::MakeFilling");
1374   get3DPrimOp();
1375   GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
1376   objList->length( 1 );
1377   objList[0] = theShape;
1378   GEOM::GEOM_Object_ptr anObj =
1379     my3DPrimOp->MakeFilling(objList, theMinDeg, theMaxDeg, theTol2D, theTol3D,
1380                             theNbIter, theMethod, theApprox);
1381   endService( " GEOM_Superv_i::MakeFilling" );
1382   return anObj;
1383 }
1384
1385 //============================= BooleanOperations =============================
1386 //=============================================================================
1387 //  MakeBoolean:
1388 //=============================================================================
1389 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean
1390                                         (GEOM::GEOM_Object_ptr theShape1,
1391                                          GEOM::GEOM_Object_ptr theShape2,
1392                                          CORBA::Long           theOperation)
1393 {
1394   beginService( " GEOM_Superv_i::MakeBoolean" );
1395   // theOperation indicates the operation to be done:
1396   // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
1397   MESSAGE("GEOM_Superv_i::MakeBoolean");
1398   getBoolOp();
1399   GEOM::GEOM_Object_ptr anObj =
1400     myBoolOp->MakeBoolean(theShape1, theShape2, theOperation, false);
1401   endService( " GEOM_Superv_i::MakeBoolean" );
1402   return anObj;
1403 }
1404
1405 //=============================================================================
1406 //  MakeThruSections:
1407 //=============================================================================
1408 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeThruSections(const GEOM::ListOfGO& theSeqSections,
1409                                          CORBA::Boolean theModeSolid,
1410                                          CORBA::Double thePreci,
1411                                          CORBA::Boolean theRuled)
1412 {
1413   beginService( " GEOM_Superv_i::MakeThruSections" );
1414   MESSAGE("GEOM_Superv_i::MakeThruSections");
1415   get3DPrimOp();
1416   GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeThruSections(theSeqSections, theModeSolid,thePreci,theRuled);
1417   endService( " GEOM_Superv_i::MakeThruSections" );
1418   return anObj;
1419 }
1420
1421 //=============================================================================
1422 //  MakePipe:
1423 //=============================================================================
1424 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithDifferentSections
1425                      (const GEOM::ListOfGO& theBases,
1426                       const GEOM::ListOfGO& theLocations,
1427                       GEOM::GEOM_Object_ptr thePath,
1428                       CORBA::Boolean theWithContact,
1429                       CORBA::Boolean theWithCorrections)
1430 {
1431   beginService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
1432   MESSAGE("GEOM_Superv_i::MakePipeWithDifferentSections");
1433   get3DPrimOp();
1434   GEOM::ListOfGO_var aList = my3DPrimOp->MakePipeWithDifferentSections(theBases,theLocations, thePath,theWithContact,theWithCorrections, false, false);
1435   endService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
1436   return aList[0];
1437 }
1438
1439
1440 //=============================================================================
1441 //  MakePipe:
1442 //=============================================================================
1443 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithShellSections
1444                    (const GEOM::ListOfGO& theBases,
1445                     const GEOM::ListOfGO& theSubBases,
1446                     const GEOM::ListOfGO& theLocations,
1447                     GEOM::GEOM_Object_ptr thePath,
1448                     CORBA::Boolean theWithContact,
1449                     CORBA::Boolean theWithCorrections)
1450 {
1451   beginService( " GEOM_Superv_i::MakePipeWithShellSections" );
1452   MESSAGE("GEOM_Superv_i::MakePipeWithShellSections");
1453   get3DPrimOp();
1454   GEOM::ListOfGO_var aList =
1455     my3DPrimOp->MakePipeWithShellSections(theBases, theSubBases,
1456                                           theLocations, thePath,
1457                                           theWithContact, theWithCorrections,
1458                                           false);
1459   endService( " GEOM_Superv_i::MakePipeWithShellSections" );
1460   return aList[0];
1461 }
1462
1463
1464 //=============================================================================
1465 //  MakePipe:
1466 //=============================================================================
1467 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeShellsWithoutPath
1468                    (const GEOM::ListOfGO& theBases,
1469                     const GEOM::ListOfGO& theLocations)
1470 {
1471   beginService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1472   MESSAGE("GEOM_Superv_i::MakePipeShellsWithoutPath");
1473   get3DPrimOp();
1474   GEOM::ListOfGO_var aList =
1475     my3DPrimOp->MakePipeShellsWithoutPath(theBases,theLocations, false);
1476   endService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1477   return aList[0];
1478 }
1479
1480
1481 //=============================================================================
1482 //  MakePipe:
1483 //=============================================================================
1484 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeBiNormalAlongVector
1485                                                 (GEOM::GEOM_Object_ptr theBase,
1486                                                  GEOM::GEOM_Object_ptr thePath,
1487                                                  GEOM::GEOM_Object_ptr theVec)
1488 {
1489   beginService( " GEOM_Superv_i::MakePipeBiNormalAlongVector" );
1490   MESSAGE("GEOM_Superv_i::MakePipeBiNormalAlongVector");
1491   get3DPrimOp();
1492   GEOM::ListOfGO_var aList =
1493     my3DPrimOp->MakePipeBiNormalAlongVector(theBase, thePath, theVec, false);
1494   endService( " GEOM_Superv_i::MakePipeBiNormalAlongVector" );
1495   return aList[0];
1496 }
1497
1498
1499 //=============================================================================
1500 //  MakeFuse:
1501 //=============================================================================
1502 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse
1503                                         (GEOM::GEOM_Object_ptr theShape1,
1504                                          GEOM::GEOM_Object_ptr theShape2)
1505 {
1506   beginService( " GEOM_Superv_i::MakeFuse" );
1507   MESSAGE("GEOM_Superv_i::MakeFuse");
1508   getBoolOp();
1509   GEOM::GEOM_Object_ptr anObj =
1510     myBoolOp->MakeBoolean(theShape1, theShape2, 3, false);
1511   endService( " GEOM_Superv_i::MakeFuse" );
1512   return anObj;
1513 }
1514
1515 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCommon (GEOM::GEOM_Object_ptr theShape1,
1516                                                  GEOM::GEOM_Object_ptr theShape2)
1517 {
1518   beginService( " GEOM_Superv_i::MakeCommon" );
1519   MESSAGE("GEOM_Superv_i::MakeCommon");
1520   getBoolOp();
1521   GEOM::GEOM_Object_ptr anObj =
1522     myBoolOp->MakeBoolean(theShape1, theShape2, 1, false);
1523   endService( " GEOM_Superv_i::MakeCommon" );
1524   return anObj;
1525 }
1526
1527 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCut (GEOM::GEOM_Object_ptr theShape1,
1528                                               GEOM::GEOM_Object_ptr theShape2)
1529 {
1530   beginService( " GEOM_Superv_i::MakeCut" );
1531   MESSAGE("GEOM_Superv_i::MakeCut");
1532   getBoolOp();
1533   GEOM::GEOM_Object_ptr anObj =
1534     myBoolOp->MakeBoolean(theShape1, theShape2, 2, false);
1535   endService( " GEOM_Superv_i::MakeCut" );
1536   return anObj;
1537 }
1538
1539 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSection (GEOM::GEOM_Object_ptr theShape1,
1540                                                   GEOM::GEOM_Object_ptr theShape2)
1541 {
1542   beginService( " GEOM_Superv_i::MakeCut" );
1543   MESSAGE("GEOM_Superv_i::MakeCut");
1544   getBoolOp();
1545   GEOM::GEOM_Object_ptr anObj =
1546     myBoolOp->MakeBoolean(theShape1, theShape2, 4, false);
1547   endService( " GEOM_Superv_i::MakeCut" );
1548   return anObj;
1549 }
1550
1551 //=============================================================================
1552 //  MakePartition:
1553 //=============================================================================
1554 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr   theShapes,
1555                                                     GEOM::GEOM_List_ptr   theTools,
1556                                                     GEOM::GEOM_List_ptr   theKeepInside,
1557                                                     GEOM::GEOM_List_ptr   theRemoveInside,
1558                                                     CORBA::Short      theLimit,
1559                                                     CORBA::Boolean    theRemoveWebs,
1560                                                     GEOM::GEOM_List_ptr theMaterials,
1561                                                     CORBA::Short theKeepNonlimitShapes)
1562 {
1563   beginService( " GEOM_Superv_i::MakePartition" );
1564   MESSAGE("GEOM_Superv_i::MakePartition");
1565   GEOM_List_i<GEOM::ListOfGO>* aListImplS =
1566     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in());
1567   GEOM_List_i<GEOM::ListOfGO>* aListImplT =
1568     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theTools, myPOA).in());
1569   GEOM_List_i<GEOM::ListOfGO>* aListImplKI =
1570     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theKeepInside, myPOA).in());
1571   GEOM_List_i<GEOM::ListOfGO>* aListImplRI =
1572     dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theRemoveInside, myPOA).in());
1573   GEOM_List_i<GEOM::ListOfLong>* aListImplM =
1574     dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theMaterials, myPOA).in());
1575   if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
1576     getBoolOp();
1577     GEOM::GEOM_Object_ptr anObj =
1578       myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(),
1579                               aListImplKI->GetList(), aListImplRI->GetList(),
1580                               theLimit, theRemoveWebs, aListImplM->GetList(),
1581                               theKeepNonlimitShapes);
1582     endService( " GEOM_Superv_i::MakePartition" );
1583     return anObj;
1584   }
1585   endService( " GEOM_Superv_i::MakePartition" );
1586   return NULL;
1587 }
1588
1589 //=============================================================================
1590 //  MakeHalfPartition:
1591 //=============================================================================
1592 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
1593                                                         GEOM::GEOM_Object_ptr thePlane)
1594 {
1595   beginService( " GEOM_Superv_i::MakeHalfPartition" );
1596   MESSAGE("GEOM_Superv_i::MakeHalfPartition");
1597   getBoolOp();
1598   GEOM::GEOM_Object_ptr anObj =
1599     myBoolOp->MakeHalfPartition(theShape, thePlane);
1600   endService( " GEOM_Superv_i::MakeHalfPartition" );
1601   return anObj;
1602 }
1603
1604 //============================== InsertOperations =============================
1605 //=============================================================================
1606 //  MakeCopy:
1607 //=============================================================================
1608 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
1609 {
1610   beginService( " GEOM_Superv_i::MakeCopy" );
1611   MESSAGE("GEOM_Superv_i::MakeCopy");
1612   getInsOp();
1613   GEOM::GEOM_Object_ptr anObj = myInsOp->MakeCopy(theOriginal);
1614   endService( " GEOM_Superv_i::MakeCopy" );
1615   return anObj;
1616 }
1617
1618 //=============================================================================
1619 //  Export:
1620 //=============================================================================
1621 void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject,
1622                             const char*           theFileName,
1623                             const char*           theFormatName)
1624 {
1625   beginService( " GEOM_Superv_i::Export" );
1626   MESSAGE("GEOM_Superv_i::Export");
1627   getInsOp();
1628   myInsOp->Export(theObject, theFileName, theFormatName);
1629   endService( " GEOM_Superv_i::Export" );
1630 }
1631
1632 //=============================================================================
1633 //  Import:
1634 //=============================================================================
1635 GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportFile (const char* theFileName,
1636                                                  const char* theFormatName)
1637 {
1638   beginService( " GEOM_Superv_i::ImportFile" );
1639   MESSAGE("GEOM_Superv_i::ImportFile");
1640   getInsOp();
1641   GEOM::ListOfGBO_var aSeq = myInsOp->ImportFile(theFileName, theFormatName);
1642   GEOM::GEOM_Object_var anObj;
1643   
1644   if (aSeq->length() > 0) {
1645     anObj = GEOM::GEOM_Object::_narrow(aSeq[0]);
1646   }
1647
1648   endService( " GEOM_Superv_i::ImportFile" );
1649   return anObj._retn();
1650 }
1651
1652 //============================= TransformOperations ===========================
1653 //=============================================================================
1654 //  TranslateTwoPoints:
1655 //=============================================================================
1656 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
1657                                                          GEOM::GEOM_Object_ptr thePoint1,
1658                                                          GEOM::GEOM_Object_ptr thePoint2)
1659 {
1660   beginService( " GEOM_Superv_i::TranslateTwoPoints" );
1661   MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
1662   getTransfOp();
1663   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
1664   endService( " GEOM_Superv_i::TranslateTwoPoints" );
1665   return anObj;
1666 }
1667
1668 //=============================================================================
1669 //  TranslateTwoPointsCopy:
1670 //=============================================================================
1671 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
1672                                                              GEOM::GEOM_Object_ptr thePoint1,
1673                                                              GEOM::GEOM_Object_ptr thePoint2)
1674 {
1675   beginService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1676   MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
1677   getTransfOp();
1678   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
1679   endService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1680   return anObj;
1681 }
1682
1683 //=============================================================================
1684 //  TranslateDXDYDZ:
1685 //=============================================================================
1686 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
1687                                                       CORBA::Double theDX,
1688                                                       CORBA::Double theDY,
1689                                                       CORBA::Double theDZ)
1690 {
1691   beginService( " GEOM_Superv_i::TranslateDXDYDZ" );
1692   MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
1693   getTransfOp();
1694   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
1695   endService( " GEOM_Superv_i::TranslateDXDYDZ" );
1696   return anObj;
1697 }
1698
1699 //=============================================================================
1700 //  TranslateDXDYDZCopy:
1701 //=============================================================================
1702 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
1703                                                           CORBA::Double theDX,
1704                                                           CORBA::Double theDY,
1705                                                           CORBA::Double theDZ)
1706 {
1707   beginService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1708   MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
1709   getTransfOp();
1710   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
1711   endService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1712   return anObj;
1713 }
1714
1715 //=============================================================================
1716 //  TranslateVector:
1717 //=============================================================================
1718 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject,
1719                                                       GEOM::GEOM_Object_ptr theVector)
1720 {
1721   beginService( " GEOM_Superv_i::TranslateVector" );
1722   MESSAGE("GEOM_Superv_i::TranslateVector");
1723   getTransfOp();
1724   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVector(theObject, theVector);
1725   endService( " GEOM_Superv_i::TranslateVector" );
1726   return anObj;
1727 }
1728
1729 //=============================================================================
1730 //  TranslateVectorCopy:
1731 //=============================================================================
1732 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
1733                                                           GEOM::GEOM_Object_ptr theVector)
1734 {
1735   beginService( " GEOM_Superv_i::TranslateVectorCopy" );
1736   MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
1737   getTransfOp();
1738   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorCopy(theObject, theVector);
1739   endService( " GEOM_Superv_i::TranslateVectorCopy" );
1740   return anObj;
1741 }
1742
1743 //=============================================================================
1744 //  TranslateVectorDistance:
1745 //=============================================================================
1746 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
1747                                                               GEOM::GEOM_Object_ptr theVector,
1748                                                               CORBA::Double theDistance,
1749                                                               CORBA::Boolean theCopy)
1750 {
1751   beginService( " GEOM_Superv_i::TranslateVectorDistance" );
1752   MESSAGE("GEOM_Superv_i::TranslateVectorDistance");
1753   getTransfOp();
1754   GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorDistance(theObject,
1755                                                                     theVector, theDistance, theCopy);
1756   endService( " GEOM_Superv_i::TranslateVectorDistance" );
1757   return anObj;
1758 }
1759
1760 //=============================================================================
1761 //  MultiTranslate1D:
1762 //=============================================================================
1763 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
1764                                                        GEOM::GEOM_Object_ptr theVector,
1765                                                        CORBA::Double theStep,
1766                                                        CORBA::Long theNbTimes)
1767 {
1768   beginService( " GEOM_Superv_i::MultiTranslate1D" );
1769   MESSAGE("GEOM_Superv_i::MultiTranslate1D");
1770   getTransfOp();
1771   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
1772   endService( " GEOM_Superv_i::MultiTranslate1D" );
1773   return anObj;
1774 }
1775
1776 //=============================================================================
1777 //  MultiTranslate2D:
1778 //=============================================================================
1779 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
1780                                                        GEOM::GEOM_Object_ptr theVector1,
1781                                                        CORBA::Double theStep1,
1782                                                        CORBA::Long theNbTimes1,
1783                                                        GEOM::GEOM_Object_ptr theVector2,
1784                                                        CORBA::Double theStep2,
1785                                                        CORBA::Long theNbTimes2)
1786 {
1787   beginService( " GEOM_Superv_i::MultiTranslate2D" );
1788   MESSAGE("GEOM_Superv_i::MultiTranslate2D");
1789   getTransfOp();
1790   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
1791                                                              theVector2, theStep2, theNbTimes2);
1792   endService( " GEOM_Superv_i::MultiTranslate2D" );
1793   return anObj;
1794 }
1795
1796 //=============================================================================
1797 //  Rotate:
1798 //=============================================================================
1799 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
1800                                              GEOM::GEOM_Object_ptr theAxis,
1801                                              CORBA::Double theAngle)
1802 {
1803   beginService( " GEOM_Superv_i::Rotate" );
1804   MESSAGE("GEOM_Superv_i::Rotate");
1805   getTransfOp();
1806   GEOM::GEOM_Object_ptr anObj = myTransfOp->Rotate(theObject, theAxis, theAngle);
1807   endService( " GEOM_Superv_i::Rotate" );
1808   return anObj;
1809 }
1810
1811 //=============================================================================
1812 //  RotateCopy:
1813 //=============================================================================
1814 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
1815                                                  GEOM::GEOM_Object_ptr theAxis,
1816                                                  CORBA::Double theAngle)
1817 {
1818   beginService( " GEOM_Superv_i::RotateCopy" );
1819   MESSAGE("GEOM_Superv_i::RotateCopy");
1820   getTransfOp();
1821   GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateCopy(theObject, theAxis, theAngle);
1822   endService( " GEOM_Superv_i::RotateCopy" );
1823   return anObj;
1824 }
1825 //=============================================================================
1826 //  RotateThreePoints:
1827 //=============================================================================
1828 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
1829                                                         GEOM::GEOM_Object_ptr theCentPoint,
1830                                                         GEOM::GEOM_Object_ptr thePoint1,
1831                                                         GEOM::GEOM_Object_ptr thePoint2)
1832 {
1833   beginService( " GEOM_Superv_i::RotateThreePoints" );
1834   MESSAGE("GEOM_Superv_i::RotateThreePoints");
1835   getTransfOp();
1836   GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2);
1837   endService( " GEOM_Superv_i::RotateThreePoints" );
1838   return anObj;
1839 }
1840
1841 //=============================================================================
1842 //  RotateThreePointsCopy:
1843 //=============================================================================
1844 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
1845                                                             GEOM::GEOM_Object_ptr theCentPoint,
1846                                                             GEOM::GEOM_Object_ptr thePoint1,
1847                                                             GEOM::GEOM_Object_ptr thePoint2)
1848 {
1849   beginService( " GEOM_Superv_i::RotateThreePointsCopy" );
1850   MESSAGE("GEOM_Superv_i::RotateThreePointsCopy");
1851   getTransfOp();
1852   GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2);
1853   endService( " GEOM_Superv_i::RotateThreePointsCopy" );
1854   return anObj;
1855 }
1856
1857 //=============================================================================
1858 //  MultiRotate1D:
1859 //=============================================================================
1860 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1861                                                     GEOM::GEOM_Object_ptr theAxis,
1862                                                     CORBA::Long theNbTimes)
1863 {
1864   beginService( " GEOM_Superv_i::MultiRotate1D" );
1865   MESSAGE("GEOM_Superv_i::MultiRotate1D");
1866   getTransfOp();
1867   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
1868   endService( " GEOM_Superv_i::MultiRotate1D" );
1869   return anObj;
1870 }
1871
1872 //=============================================================================
1873 //  MultiRotate2D:
1874 //=============================================================================
1875 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1876                                                     GEOM::GEOM_Object_ptr theAxis,
1877                                                     CORBA::Double theAngle,
1878                                                     CORBA::Long theNbTimes1,
1879                                                     CORBA::Double theStep,
1880                                                     CORBA::Long theNbTimes2)
1881 {
1882   beginService( " GEOM_Superv_i::MultiRotate2D" );
1883   MESSAGE("GEOM_Superv_i::MultiRotate2D");
1884   getTransfOp();
1885   GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
1886   endService( " GEOM_Superv_i::MultiRotate2D" );
1887   return anObj;
1888 }
1889
1890 //=============================================================================
1891 //  MirrorPlane:
1892 //=============================================================================
1893 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject,
1894                                                   GEOM::GEOM_Object_ptr thePlane)
1895 {
1896   beginService( " GEOM_Superv_i::MirrorPlane" );
1897   MESSAGE("GEOM_Superv_i::MirrorPlane");
1898   getTransfOp();
1899   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlane(theObject, thePlane);
1900   endService( " GEOM_Superv_i::MirrorPlane" );
1901   return anObj;
1902 }
1903
1904 //=============================================================================
1905 //  MirrorPlaneCopy:
1906 //=============================================================================
1907 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
1908                                                       GEOM::GEOM_Object_ptr thePlane)
1909 {
1910   beginService( " GEOM_Superv_i::MirrorPlaneCopy" );
1911   MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
1912   getTransfOp();
1913   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlaneCopy(theObject, thePlane);
1914   endService( " GEOM_Superv_i::MirrorPlaneCopy" );
1915   return anObj;
1916 }
1917
1918 //=============================================================================
1919 //  MirrorAxis:
1920 //=============================================================================
1921 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject,
1922                                                  GEOM::GEOM_Object_ptr theAxis)
1923 {
1924   beginService( " GEOM_Superv_i::MirrorAxis" );
1925   MESSAGE("GEOM_Superv_i::MirrorAxis");
1926   getTransfOp();
1927   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxis(theObject, theAxis);
1928   endService( " GEOM_Superv_i::MirrorAxis" );
1929   return anObj;
1930 }
1931
1932 //=============================================================================
1933 //  MirrorAxisCopy:
1934 //=============================================================================
1935 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
1936                                                      GEOM::GEOM_Object_ptr theAxis)
1937 {
1938   beginService( " GEOM_Superv_i::MirrorAxisCopy" );
1939   MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
1940   getTransfOp();
1941   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxisCopy(theObject, theAxis);
1942   endService( " GEOM_Superv_i::MirrorAxisCopy" );
1943   return anObj;
1944 }
1945
1946 //=============================================================================
1947 //  MirrorPoint:
1948 //=============================================================================
1949 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject,
1950                                                   GEOM::GEOM_Object_ptr thePoint)
1951 {
1952   beginService( " GEOM_Superv_i::MirrorPoint" );
1953   MESSAGE("GEOM_Superv_i::MirrorPoint");
1954   getTransfOp();
1955   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPoint(theObject, thePoint);
1956   endService( " GEOM_Superv_i::MirrorPoint" );
1957   return anObj;
1958 }
1959
1960 //=============================================================================
1961 //  MirrorPointCopy:
1962 //=============================================================================
1963 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
1964                                                       GEOM::GEOM_Object_ptr thePoint)
1965 {
1966   beginService( " GEOM_Superv_i::MirrorPoint" );
1967   MESSAGE("GEOM_Superv_i::MirrorPointCopy");
1968   getTransfOp();
1969   GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPointCopy(theObject, thePoint);
1970   endService( " GEOM_Superv_i::MirrorPoint" );
1971   return anObj;
1972 }
1973
1974 //=============================================================================
1975 //  OffsetShape:
1976 //=============================================================================
1977 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject,
1978                                                   CORBA::Double theOffset)
1979 {
1980   beginService( " GEOM_Superv_i::OffsetShape" );
1981   MESSAGE("GEOM_Superv_i::OffsetShape");
1982   getTransfOp();
1983   GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset, true);
1984   endService( " GEOM_Superv_i::OffsetShape" );
1985   return anObj;
1986 }
1987
1988 //=============================================================================
1989 //  OffsetShapeCopy:
1990 //=============================================================================
1991 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
1992                                                       CORBA::Double theOffset)
1993 {
1994   beginService( " GEOM_Superv_i::OffsetShapeCopy" );
1995   MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1996   getTransfOp();
1997   GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset, true);
1998   endService( " GEOM_Superv_i::OffsetShapeCopy" );
1999   return anObj;
2000 }
2001
2002 //=============================================================================
2003 //  ScaleShape:
2004 //=============================================================================
2005 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject,
2006                                                  GEOM::GEOM_Object_ptr thePoint,
2007                                                  CORBA::Double theFactor)
2008 {
2009   beginService( " GEOM_Superv_i::ScaleShape" );
2010   MESSAGE("GEOM_Superv_i::ScaleShape");
2011   getTransfOp();
2012   GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShape(theObject, thePoint, theFactor);
2013   endService( " GEOM_Superv_i::ScaleShape" );
2014   return anObj;
2015 }
2016
2017 //=============================================================================
2018 //  ScaleShapeCopy:
2019 //=============================================================================
2020 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
2021                                                      GEOM::GEOM_Object_ptr thePoint,
2022                                                      CORBA::Double theFactor)
2023 {
2024   beginService( " GEOM_Superv_i::ScaleShapeCopy" );
2025   MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
2026   getTransfOp();
2027   GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
2028   endService( " GEOM_Superv_i::ScaleShapeCopy" );
2029   return anObj;
2030 }
2031
2032 //=============================================================================
2033 //  ScaleShapeAlongAxes:
2034 //=============================================================================
2035 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject,
2036                                                           GEOM::GEOM_Object_ptr thePoint,
2037                                                           CORBA::Double theFactorX,
2038                                                           CORBA::Double theFactorY,
2039                                                           CORBA::Double theFactorZ)
2040 {
2041   beginService( " GEOM_Superv_i::ScaleShapeAlongAxes" );
2042   MESSAGE("GEOM_Superv_i::ScaleShapeAlongAxes");
2043   getTransfOp();
2044   GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeAlongAxes
2045     (theObject, thePoint, theFactorX, theFactorY, theFactorZ);
2046   endService( " GEOM_Superv_i::ScaleShapeAlongAxes" );
2047   return anObj;
2048 }
2049
2050 //=============================================================================
2051 //  ScaleShapeAlongAxesCopy:
2052 //=============================================================================
2053 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject,
2054                                                               GEOM::GEOM_Object_ptr thePoint,
2055                                                               CORBA::Double theFactorX,
2056                                                               CORBA::Double theFactorY,
2057                                                               CORBA::Double theFactorZ)
2058 {
2059   beginService( " GEOM_Superv_i::ScaleShapeAlongAxesCopy" );
2060   MESSAGE("GEOM_Superv_i::ScaleShapeAlongAxesCopy");
2061   getTransfOp();
2062   GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeAlongAxesCopy
2063     (theObject, thePoint, theFactorX, theFactorY, theFactorZ);
2064   endService( " GEOM_Superv_i::ScaleShapeAlongAxesCopy" );
2065   return anObj;
2066 }
2067
2068 //=============================================================================
2069 //  PositionShape:
2070 //=============================================================================
2071 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
2072                                                     GEOM::GEOM_Object_ptr theStartLCS,
2073                                                     GEOM::GEOM_Object_ptr theEndLCS)
2074 {
2075   beginService( " GEOM_Superv_i::PositionShape" );
2076   MESSAGE("GEOM_Superv_i::PositionShape");
2077   getTransfOp();
2078   GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
2079   endService( " GEOM_Superv_i::PositionShape" );
2080   return anObj;
2081 }
2082
2083 //=============================================================================
2084 //  PositionShapeCopy:
2085 //=============================================================================
2086 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
2087                                                         GEOM::GEOM_Object_ptr theStartLCS,
2088                                                         GEOM::GEOM_Object_ptr theEndLCS)
2089 {
2090   beginService( " GEOM_Superv_i::PositionShapeCopy" );
2091   MESSAGE("GEOM_Superv_i::PositionShapeCopy");
2092   getTransfOp();
2093   GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
2094   endService( " GEOM_Superv_i::PositionShapeCopy" );
2095   return anObj;
2096 }
2097
2098 //=============================================================================
2099 //  PositionAlongPath:
2100 //=============================================================================
2101 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionAlongPath (GEOM::GEOM_Object_ptr theObject,
2102                                                         GEOM::GEOM_Object_ptr thePath,
2103                                                         CORBA::Double         theDistance,
2104                                                         CORBA::Boolean        theCopy,
2105                                                         CORBA::Boolean        theReverse)
2106 {
2107   beginService( " GEOM_Superv_i::PositionAlongPath" );
2108   MESSAGE("GEOM_Superv_i::PositionAlongPath");
2109   getTransfOp();
2110   GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse);
2111   endService( " GEOM_Superv_i::PositionAlongPath" );
2112   return anObj;
2113 }
2114
2115 //=============================== ShapesOperations ============================
2116 //=============================================================================
2117 //  Make:
2118 //=============================================================================
2119 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
2120                                                GEOM::GEOM_Object_ptr thePnt2)
2121 {
2122   beginService( " GEOM_Superv_i::MakeEdge" );
2123   MESSAGE("GEOM_Superv_i::MakeEdge");
2124   getShapesOp();
2125   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeEdge(thePnt1, thePnt2);
2126   endService( " GEOM_Superv_i::MakeEdge" );
2127   return anObj;
2128 }
2129
2130 //=============================================================================
2131 //  MakeEdgeOnCurveByLength:
2132 //=============================================================================
2133 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdgeOnCurveByLength (GEOM::GEOM_Object_ptr theRefCurve,
2134                                                               CORBA::Double theLength,
2135                                                               GEOM::GEOM_Object_ptr theStartPoint)
2136 {
2137   beginService( " GEOM_Superv_i::MakeEdgeOnCurveByLength" );
2138   MESSAGE("GEOM_Superv_i::MakeEdgeOnCurveByLength");
2139   getShapesOp();
2140   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint);
2141   endService( " GEOM_Superv_i::MakeEdgeOnCurveByLength" );
2142   return anObj;
2143 }
2144
2145 //=============================================================================
2146 //  MakeWire:
2147 //=============================================================================
2148 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires,
2149                                                CORBA::Double       theTolerance)
2150 {
2151   beginService( " GEOM_Superv_i::MakeWire" );
2152   MESSAGE("GEOM_Superv_i::MakeWire");
2153   if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW =
2154       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
2155     getShapesOp();
2156     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeWire(aListImplEW->GetList(), theTolerance);
2157     endService( " GEOM_Superv_i::MakeWire" );
2158     return anObj;
2159   }
2160   endService( " GEOM_Superv_i::MakeWire" );
2161   return NULL;
2162 }
2163
2164 //=============================================================================
2165 //  MakeFace:
2166 //=============================================================================
2167 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
2168                                                CORBA::Boolean isPlanarWanted)
2169 {
2170   beginService( " GEOM_Superv_i::MakeFace" );
2171   MESSAGE("GEOM_Superv_i::MakeFace");
2172   getShapesOp();
2173   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFace(theWire, isPlanarWanted);
2174   endService( " GEOM_Superv_i::MakeFace" );
2175   return anObj;
2176 }
2177
2178 //=============================================================================
2179 //  MakeFaceWires:
2180 //=============================================================================
2181 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires,
2182                                                     CORBA::Boolean isPlanarWanted)
2183 {
2184   beginService( " GEOM_Superv_i::MakeFaceWires" );
2185   MESSAGE("GEOM_Superv_i::MakeFaceWires");
2186   if (GEOM_List_i<GEOM::ListOfGO>* aListImplW =
2187       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
2188     getShapesOp();
2189     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
2190     endService( " GEOM_Superv_i::MakeFaceWires" );
2191     return anObj;
2192   }
2193   endService( " GEOM_Superv_i::MakeFaceWires" );
2194   return NULL;
2195 }
2196
2197 //=============================================================================
2198 //  MakeFaceWithConstraints:
2199 //=============================================================================
2200 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWithConstraints (GEOM::GEOM_List_ptr theConstraints)
2201 {
2202   beginService( " GEOM_Superv_i::MakeFaceWithConstraints" );
2203   MESSAGE("GEOM_Superv_i::MakeFaceWithConstraints");
2204   if (GEOM_List_i<GEOM::ListOfGO>* aConstraints =
2205       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theConstraints, myPOA).in())) {
2206     getShapesOp();
2207     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFaceWithConstraints(aConstraints->GetList());
2208     endService( " GEOM_Superv_i::MakeFaceWithConstraints" );
2209     return anObj;
2210   }
2211   endService( " GEOM_Superv_i::MakeFaceWithConstraints" );
2212   return NULL;
2213 }
2214
2215 //=============================================================================
2216 //  MakeShell:
2217 //=============================================================================
2218 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells)
2219 {
2220   beginService( " GEOM_Superv_i::MakeShell" );
2221   MESSAGE("GEOM_Superv_i::MakeShell");
2222   if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS =
2223       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
2224     getShapesOp();
2225     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeShell(aListImplFS->GetList());
2226     endService( " GEOM_Superv_i::MakeShell" );
2227     return anObj;
2228   }
2229   endService( " GEOM_Superv_i::MakeShell" );
2230   return NULL;
2231 }
2232
2233 //=============================================================================
2234 //  MakeSolidShell:
2235 //=============================================================================
2236 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
2237 {
2238   beginService( " GEOM_Superv_i::MakeSolidShell" );
2239   MESSAGE("GEOM_Superv_i::MakeSolidShell");
2240   getShapesOp();
2241   GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShell(theShell);
2242   endService( " GEOM_Superv_i::MakeSolidShell" );
2243   return anObj;
2244 }
2245
2246 //=============================================================================
2247 //  MakeSolidShells:
2248 //=============================================================================
2249 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells)
2250 {
2251   beginService( " GEOM_Superv_i::MakeSolidShells" );
2252   MESSAGE("GEOM_Superv_i::MakeSolidShells");
2253   if (GEOM_List_i<GEOM::ListOfGO>* aListImplS =
2254       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
2255     getShapesOp();
2256     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShells(aListImplS->GetList());
2257     endService( " GEOM_Superv_i::MakeSolidShells" );
2258     return anObj;
2259   }
2260   endService( " GEOM_Superv_i::MakeSolidShells" );
2261   return NULL;
2262 }
2263
2264 //=============================================================================
2265 //  MakeCompound:
2266 //=============================================================================
2267 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes)
2268 {
2269   beginService( " GEOM_Superv_i::MakeCompound" );
2270   MESSAGE("GEOM_Superv_i::MakeCompound");
2271   if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
2272       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
2273     getShapesOp();
2274     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeCompound(aListImpl->GetList());
2275     endService( " GEOM_Superv_i::MakeCompound" );
2276     return anObj;
2277   }
2278   endService( " GEOM_Superv_i::MakeCompound" );
2279   return NULL;
2280 }
2281
2282 //=============================================================================
2283 //  MakeSolidFromConnectedFaces:
2284 //=============================================================================
2285 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidFromConnectedFaces (GEOM::GEOM_List_ptr theFacesOrShells,
2286                                                                   CORBA::Boolean isIntersect)
2287 {
2288   beginService( " GEOM_Superv_i::MakeSolidFromConnectedFaces" );
2289   MESSAGE("GEOM_Superv_i::MakeSolidFromConnectedFaces");
2290   if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
2291       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesOrShells, myPOA).in())) {
2292     getShapesOp();
2293     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidFromConnectedFaces(aListImpl->GetList(), isIntersect);
2294     endService( " GEOM_Superv_i::MakeSolidFromConnectedFaces" );
2295     return anObj;
2296   }
2297   endService( " GEOM_Superv_i::MakeSolidFromConnectedFaces" );
2298   return NULL;
2299 }
2300
2301 //=============================================================================
2302 //  MakeGlueFaces:
2303 //=============================================================================
2304 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
2305                                                     CORBA::Double   theTolerance,
2306                                                     CORBA::Boolean doKeepNonSolids)
2307 {
2308   beginService( " GEOM_Superv_i::MakeGlueFaces" );
2309   MESSAGE("GEOM_Superv_i::MakeGlueFaces");
2310   getShapesOp();
2311   GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
2312   objList->length( 1 );
2313   objList[0] = theShape;
2314   GEOM::GEOM_Object_ptr anObj =
2315     myShapesOp->MakeGlueFaces(objList, theTolerance, doKeepNonSolids);
2316   endService( " GEOM_Superv_i::MakeGlueFaces" );
2317   return anObj;
2318 }
2319
2320 //=============================================================================
2321 //  GetGlueFaces:
2322 //=============================================================================
2323 GEOM::GEOM_List_ptr GEOM_Superv_i::GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
2324                                                  CORBA::Double theTolerance)
2325 {
2326   beginService( " GEOM_Superv_i::GetGlueFaces" );
2327   MESSAGE("GEOM_Superv_i::GetGlueFaces");
2328   getShapesOp();
2329   GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
2330   objList->length( 1 );
2331   objList[0] = theShape;
2332   GEOM::ListOfGO* aList = myShapesOp->GetGlueFaces(objList, theTolerance);
2333   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
2334   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2335   endService( " GEOM_Superv_i::GetGlueFaces" );
2336   return aListPtr->_this();
2337 }
2338
2339 //=============================================================================
2340 //  MakeGlueFacesByList:
2341 //=============================================================================
2342 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
2343                                                           CORBA::Double theTolerance,
2344                                                           const GEOM::ListOfGO& theFaces,
2345                                                           CORBA::Boolean doKeepNonSolids,
2346                                                           CORBA::Boolean doGlueAllEdges)
2347 {
2348   beginService( " GEOM_Superv_i::MakeGlueFacesByList" );
2349   MESSAGE("GEOM_Superv_i::MakeGlueFacesByList");
2350   getShapesOp();
2351   GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
2352   objList->length( 1 );
2353   objList[0] = theShape;
2354   GEOM::GEOM_Object_ptr anObj =
2355     myShapesOp->MakeGlueFacesByList(objList, theTolerance, theFaces,
2356                                     doKeepNonSolids, doGlueAllEdges);
2357   endService( " GEOM_Superv_i::MakeGlueFacesByList" );
2358   return anObj;
2359 }
2360
2361 //=============================================================================
2362 //  MakeExplode:
2363 //=============================================================================
2364 GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
2365                                                     CORBA::Long theShapeType,
2366                                                     CORBA::Boolean isSorted)
2367 {
2368   beginService( " GEOM_Superv_i::MakeExplode" );
2369   MESSAGE("GEOM_Superv_i::MakeExplode");
2370   getShapesOp();
2371
2372   GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
2373   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
2374   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2375   endService( " GEOM_Superv_i::MakeExplode" );
2376   return aListPtr->_this();
2377 }
2378
2379 //=============================================================================
2380 //  NumberOfFaces:
2381 //=============================================================================
2382 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
2383 {
2384   beginService( " GEOM_Superv_i::NumberOfFaces" );
2385   MESSAGE("GEOM_Superv_i::NumberOfFaces");
2386   getShapesOp();
2387   CORBA::Long aRes = myShapesOp->NumberOfFaces(theShape);
2388   endService( " GEOM_Superv_i::NumberOfFaces" );
2389   return aRes;
2390 }
2391
2392 //=============================================================================
2393 //  NumberOfEdges:
2394 //=============================================================================
2395 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
2396 {
2397   beginService( " GEOM_Superv_i::NumberOfEdges" );
2398   MESSAGE("GEOM_Superv_i::NumberOfEdges");
2399   getShapesOp();
2400   CORBA::Long aRes = myShapesOp->NumberOfEdges(theShape);
2401   endService( " GEOM_Superv_i::NumberOfEdges" );
2402   return aRes;
2403 }
2404
2405
2406 //=============================================================================
2407 //  ChangeOrientation:
2408 //=============================================================================
2409 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
2410 {
2411   beginService( " GEOM_Superv_i::ChangeOrientation" );
2412   MESSAGE("GEOM_Superv_i::ChangeOrientation");
2413   getShapesOp();
2414   GEOM::GEOM_Object_ptr anObj = myShapesOp->ChangeOrientation(theShape);
2415   endService( " GEOM_Superv_i::ChangeOrientation" );
2416   return anObj;
2417 }
2418
2419
2420 //=============================================================================
2421 //  GetShapesOnShape:
2422 //=============================================================================
2423 GEOM::GEOM_List_ptr GEOM_Superv_i::GetShapesOnShape
2424                                           (GEOM::GEOM_Object_ptr theCheckShape,
2425                                            GEOM::GEOM_Object_ptr theShape,
2426                                            CORBA::Short theShapeType,
2427                                            GEOM::shape_state theState)
2428 {
2429   beginService( " GEOM_Superv_i::GetShapesOnShape" );
2430   MESSAGE("GEOM_Superv_i::GetShapesOnShape");
2431   getShapesOp();
2432   GEOM::ListOfGO* aList =
2433     myShapesOp->GetShapesOnShape(theCheckShape, theShape, theShapeType, theState);
2434   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
2435   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2436   endService( " GEOM_Superv_i::GetShapesOnShape" );
2437   return aListPtr->_this();
2438 }
2439
2440
2441 //=============================================================================
2442 //  GetShapesOnShapeAsCompound:
2443 //=============================================================================
2444 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetShapesOnShapeAsCompound
2445                                           (GEOM::GEOM_Object_ptr theCheckShape,
2446                                            GEOM::GEOM_Object_ptr theShape,
2447                                            CORBA::Short theShapeType,
2448                                            GEOM::shape_state theState)
2449 {
2450   beginService( " GEOM_Superv_i::GetShapesOnShapeAsCompound" );
2451   MESSAGE("GEOM_Superv_i::GetShapesOnShapeAsCompound");
2452   getShapesOp();
2453   GEOM::GEOM_Object_ptr anObj =
2454     myShapesOp->GetShapesOnShapeAsCompound(theCheckShape, theShape, theShapeType, theState);
2455   endService( " GEOM_Superv_i::GetShapesOnShapeAsCompound" );
2456   return anObj;
2457 }
2458
2459
2460 //=============================== BlocksOperations ============================
2461 //=============================================================================
2462 //  MakeQuad4Vertices:
2463 //=============================================================================
2464 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
2465                                                         GEOM::GEOM_Object_ptr thePnt2,
2466                                                         GEOM::GEOM_Object_ptr thePnt3,
2467                                                         GEOM::GEOM_Object_ptr thePnt4)
2468 {
2469   beginService( " GEOM_Superv_i::MakeQuad4Vertices" );
2470   MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
2471   getBlocksOp();
2472   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
2473   endService( " GEOM_Superv_i::MakeQuad4Vertices" );
2474   return anObj;
2475 }
2476
2477 //=============================================================================
2478 //  MakeQuad:
2479 //=============================================================================
2480 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
2481                                                GEOM::GEOM_Object_ptr theEdge2,
2482                                                GEOM::GEOM_Object_ptr theEdge3,
2483                                                GEOM::GEOM_Object_ptr theEdge4)
2484 {
2485   beginService( " GEOM_Superv_i::MakeQuad" );
2486   MESSAGE("GEOM_Superv_i::MakeQuad");
2487   getBlocksOp();
2488   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
2489   endService( " GEOM_Superv_i::MakeQuad" );
2490   return anObj;
2491 }
2492
2493 //=============================================================================
2494 //  MakeQuad2Edges:
2495 //=============================================================================
2496 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
2497                                                      GEOM::GEOM_Object_ptr theEdge2)
2498 {
2499   beginService( " GEOM_Superv_i::MakeQuad2Edges" );
2500   MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
2501   getBlocksOp();
2502   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
2503   endService( " GEOM_Superv_i::MakeQuad2Edges" );
2504   return anObj;
2505 }
2506
2507 //=============================================================================
2508 //  MakeHexa:
2509 //=============================================================================
2510 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
2511                                                GEOM::GEOM_Object_ptr theFace2,
2512                                                GEOM::GEOM_Object_ptr theFace3,
2513                                                GEOM::GEOM_Object_ptr theFace4,
2514                                                GEOM::GEOM_Object_ptr theFace5,
2515                                                GEOM::GEOM_Object_ptr theFace6)
2516 {
2517   beginService( " GEOM_Superv_i::MakeHexa" );
2518   MESSAGE("GEOM_Superv_i::MakeHexa");
2519   getBlocksOp();
2520   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
2521   endService( " GEOM_Superv_i::MakeHexa" );
2522   return anObj;
2523 }
2524
2525 //=============================================================================
2526 //  MakeHexa2Faces:
2527 //=============================================================================
2528 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
2529                                                      GEOM::GEOM_Object_ptr theFace2)
2530 {
2531   beginService( " GEOM_Superv_i::MakeHexa2Faces" );
2532   MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
2533   getBlocksOp();
2534   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
2535   endService( " GEOM_Superv_i::MakeHexa2Faces" );
2536   return anObj;
2537 }
2538
2539 //=============================================================================
2540 //  GetPoint:
2541 //=============================================================================
2542 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
2543                                                CORBA::Double   theX,
2544                                                CORBA::Double   theY,
2545                                                CORBA::Double   theZ,
2546                                                CORBA::Double   theEpsilon)
2547 {
2548   beginService( " GEOM_Superv_i::GetPoint" );
2549   MESSAGE("GEOM_Superv_i::GetPoint");
2550   getBlocksOp();
2551   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
2552   endService( " GEOM_Superv_i::GetPoint" );
2553   return anObj;
2554 }
2555
2556 //=============================================================================
2557 //  GetEdge:
2558 //=============================================================================
2559 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
2560                                               GEOM::GEOM_Object_ptr thePoint1,
2561                                               GEOM::GEOM_Object_ptr thePoint2)
2562 {
2563   beginService( " GEOM_Superv_i::GetEdge" );
2564   MESSAGE("GEOM_Superv_i::GetEdge");
2565   getBlocksOp();
2566   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
2567   endService( " GEOM_Superv_i::GetEdge" );
2568   return anObj;
2569 }
2570
2571 //=============================================================================
2572 //  GetEdgeNearPoint:
2573 //=============================================================================
2574 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
2575                                                        GEOM::GEOM_Object_ptr thePoint)
2576 {
2577   beginService( " GEOM_Superv_i::GetEdgeNearPoint" );
2578   MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
2579   getBlocksOp();
2580   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
2581   endService( " GEOM_Superv_i::GetEdgeNearPoint" );
2582   return anObj;
2583 }
2584
2585 //=============================================================================
2586 //  GetFaceByPoints:
2587 //=============================================================================
2588 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
2589                                                       GEOM::GEOM_Object_ptr thePoint1,
2590                                                       GEOM::GEOM_Object_ptr thePoint2,
2591                                                       GEOM::GEOM_Object_ptr thePoint3,
2592                                                       GEOM::GEOM_Object_ptr thePoint4)
2593 {
2594   beginService( " GEOM_Superv_i::GetFaceByPoints" );
2595   MESSAGE("GEOM_Superv_i::GetFaceByPoints");
2596   getBlocksOp();
2597   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
2598   endService( " GEOM_Superv_i::GetFaceByPoints" );
2599   return anObj;
2600 }
2601
2602 //=============================================================================
2603 //  GetFaceByEdges:
2604 //=============================================================================
2605 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
2606                                                      GEOM::GEOM_Object_ptr theEdge1,
2607                                                      GEOM::GEOM_Object_ptr theEdge2)
2608 {
2609   beginService( " GEOM_Superv_i::GetFaceByEdges" );
2610   MESSAGE("GEOM_Superv_i::GetFaceByEdges");
2611   getBlocksOp();
2612   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
2613   endService( " GEOM_Superv_i::GetFaceByEdges" );
2614   return anObj;
2615 }
2616
2617 //=============================================================================
2618 //  GetOppositeFace:
2619 //=============================================================================
2620 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
2621                                                       GEOM::GEOM_Object_ptr theFace)
2622 {
2623   beginService( " GEOM_Superv_i::GetOppositeFace" );
2624   MESSAGE("GEOM_Superv_i::GetOppositeFace");
2625   getBlocksOp();
2626   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetOppositeFace(theBlock, theFace);
2627   endService( " GEOM_Superv_i::GetOppositeFace" );
2628   return anObj;
2629 }
2630
2631 //=============================================================================
2632 //  GetFaceNearPoint:
2633 //=============================================================================
2634 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
2635                                                        GEOM::GEOM_Object_ptr thePoint)
2636 {
2637   beginService( " GEOM_Superv_i::GetFaceNearPoint" );
2638   MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
2639   getBlocksOp();
2640   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceNearPoint(theShape, thePoint);
2641   endService( " GEOM_Superv_i::GetFaceNearPoint" );
2642   return anObj;
2643 }
2644
2645 //=============================================================================
2646 //  GetFaceByNormale:
2647 //=============================================================================
2648 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
2649                                                        GEOM::GEOM_Object_ptr theVector)
2650 {
2651   beginService( " GEOM_Superv_i::GetFaceByNormale" );
2652   MESSAGE("GEOM_Superv_i::GetFaceByNormale");
2653   getBlocksOp();
2654   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByNormale(theBlock, theVector);
2655   endService( " GEOM_Superv_i::GetFaceByNormale" );
2656   return anObj;
2657 }
2658
2659 //=============================================================================
2660 //  IsCompoundOfBlocks:
2661 //=============================================================================
2662 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2663                                                   CORBA::Long     theMinNbFaces,
2664                                                   CORBA::Long     theMaxNbFaces,
2665                                                   CORBA::Long&          theNbBlocks)
2666 {
2667   beginService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2668   MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
2669   getBlocksOp();
2670   CORBA::Boolean aRes = myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
2671   endService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2672   return aRes;
2673 }
2674
2675 //=============================================================================
2676 //  CheckCompoundOfBlocks:
2677 //=============================================================================
2678 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks
2679 (GEOM::GEOM_Object_ptr theCompound,
2680  GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
2681 {
2682   beginService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2683   MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
2684   getBlocksOp();
2685   CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, -1., theErrors);
2686   endService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2687   return aRes;
2688 }
2689
2690 //=============================================================================
2691 //  PrintBCErrors:
2692 //=============================================================================
2693 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
2694                                     const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
2695 {
2696   beginService( " GEOM_Superv_i::PrintBCErrors" );
2697   MESSAGE("GEOM_Superv_i::PrintBCErrors");
2698   getBlocksOp();
2699   char* anErrors = myBlocksOp->PrintBCErrors(theCompound, theErrors);
2700   endService( " GEOM_Superv_i::PrintBCErrors" );
2701   return anErrors;
2702 }
2703
2704 //=============================================================================
2705 //  ExplodeCompoundOfBlocks:
2706 //=============================================================================
2707 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2708                                                                 CORBA::Long     theMinNbFaces,
2709                                                                 CORBA::Long     theMaxNbFaces)
2710 {
2711   beginService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2712   MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
2713   getBlocksOp();
2714   GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
2715   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2716   endService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2717   return aListPtr->_this();
2718 }
2719
2720 //=============================================================================
2721 //  GetBlockNearPoint:
2722 //=============================================================================
2723 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
2724                                                         GEOM::GEOM_Object_ptr thePoint)
2725 {
2726   beginService( " GEOM_Superv_i::GetBlockNearPoint" );
2727   MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
2728   getBlocksOp();
2729   GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
2730   endService( " GEOM_Superv_i::GetBlockNearPoint" );
2731   return anObj;
2732 }
2733
2734 //=============================================================================
2735 //  GetBlockByParts:
2736 //=============================================================================
2737 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
2738                                                       GEOM::GEOM_List_ptr theParts)
2739 {
2740   beginService( " GEOM_Superv_i::GetBlockByParts" );
2741   MESSAGE("GEOM_Superv_i::GetBlockByParts");
2742   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2743       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2744     getBlocksOp();
2745     GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
2746     endService( " GEOM_Superv_i::GetBlockByParts" );
2747     return anObj;
2748   }
2749   endService( " GEOM_Superv_i::GetBlockByParts" );
2750   return NULL;
2751 }
2752
2753 //=============================================================================
2754 //  GetBlocksByParts:
2755 //=============================================================================
2756 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
2757                                                          GEOM::GEOM_List_ptr theParts)
2758 {
2759   beginService( " GEOM_Superv_i::GetBlocksByParts" );
2760   MESSAGE("GEOM_Superv_i::GetBlocksByParts");
2761   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2762       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2763     getBlocksOp();
2764
2765     GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
2766     GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2767     endService( " GEOM_Superv_i::GetBlocksByParts" );
2768     return aListPtr->_this();
2769   }
2770   endService( " GEOM_Superv_i::GetBlocksByParts" );
2771   return NULL;
2772 }
2773
2774 //=============================================================================
2775 //  MakeMultiTransformation1D:
2776 //=============================================================================
2777 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
2778                                                                 CORBA::Long     theDirFace1,
2779                                                                 CORBA::Long     theDirFace2,
2780                                                                 CORBA::Long     theNbTimes)
2781 {
2782   beginService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2783   MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
2784   getBlocksOp();
2785   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
2786   endService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2787   return anObj;
2788 }
2789
2790 //=============================================================================
2791 //  MakeMultiTransformation2D:
2792 //=============================================================================
2793 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D
2794 (GEOM::GEOM_Object_ptr theBlock,
2795  CORBA::Long     theDirFace1U,
2796  CORBA::Long     theDirFace2U,
2797  CORBA::Long     theNbTimesU,
2798  CORBA::Long     theDirFace1V,
2799  CORBA::Long     theDirFace2V,
2800  CORBA::Long     theNbTimesV)
2801 {
2802   beginService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2803   MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
2804   getBlocksOp();
2805   GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation2D(theBlock,
2806                                                                       theDirFace1U, theDirFace2U, theNbTimesU,
2807                                                                       theDirFace1V, theDirFace2V, theNbTimesV);
2808   endService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2809   return anObj;
2810 }
2811
2812 //=============================== CurvesOperations ============================
2813 //=============================================================================
2814 //  MakeCirclePntVecR:
2815 //=============================================================================
2816 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
2817                                                         GEOM::GEOM_Object_ptr theVector,
2818                                                         CORBA::Double theR)
2819 {
2820   beginService( " GEOM_Superv_i::MakeCirclePntVecR" );
2821   MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
2822   getCurvesOp();
2823   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
2824   endService( " GEOM_Superv_i::MakeCirclePntVecR" );
2825   return anObj;
2826 }
2827
2828 //=============================================================================
2829 //  MakeCircleThreePnt:
2830 //=============================================================================
2831 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
2832                                                          GEOM::GEOM_Object_ptr thePnt2,
2833                                                          GEOM::GEOM_Object_ptr thePnt3)
2834 {
2835   beginService( " GEOM_Superv_i::MakeCircleThreePnt" );
2836   MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
2837   getCurvesOp();
2838   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
2839   endService( " GEOM_Superv_i::MakeCircleThreePnt" );
2840   return anObj;
2841 }
2842 //=============================================================================
2843 //  MakeCircleCenter2Pnt:
2844 //=============================================================================
2845 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
2846                                                              GEOM::GEOM_Object_ptr thePnt2,
2847                                                            GEOM::GEOM_Object_ptr thePnt3)
2848 {
2849   beginService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2850   MESSAGE("GEOM_Superv_i::MakeCircleCenter2Pnt");
2851   getCurvesOp();
2852   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3);
2853   endService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2854   return anObj;
2855 }
2856
2857 //=============================================================================
2858 //  MakeEllipse:
2859 //=============================================================================
2860 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
2861                                                   GEOM::GEOM_Object_ptr theVector,
2862                                                   CORBA::Double theRMajor,
2863                                                   CORBA::Double theRMinor)
2864 {
2865   beginService( " GEOM_Superv_i::MakeEllipse" );
2866   MESSAGE("GEOM_Superv_i::MakeEllipse");
2867   getCurvesOp();
2868   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
2869   endService( " GEOM_Superv_i::MakeEllipse" );
2870   return anObj;
2871 }
2872
2873 //=============================================================================
2874 //  MakeEllipseVec:
2875 //=============================================================================
2876 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipseVec (GEOM::GEOM_Object_ptr theCenter,
2877                                                      GEOM::GEOM_Object_ptr theVector,
2878                                                      CORBA::Double theRMajor,
2879                                                      CORBA::Double theRMinor,
2880                                                      GEOM::GEOM_Object_ptr theVectorMajor)
2881 {
2882   beginService( " GEOM_Superv_i::MakeEllipseVec" );
2883   MESSAGE("GEOM_Superv_i::MakeEllipseVec");
2884   getCurvesOp();
2885   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeEllipseVec(theCenter, theVector, theRMajor, theRMinor, theVectorMajor);
2886   endService( " GEOM_Superv_i::MakeEllipseVec" );
2887   return anObj;
2888 }
2889
2890 //=============================================================================
2891 //  MakeArc:
2892 //=============================================================================
2893 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
2894                                               GEOM::GEOM_Object_ptr thePnt2,
2895                                               GEOM::GEOM_Object_ptr thePnt3)
2896 {
2897   beginService( " GEOM_Superv_i::MakeArc" );
2898   MESSAGE("GEOM_Superv_i::MakeArc");
2899   getCurvesOp();
2900   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
2901   endService( " GEOM_Superv_i::MakeArc" );
2902   return anObj;
2903 }
2904
2905 //=============================================================================
2906 //  MakeArcCenter:
2907 //=============================================================================
2908 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
2909                                                     GEOM::GEOM_Object_ptr thePnt1,
2910                                                     GEOM::GEOM_Object_ptr thePnt2,
2911                                                     CORBA::Boolean theSense)
2912 {
2913   beginService( " GEOM_Superv_i::MakeArcCenter" );
2914   MESSAGE("GEOM_Superv_i::MakeArcCenter");
2915   getCurvesOp();
2916   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArcCenter(theCenter, thePnt1, thePnt2,theSense);
2917   endService( " GEOM_Superv_i::MakeArcCenter" );
2918   return anObj;
2919 }
2920
2921 //=============================================================================
2922 //  MakeArcOfEllipse:
2923 //=============================================================================
2924 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArcOfEllipse (GEOM::GEOM_Object_ptr thePnt1,
2925                                                        GEOM::GEOM_Object_ptr thePnt2,
2926                                                        GEOM::GEOM_Object_ptr thePnt3)
2927 {
2928   beginService( " GEOM_Superv_i::MakeArcOfEllipse" );
2929   MESSAGE("GEOM_Superv_i::MakeArcOfEllipse");
2930   getCurvesOp();
2931   GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArcOfEllipse(thePnt1, thePnt2, thePnt3);
2932   endService( " GEOM_Superv_i::MakeArcOfEllipse" );
2933   return anObj;
2934 }
2935
2936 //=============================================================================
2937 //  MakePolyline:
2938 //=============================================================================
2939 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints,
2940                                                    CORBA::Boolean      theIsClosed)
2941 {
2942   beginService( " GEOM_Superv_i::MakePolyline" );
2943   MESSAGE("GEOM_Superv_i::MakePolyline");
2944   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2945       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2946     getCurvesOp();
2947     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakePolyline(aListImplP->GetList(), theIsClosed);
2948     endService( " GEOM_Superv_i::MakePolyline" );
2949     return anObj;
2950   }
2951   endService( " GEOM_Superv_i::MakePolyline" );
2952   return NULL;
2953 }
2954
2955 //=============================================================================
2956 //  MakeSplineBezier:
2957 //=============================================================================
2958 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints,
2959                                                        CORBA::Boolean      theIsClosed)
2960 {
2961   beginService( " GEOM_Superv_i::MakeSplineBezier" );
2962   MESSAGE("GEOM_Superv_i::MakeSplineBezier");
2963   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2964       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2965     getCurvesOp();
2966     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineBezier(aListImplP->GetList(), theIsClosed);
2967     endService( " GEOM_Superv_i::MakeSplineBezier" );
2968     return anObj;
2969   }
2970   endService( " GEOM_Superv_i::MakeSplineBezier" );
2971   return NULL;
2972 }
2973
2974 //=============================================================================
2975 //  MakeSplineInterpolation:
2976 //=============================================================================
2977 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints,
2978                                                               CORBA::Boolean      theIsClosed,
2979                                                               CORBA::Boolean      theDoReordering)
2980 {
2981   beginService( " GEOM_Superv_i::MakeSplineInterpolation" );
2982   MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
2983   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2984       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2985     getCurvesOp();
2986     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineInterpolation(aListImplP->GetList(), theIsClosed, theDoReordering);
2987     endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2988     return anObj;
2989   }
2990   endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2991   return NULL;
2992 }
2993
2994 //=============================================================================
2995 //  MakeSketcher:
2996 //=============================================================================
2997 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand,
2998                                                    GEOM::GEOM_List_ptr theWorkingPlane)
2999 {
3000   beginService( " GEOM_Superv_i::MakeSketcher" );
3001   MESSAGE("GEOM_Superv_i::MakeSketcher");
3002   if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP =
3003       dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
3004     getCurvesOp();
3005     GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
3006     endService( " GEOM_Superv_i::MakeSketcher" );
3007     return anObj;
3008   }
3009   endService( " GEOM_Superv_i::MakeSketcher" );
3010   return NULL;
3011 }
3012
3013 //=============================================================================
3014 //  Make3DSketcher:
3015 //=============================================================================
3016 GEOM::GEOM_Object_ptr GEOM_Superv_i::Make3DSketcher ( GEOM::GEOM_List_ptr theCoordinates)
3017 {
3018   beginService( " GEOM_Superv_i::Make3DSketcher" );
3019   MESSAGE("GEOM_Superv_i::Make3DSketcher");
3020   if (GEOM_List_i<GEOM::ListOfDouble>* aListImpl =
3021       dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theCoordinates, myPOA).in())) {
3022     getCurvesOp();
3023     GEOM::GEOM_Object_ptr anObj = myCurvesOp->Make3DSketcher(aListImpl->GetList());
3024     endService( " GEOM_Superv_i::Make3DSketcher" );
3025     return anObj;
3026   }
3027   endService( " GEOM_Superv_i::Make3DSketcher" );
3028   return NULL;
3029 }
3030
3031 //=============================== LocalOperations =============================
3032 //=============================================================================
3033 //  MakeFilletAll:
3034 //=============================================================================
3035 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
3036                                                     CORBA::Double theR)
3037 {
3038   beginService( " GEOM_Superv_i::MakeFilletAll" );
3039   MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
3040   getLocalOp();
3041   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletAll(theShape, theR);
3042   endService( " GEOM_Superv_i::MakeFilletAll" );
3043   return anObj;
3044 }
3045
3046 //=============================================================================
3047 //  MakeFilletEdges:
3048 //=============================================================================
3049 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape,
3050                                                       CORBA::Double theR,
3051                                                       GEOM::GEOM_List_ptr theEdges)
3052 {
3053   beginService( " GEOM_Superv_i::MakeFilletEdges" );
3054   MESSAGE("GEOM_Superv_i::MakeFilletEdges");
3055   if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
3056       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
3057     getLocalOp();
3058     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
3059     endService( " GEOM_Superv_i::MakeFilletEdges" );
3060     return anObj;
3061   }
3062   endService( " GEOM_Superv_i::MakeFilletEdges" );
3063   return NULL;
3064 }
3065
3066 //=============================================================================
3067 //  MakeFilletEdges R1 R2:
3068 //=============================================================================
3069 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape,
3070                                                           CORBA::Double theR1,
3071                                                           CORBA::Double theR2,
3072                                                           GEOM::GEOM_List_ptr theEdges)
3073 {
3074   beginService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
3075   MESSAGE("GEOM_Superv_i::MakeFilletEdgesR1R2");
3076   if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
3077       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
3078     getLocalOp();
3079     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdgesR1R2(theShape, theR1,
3080                                                                  theR2, aListImplE->GetList());
3081     endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
3082     return anObj;
3083   }
3084   endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
3085   return NULL;
3086 }
3087
3088 //=============================================================================
3089 //  MakeFilletFaces:
3090 //=============================================================================
3091 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape,
3092                                                       CORBA::Double theR,
3093                                                       GEOM::GEOM_List_ptr theFaces)
3094 {
3095   beginService( " GEOM_Superv_i::MakeFilletFaces" );
3096   MESSAGE("GEOM_Superv_i::MakeFilletFaces");
3097   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
3098       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
3099     getLocalOp();
3100     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
3101     endService( " GEOM_Superv_i::MakeFilletFaces" );
3102     return anObj;
3103   }
3104   endService( " GEOM_Superv_i::MakeFilletFaces" );
3105   return NULL;
3106 }
3107
3108 //=============================================================================
3109 //  MakeFilletFaces R1 R2:
3110 //=============================================================================
3111 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape,
3112                                                           CORBA::Double theR1,
3113                                                           CORBA::Double theR2,
3114                                                           GEOM::GEOM_List_ptr theFaces)
3115 {
3116   beginService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
3117   MESSAGE("GEOM_Superv_i::MakeFilletFacesR1R2");
3118   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
3119       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
3120     getLocalOp();
3121     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFacesR1R2(theShape, theR1, theR2,
3122                                                                  aListImplF->GetList());
3123     endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
3124     return anObj;
3125   }
3126   endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
3127   return NULL;
3128 }
3129
3130 //=============================================================================
3131 //  MakeFillet2D:
3132 //=============================================================================
3133 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFillet2D (GEOM::GEOM_Object_ptr theShape,
3134                                                    CORBA::Double theR,
3135                                                    GEOM::GEOM_List_ptr theVertexes)
3136 {
3137   beginService( " GEOM_Superv_i::MakeFillet2D" );
3138   MESSAGE("GEOM_Superv_i::MakeFillet2D");
3139   if (GEOM_List_i<GEOM::ListOfLong>* aListImplV =
3140       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theVertexes, myPOA).in())) {
3141     getLocalOp();
3142     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFillet2D(theShape, theR, aListImplV->GetList());
3143     endService( " GEOM_Superv_i::MakeFillet2D" );
3144     return anObj;
3145   }
3146   endService( " GEOM_Superv_i::MakeFillet2D" );
3147   return NULL;
3148 }
3149
3150 //=============================================================================
3151 //  MakeFillet1D:
3152 //=============================================================================
3153 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFillet1D (GEOM::GEOM_Object_ptr theShape,
3154                                                    CORBA::Double theR,
3155                                                    GEOM::GEOM_List_ptr theVertexes,
3156                                                    CORBA::Boolean doIgnoreSecantVertices)
3157 {
3158   beginService( " GEOM_Superv_i::MakeFillet1D" );
3159   MESSAGE("GEOM_Superv_i::MakeFillet1D");
3160   if (GEOM_List_i<GEOM::ListOfLong>* aListImplV =
3161       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theVertexes, myPOA).in())) {
3162     getLocalOp();
3163     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFillet1D
3164       (theShape, theR, aListImplV->GetList(), doIgnoreSecantVertices);
3165     endService( " GEOM_Superv_i::MakeFillet1D" );
3166     return anObj;
3167   }
3168   endService( " GEOM_Superv_i::MakeFillet1D" );
3169   return NULL;
3170 }
3171
3172 //=============================================================================
3173 //  MakeChamferAll:
3174 //=============================================================================
3175 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
3176 {
3177   beginService( " GEOM_Superv_i::MakeChamferAll" );
3178   MESSAGE("GEOM_Superv_i::MakeChamferAll");
3179   getLocalOp();
3180   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferAll(theShape, theD);
3181   endService( " GEOM_Superv_i::MakeChamferAll" );
3182   return anObj;
3183 }
3184
3185 //=============================================================================
3186 //  MakeChamferEdge:
3187 //=============================================================================
3188 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
3189                                                       CORBA::Double theD1, CORBA::Double theD2,
3190                                                       CORBA::Long theFace1, CORBA::Long theFace2)
3191 {
3192   beginService( " GEOM_Superv_i::MakeChamferEdge" );
3193   MESSAGE("GEOM_Superv_i::MakeChamferEdge");
3194   getLocalOp();
3195   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
3196   endService( " GEOM_Superv_i::MakeChamferEdge" );
3197   return anObj;
3198 }
3199
3200 //=============================================================================
3201 //  MakeChamferEdgeAD:
3202 //=============================================================================
3203 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
3204                                                         CORBA::Double theD, CORBA::Double theAngle,
3205                                                         CORBA::Long theFace1, CORBA::Long theFace2)
3206 {
3207   beginService( " GEOM_Superv_i::MakeChamferEdgeAD" );
3208   MESSAGE("GEOM_Superv_i::MakeChamferEdgeAD");
3209   getLocalOp();
3210   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2);
3211   endService( " GEOM_Superv_i::MakeChamferEdgeAD" );
3212   return anObj;
3213 }
3214
3215 //=============================================================================
3216 //  MakeChamferFaces:
3217 //=============================================================================
3218 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
3219                                                        CORBA::Double theD1, CORBA::Double theD2,
3220                                                        GEOM::GEOM_List_ptr theFaces)
3221 {
3222   beginService( " GEOM_Superv_i::MakeChamferFaces" );
3223   MESSAGE("GEOM_Superv_i::MakeChamferFaces");
3224   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
3225       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
3226     getLocalOp();
3227     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
3228     endService( " GEOM_Superv_i::MakeChamferFaces" );
3229     return anObj;
3230   }
3231   endService( " GEOM_Superv_i::MakeChamferFaces" );
3232   return NULL;
3233 }
3234
3235 //=============================================================================
3236 //  MakeChamferFacesAD:
3237 //=============================================================================
3238 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
3239                                                          CORBA::Double theD, CORBA::Double theAngle,
3240                                                          GEOM::GEOM_List_ptr theFaces)
3241 {
3242   beginService( " GEOM_Superv_i::MakeChamferFacesAD" );
3243   MESSAGE("GEOM_Superv_i::MakeChamferFacesAD");
3244   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
3245       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
3246     getLocalOp();
3247     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFacesAD(theShape, theD, theAngle, aListImplF->GetList());
3248     endService( " GEOM_Superv_i::MakeChamferFacesAD" );
3249     return anObj;
3250   }
3251   endService( " GEOM_Superv_i::MakeChamferFacesAD" );
3252   return NULL;
3253 }
3254
3255 //=============================================================================
3256 //  MakeChamferEdges:
3257 //=============================================================================
3258 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
3259                                                        CORBA::Double theD1, CORBA::Double theD2,
3260                                                        GEOM::GEOM_List_ptr theEdges)
3261 {
3262   beginService( " GEOM_Superv_i::MakeChamferEdges" );
3263   MESSAGE("GEOM_Superv_i::MakeChamferEdges");
3264   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
3265       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
3266     getLocalOp();
3267     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdges(theShape, theD1, theD2, aListImplF->GetList());
3268     endService( " GEOM_Superv_i::MakeChamferEdges" );
3269     return anObj;
3270   }
3271   endService( " GEOM_Superv_i::MakeChamferEdges" );
3272   return NULL;
3273 }
3274
3275 //=============================================================================
3276 //  MakeChamferEdgesAD:
3277 //=============================================================================
3278 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
3279                                                          CORBA::Double theD, CORBA::Double theAngle,
3280                                                          GEOM::GEOM_List_ptr theEdges)
3281 {
3282   beginService( " GEOM_Superv_i::MakeChamferEdgesAD" );
3283   MESSAGE("GEOM_Superv_i::MakeChamferEdgesAD");
3284   if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
3285       dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
3286     getLocalOp();
3287     GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgesAD(theShape, theD, theAngle, aListImplF->GetList());
3288     endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
3289     return anObj;
3290   }
3291   endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
3292   return NULL;
3293 }
3294
3295 //=============================================================================
3296 //  MakeArchimede:
3297 //=============================================================================
3298 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
3299                                                     CORBA::Double theWeight,
3300                                                     CORBA::Double theWaterDensity,
3301                                                     CORBA::Double theMeshingDeflection)
3302 {
3303   beginService( " GEOM_Superv_i::MakeArchimede" );
3304   MESSAGE("GEOM_Superv_i::MakeArchimede");
3305   getLocalOp();
3306   GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
3307   endService( " GEOM_Superv_i::MakeArchimede" );
3308   return anObj;
3309 }
3310
3311 //=============================================================================
3312 //  GetSubShapeIndexMakeFilletAll:
3313 //=============================================================================
3314 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
3315                                              GEOM::GEOM_Object_ptr theSubShape)
3316 {
3317   beginService( " GEOM_Superv_i::GetSubShapeIndex" );
3318   MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
3319   getLocalOp();
3320   CORBA::Long aRes = myLocalOp->GetSubShapeIndex(theShape, theSubShape);
3321   endService( " GEOM_Superv_i::GetSubShapeIndex" );
3322   return aRes;
3323 }
3324
3325 //=============================== GroupOperations =============================
3326 //=============================================================================
3327 //  CreateGroup:
3328 //=============================================================================
3329 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
3330                                                   CORBA::Long theShapeType)
3331 {
3332   beginService( " GEOM_Superv_i::CreateGroup" );
3333   MESSAGE("GEOM_Superv_i::CreateGroup");
3334   getGroupOp();
3335   GEOM::GEOM_Object_ptr anObj = myGroupOp->CreateGroup(theMainShape, theShapeType);
3336   endService( " GEOM_Superv_i::CreateGroup" );
3337   return anObj;
3338 }
3339
3340 //=============================================================================
3341 //  AddObject:
3342 //=============================================================================
3343 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup,
3344                                CORBA::Long theSubShapeId)
3345 {
3346   beginService( " GEOM_Superv_i::AddObject" );
3347   MESSAGE("GEOM_Superv_i::AddObject");
3348   getGroupOp();
3349   myGroupOp->AddObject(theGroup, theSubShapeId);
3350   endService( " GEOM_Superv_i::AddObject" );
3351 }
3352
3353 //=============================================================================
3354 //  RemoveObject:
3355 //=============================================================================
3356 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup,
3357                                   CORBA::Long theSubShapeId)
3358 {
3359   beginService( " GEOM_Superv_i::RemoveObject" );
3360   MESSAGE("GEOM_Superv_i::RemoveObject");
3361   getGroupOp();
3362   myGroupOp->RemoveObject(theGroup, theSubShapeId);
3363   endService( " GEOM_Superv_i::RemoveObject" );
3364 }
3365
3366 //=============================================================================
3367 //  GetType:
3368 //=============================================================================
3369 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
3370 {
3371   beginService( " GEOM_Superv_i::GetType" );
3372   MESSAGE("GEOM_Superv_i::GetType");
3373   getGroupOp();
3374   CORBA::Long aResult = myGroupOp->GetType(theGroup);
3375   endService( " GEOM_Superv_i::GetType" );
3376   return aResult;
3377 }
3378
3379 //=============================================================================
3380 //  GetMainShape:
3381 //=============================================================================
3382 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
3383 {
3384   beginService( " GEOM_Superv_i::GetMainShape" );
3385   MESSAGE("GEOM_Superv_i::GetMainShape");
3386   getGroupOp();
3387   GEOM::GEOM_Object_ptr anObj = myGroupOp->GetMainShape(theGroup);
3388   endService( " GEOM_Superv_i::GetMainShape" );
3389   return anObj;
3390 }
3391
3392 //=============================================================================
3393 //  GetObjects:
3394 //=============================================================================
3395 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
3396 {
3397   beginService( " GEOM_Superv_i::GetObjects" );
3398   MESSAGE("GEOM_Superv_i::GetObjects");
3399   getGroupOp();
3400
3401   GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
3402   GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
3403   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
3404   endService( " GEOM_Superv_i::GetObjects" );
3405   return aListPtr->_this();
3406 }
3407
3408 //=============================== Import/Export Operations =============================
3409 //=============================================================================
3410 //  Export STL
3411 //=============================================================================
3412 void GEOM_Superv_i::ExportSTL( GEOM::GEOM_Object_ptr theObject,
3413                                const char*           theFileName,
3414                                const bool            theIsASCII,
3415                                CORBA::Double         theDeflection,
3416                                const bool            theIsRelative )
3417 {
3418   beginService( " GEOM_Superv_i::ExportSTL" );
3419   MESSAGE("GEOM_Superv_i::ExportSTL");
3420   getSTLPluginOp();
3421   mySTLOp->ExportSTL( theObject, theFileName, theIsASCII, theDeflection, theIsRelative );
3422   endService( " GEOM_Superv_i::ExportSTL" );
3423 }
3424
3425 //=============================================================================
3426 //  Import STL
3427 //=============================================================================
3428 GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportSTL( const char* theFileName )
3429 {
3430   beginService( " GEOM_Superv_i::ImportSTL" );
3431   MESSAGE("GEOM_Superv_i::ImportSTL");
3432   getSTLPluginOp();
3433   GEOM::ListOfGO* aSeq = mySTLOp->ImportSTL(theFileName );
3434   GEOM::GEOM_Object_var anObj;
3435
3436   if (aSeq->length() > 0) {
3437     anObj = aSeq->operator[](0);
3438   }
3439
3440   endService( " GEOM_Superv_i::ImportSTL" );
3441   return anObj._retn();
3442 }
3443
3444 //=============================================================================
3445 //  Export BREP
3446 //=============================================================================
3447 void GEOM_Superv_i::ExportBREP( GEOM::GEOM_Object_ptr theObject,
3448                                 const char*           theFileName )
3449 {
3450   beginService( " GEOM_Superv_i::ExportBREP" );
3451   MESSAGE("GEOM_Superv_i::ExportBREP");
3452   getBREPPluginOp();
3453   myBREPOp->ExportBREP( theObject, theFileName );
3454   endService( " GEOM_Superv_i::ExportBREP" );
3455 }
3456
3457 //=============================================================================
3458 //  Import BREP
3459 //=============================================================================
3460 GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportBREP( const char* theFileName )
3461 {
3462   beginService( " GEOM_Superv_i::ImportBREP" );
3463   MESSAGE("GEOM_Superv_i::ImportBREP");
3464   getBREPPluginOp();
3465   GEOM::ListOfGO* aSeq = myBREPOp->ImportBREP(theFileName );
3466   GEOM::GEOM_Object_var anObj;
3467
3468   if (aSeq->length() > 0) {
3469     anObj = aSeq->operator[](0);
3470   }
3471
3472   endService( " GEOM_Superv_i::ImportBREP" );
3473   return anObj._retn();
3474 }
3475
3476 //=============================================================================
3477 //  Export STEP
3478 //=============================================================================
3479 void GEOM_Superv_i::ExportSTEP( GEOM::GEOM_Object_ptr theObject,
3480                                 const char*           theFileName )
3481 {
3482   beginService( " GEOM_Superv_i::ExportSTEP" );
3483   MESSAGE("GEOM_Superv_i::ExportSTEP");
3484   getSTEPPluginOp();
3485
3486   const GEOM::length_unit aUnit = GEOM::LU_METER;
3487
3488   mySTEPOp->ExportSTEP( theObject, theFileName, aUnit );
3489   endService( " GEOM_Superv_i::ExportSTEP" );
3490 }
3491
3492 //=============================================================================
3493 //  Import STEP
3494 //=============================================================================
3495 GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportSTEP( const char* theFileName,
3496                                                  const bool  theIsIgnoreUnits )
3497 {
3498   beginService( " GEOM_Superv_i::ImportSTEP" );
3499   MESSAGE("GEOM_Superv_i::ImportSTEP");
3500   getSTEPPluginOp();
3501   GEOM::ListOfGO* aSeq = mySTEPOp->ImportSTEP(theFileName, theIsIgnoreUnits, false );
3502   GEOM::GEOM_Object_var anObj;
3503
3504   if (aSeq->length() > 0) {
3505     anObj = aSeq->operator[](0);
3506   }
3507
3508   endService( " GEOM_Superv_i::ImportSTEP" );
3509   return anObj._retn();
3510 }
3511
3512 //=============================================================================
3513 //  Export IGES
3514 //=============================================================================
3515 void GEOM_Superv_i::ExportIGES( GEOM::GEOM_Object_ptr theObject,
3516                                 const char*           theFileName,
3517                                 const char*           theVersion )
3518 {
3519   beginService( " GEOM_Superv_i::ExportIGES" );
3520   MESSAGE("GEOM_Superv_i::ExportIGES");
3521   getIGESPluginOp();
3522   myIGESOp->ExportIGES( theObject, theFileName, theVersion );
3523   endService( " GEOM_Superv_i::ExportIGES" );
3524 }
3525
3526 //=============================================================================
3527 //  Import IGES
3528 //=============================================================================
3529 GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportIGES( const char* theFileName,
3530                                                  const bool  theIsIgnoreUnits )
3531 {
3532   beginService( " GEOM_Superv_i::ImportIGES" );
3533   MESSAGE("GEOM_Superv_i::ImportIGES");
3534   getIGESPluginOp();
3535   GEOM::ListOfGO* aSeq = myIGESOp->ImportIGES(theFileName, theIsIgnoreUnits );
3536   GEOM::GEOM_Object_var anObj;
3537
3538   if (aSeq->length() > 0) {
3539     anObj = aSeq->operator[](0);
3540   }
3541
3542   endService( " GEOM_Superv_i::ImportIGES" );
3543   return anObj._retn();
3544 }
3545
3546 //=============================================================================
3547 //  Export XAO
3548 //=============================================================================
3549 CORBA::Boolean GEOM_Superv_i::ExportXAO( GEOM::GEOM_Object_ptr shape,
3550                                          const GEOM::ListOfGO& groups,
3551                                          const GEOM::ListOfFields& fields,
3552                                          const char* author,
3553                                          const char* fileName,
3554                                          const char* shapeFileName )
3555 {
3556   beginService( " GEOM_Superv_i::ExportXAO" );
3557   MESSAGE("GEOM_Superv_i::ExportXAO");
3558   getXAOPluginOp();
3559   CORBA::Boolean isGood = myXAOOp->ExportXAO( shape, groups, fields, author, fileName, shapeFileName );
3560   endService( " GEOM_Superv_i::ExportXAO" );
3561   return isGood;
3562 }
3563
3564 //=============================================================================
3565 //  Import XAO
3566 //=============================================================================
3567 CORBA::Boolean GEOM_Superv_i::ImportXAO( const char* /*fileName*/,
3568                                          GEOM::GEOM_Object_out /*shape*/,
3569                                          GEOM::ListOfGO_out /*subShapes*/,
3570                                          GEOM::ListOfGO_out /*groups*/,
3571                                          GEOM::ListOfFields_out /*fields*/ )
3572 {
3573   return false;
3574 }
3575
3576
3577 //=============================================================================
3578 //  Export VTK
3579 //=============================================================================
3580 void GEOM_Superv_i::ExportVTK(  GEOM::GEOM_Object_ptr theObject,
3581                                 const char*           theFileName,
3582                                 CORBA::Double         theDeflection )
3583 {
3584   #ifdef WITH_VTK
3585   beginService( " GEOM_Superv_i::ExportVTK" );
3586   MESSAGE("GEOM_Superv_i::ExportVTK");
3587   getVTKPluginOp();
3588   myVTKOp->ExportVTK( theObject, theFileName, theDeflection );
3589   endService( " GEOM_Superv_i::ExportVTK" );
3590 #else
3591   std::string message("GEOM_Superv_i::ExportVTK functionality is unavailable");
3592   THROW_SALOME_CORBA_EXCEPTION(message.c_str(), SALOME::INTERNAL_ERROR);
3593 #endif
3594 }
3595
3596 //=============================== Advanced Operations =============================
3597 //=============================================================================
3598 //  MakePipeTShape
3599 //=============================================================================
3600 GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShape
3601                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
3602                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
3603                      CORBA::Boolean theHexMesh)
3604 {
3605   beginService( " GEOM_Superv_i::MakePipeTShape" );
3606   MESSAGE("GEOM_Superv_i::MakePipeTShape");
3607   getAdvancedOp();
3608
3609   GEOM::ListOfGO* aSeq = myAdvancedOp->MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh);
3610   GEOM_List_i<GEOM::ListOfGO>* aSeqPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aSeq));
3611   MESSAGE(" List of "<<aSeqPtr->GetList().length()<<" element(s)");
3612   endService( " GEOM_Superv_i::MakePipeTShape" );
3613   return aSeqPtr->_this();
3614 }
3615
3616 //=============================================================================
3617 //  MakePipeTShapeWithPosition
3618 //=============================================================================
3619 GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShapeWithPosition
3620                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
3621                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, CORBA::Boolean theHexMesh,
3622                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
3623 {
3624   beginService( " GEOM_Superv_i::MakePipeTShapeWithPosition" );
3625   MESSAGE("GEOM_Superv_i::MakePipeTShapeWithPosition");
3626   getAdvancedOp();
3627
3628   GEOM::ListOfGO* aSeq = myAdvancedOp->MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3);
3629   GEOM_List_i<GEOM::ListOfGO>* aSeqPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aSeq));
3630   MESSAGE(" List of "<<aSeqPtr->GetList().length()<<" element(s)");
3631   endService( " GEOM_Superv_i::MakePipeTShapeWithPosition" );
3632   return aSeqPtr->_this();
3633 }
3634
3635 //=============================================================================
3636 //  MakePipeTShapeChamfer
3637 //=============================================================================
3638 GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShapeChamfer
3639                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
3640                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
3641                      CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh)
3642 {
3643   beginService( " GEOM_Superv_i::MakePipeTShapeChamfer" );
3644   MESSAGE("GEOM_Superv_i::MakePipeTShapeChamfer");
3645   getAdvancedOp();
3646
3647   GEOM::ListOfGO* aSeq = myAdvancedOp->MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh);
3648   GEOM_List_i<GEOM::ListOfGO>* aSeqPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aSeq));
3649   MESSAGE(" List of "<<aSeqPtr->GetList().length()<<" element(s)");
3650   endService( " GEOM_Superv_i::MakePipeTShapeChamfer" );
3651   return aSeqPtr->_this();
3652 }
3653
3654 //=============================================================================
3655 //  MakePipeTShapeChamferWithPosition
3656 //=============================================================================
3657 GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShapeChamferWithPosition
3658                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
3659                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
3660                      CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
3661                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
3662 {
3663   beginService( " GEOM_Superv_i::MakePipeTShapeChamferWithPosition" );
3664   MESSAGE("GEOM_Superv_i::MakePipeTShapeChamferWithPosition");
3665   getAdvancedOp();
3666
3667   GEOM::ListOfGO* aSeq = myAdvancedOp->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh, theP1, theP2, theP3);
3668   GEOM_List_i<GEOM::ListOfGO>* aSeqPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aSeq));
3669   MESSAGE(" List of "<<aSeqPtr->GetList().length()<<" element(s)");
3670   endService( " GEOM_Superv_i::MakePipeTShapeChamferWithPosition" );
3671   return aSeqPtr->_this();
3672 }
3673
3674 //=============================================================================
3675 //  MakePipeTShapeFillet
3676 //=============================================================================
3677 GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShapeFillet
3678                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
3679                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
3680                      CORBA::Double theRF, CORBA::Boolean theHexMesh)
3681 {
3682   beginService( " GEOM_Superv_i::MakePipeTShapeFillet" );
3683   MESSAGE("GEOM_Superv_i::MakePipeTShapeFillet");
3684   getAdvancedOp();
3685
3686   GEOM::ListOfGO* aSeq = myAdvancedOp->MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh);
3687   GEOM_List_i<GEOM::ListOfGO>* aSeqPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aSeq));
3688   MESSAGE(" List of "<<aSeqPtr->GetList().length()<<" element(s)");
3689   endService( " GEOM_Superv_i::MakePipeTShapeFillet" );
3690   return aSeqPtr->_this();
3691 }
3692
3693 //=============================================================================
3694 //  MakePipeTShapeFilletWithPosition
3695 //=============================================================================
3696 GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShapeFilletWithPosition
3697                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
3698                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
3699                      CORBA::Double theRF, CORBA::Boolean theHexMesh,
3700                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
3701 {
3702   beginService( " GEOM_Superv_i::MakePipeTShapeFilletWithPosition" );
3703   MESSAGE("GEOM_Superv_i::MakePipeTShapeFilletWithPosition");
3704   getAdvancedOp();
3705
3706   GEOM::ListOfGO* aSeq = myAdvancedOp->MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh, theP1, theP2, theP3);
3707   GEOM_List_i<GEOM::ListOfGO>* aSeqPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aSeq));
3708   MESSAGE(" List of "<<aSeqPtr->GetList().length()<<" element(s)");
3709   endService( " GEOM_Superv_i::MakePipeTShapeFilletWithPosition" );
3710   return aSeqPtr->_this();
3711 }
3712
3713 //=============================================================================
3714 //  MakeDividedDisk
3715 //=============================================================================
3716 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDividedDisk (CORBA::Double theR, CORBA::Double theRatio, 
3717                                                       CORBA::Short theOrientation, GEOM::pattern thePattern)
3718 {
3719   beginService( " GEOM_Superv_i::MakeDividedDisk" );
3720   MESSAGE("GEOM_Superv_i::MakeDividedDisk");
3721   getAdvancedOp();
3722   GEOM::GEOM_Object_ptr anObj = myAdvancedOp->MakeDividedDisk(theR, theRatio, theOrientation, thePattern);
3723   endService( " GEOM_Superv_i::MakeDividedDisk" );
3724   return anObj;
3725 }
3726
3727 //=============================================================================
3728 //  MakeDividedCylinder
3729 //=============================================================================
3730 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDividedCylinder (CORBA::Double theR, 
3731                                                           CORBA::Double theH,
3732                                                           GEOM::pattern thePattern)
3733 {
3734   beginService( " GEOM_Superv_i::MakeDividedCylinder" );
3735   MESSAGE("GEOM_Superv_i::MakeDividedCylinder");
3736   getAdvancedOp();
3737   GEOM::GEOM_Object_ptr anObj = myAdvancedOp->MakeDividedCylinder(theR, theH, thePattern);
3738   endService( " GEOM_Superv_i::MakeDividedCylinder" );
3739   return anObj;
3740 }
3741
3742 //=============================================================================
3743 //  MakeSmoothingSurface
3744 //=============================================================================
3745 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSmoothingSurface (GEOM::GEOM_List_ptr thelPoints)
3746 {
3747   beginService( " GEOM_Superv_i::MakeSmoothingSurface" );
3748   MESSAGE("GEOM_Superv_i::MakeSmoothingSurface");
3749   getAdvancedOp();
3750   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
3751       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thelPoints, myPOA).in())) {
3752     getCurvesOp();
3753     GEOM::GEOM_Object_ptr anObj = myAdvancedOp->MakeSmoothingSurface(aListImplP->GetList(), 2, 8, 0.);
3754     endService( " GEOM_Superv_i::MakeSmoothingSurface" );
3755     return anObj;
3756   }
3757   endService( " GEOM_Superv_i::MakeSmoothingSurface" );
3758   return NULL;
3759 }
3760
3761 //=============================================================================
3762 //  PatchFace:
3763 //=============================================================================
3764 GEOM::GEOM_List_ptr GEOM_Superv_i::PatchFace(GEOM::GEOM_Object_ptr theShape)
3765 {
3766   beginService(" GEOM_Superv_i::PatchFace");
3767   MESSAGE("GEOM_Superv_i::PatchFace");
3768   getLocalOp();
3769
3770   GEOM::ListOfGO* aList = myMeasureOp->PatchFace(theShape);
3771   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
3772   endService(" GEOM_Superv_i::PatchFace");
3773   return aListPtr->_this();
3774 }
3775
3776 /*@@ insert new functions before this line @@ do not remove this line @@*/
3777
3778 GEOM_Superv_i_With_Session::GEOM_Superv_i_With_Session(CORBA::ORB_ptr orb,
3779                 PortableServer::POA_ptr poa,
3780                 PortableServer::ObjectId * contId,
3781                 const char *instanceName,
3782                 const char *interfaceName):GEOM_Superv_i(orb,poa,contId,instanceName,interfaceName,true,new SALOME_NamingService(orb))
3783 {
3784 }
3785
3786 GEOM_Superv_i_Without_Session::GEOM_Superv_i_Without_Session(CORBA::ORB_ptr orb,
3787                 PortableServer::POA_ptr poa,
3788                 PortableServer::ObjectId * contId,
3789                 const char *instanceName,
3790                 const char *interfaceName, SALOME_NamingService_Abstract *my_name_service):GEOM_Superv_i(orb,poa,contId,instanceName,interfaceName,false, my_name_service)
3791 {
3792 }
3793
3794 //=====================================================================================
3795 // EXPORTED METHODS
3796 //=====================================================================================
3797 extern "C"
3798 {
3799 #ifdef WIN32
3800   __declspec( dllexport )
3801 #endif
3802   PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
3803                                                        PortableServer::POA_ptr poa,
3804                                                        PortableServer::ObjectId * contId,
3805                                                        const char *instanceName,
3806                                                        const char * interfaceName)
3807   {
3808     CORBA::Object_var o = poa->id_to_reference(*contId);
3809     Engines::Container_var cont = Engines::Container::_narrow(o);
3810     GEOM_Superv_i *myGEOM_Superv_i(nullptr);
3811     if(cont->is_SSL_mode())
3812     {
3813       PortableServer::ServantBase *contPtr = poa->reference_to_servant(cont);
3814       Abstract_Engines_Container_i *contPtrEff = dynamic_cast<Abstract_Engines_Container_i *>(contPtr);
3815       SALOME_NamingService_Abstract *decoNS = new SALOME_NamingService_Abstract_Decorator(contPtrEff->getNS());
3816       myGEOM_Superv_i = new GEOM_Superv_i_Without_Session(orb, poa, contId, instanceName, interfaceName,decoNS);
3817       //Don't understand the reason why this component is registered ???
3818   //    myGEOM_Superv_i->register_name("/myGEOM_Superv");
3819       return myGEOM_Superv_i->getId() ;
3820     }
3821     else
3822     {
3823       myGEOM_Superv_i = new GEOM_Superv_i_With_Session(orb, poa, contId, instanceName, interfaceName);
3824       return myGEOM_Superv_i->getId() ;
3825     }
3826   }
3827 }