3 #include "GEOM_Superv_i.hh"
4 #include "SALOME_LifeCycleCORBA.hxx"
6 //=============================================================================
8 //=============================================================================
9 GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
10 PortableServer::POA_ptr poa,
11 PortableServer::ObjectId * contId,
12 const char *instanceName,
13 const char *interfaceName) :
14 Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
16 MESSAGE("GEOM_Superv_i::GEOM_Superv_i");
19 _id = _poa->activate_object(_thisObj);
20 name_service = new SALOME_NamingService(_orb);
21 //get RootPOA (the default)
22 //myPOA = PortableServer::RefCountServantBase::_default_POA();
23 CORBA::Object_var anObj = _orb->resolve_initial_references("RootPOA");
24 myPOA = PortableServer::POA::_narrow(anObj);
26 myGeomEngine = GEOM::GEOM_Gen::_nil();
29 myBasicOp = GEOM::GEOM_IBasicOperations::_nil();
30 my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil();
31 myBoolOp = GEOM::GEOM_IBooleanOperations::_nil();
32 myInsOp = GEOM::GEOM_IInsertOperations::_nil();
33 myTransfOp = GEOM::GEOM_ITransformOperations::_nil();
34 myShapesOp = GEOM::GEOM_IShapesOperations::_nil();
35 myBlocksOp = GEOM::GEOM_IBlocksOperations::_nil();
36 myCurvesOp = GEOM::GEOM_ICurvesOperations::_nil();
37 myLocalOp = GEOM::GEOM_ILocalOperations::_nil();
38 myGroupOp = GEOM::GEOM_IGroupOperations::_nil();
41 //=============================================================================
43 //=============================================================================
44 GEOM_Superv_i::~GEOM_Superv_i()
46 MESSAGE("GEOM_Superv_i::~GEOM_Superv_i");
50 //============================================================================
51 // function : register()
52 // purpose : register 'name' in 'name_service'
53 //============================================================================
54 void GEOM_Superv_i::register_name(char * name)
56 GEOM::GEOM_Superv_ptr g = GEOM::GEOM_Superv::_narrow(POA_GEOM::GEOM_Superv::_this());
57 name_service->Register(g, strdup(name));
60 //=============================================================================
62 //=============================================================================
63 void GEOM_Superv_i::setGeomEngine()
65 // get GEOM_Gen engine
66 SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
67 Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" );
69 myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
72 //=============================================================================
74 //=============================================================================
75 void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
80 //=============================================================================
82 //=============================================================================
83 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfGO()
85 MESSAGE("GEOM_Superv_i::CreateListOfGO()");
86 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>();
87 return aListPtr->_this();
90 //=============================================================================
92 //=============================================================================
93 void GEOM_Superv_i::AddItemToListOfGO(GEOM::GEOM_List_ptr& theList,
94 GEOM::GEOM_Object_ptr theObject)
96 MESSAGE("GEOM_Superv_i::AddItemToListOfGO(...)");
97 if (GEOM_List_i<GEOM::ListOfGO>* aList =
98 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theList, myPOA).in())) {
99 aList->AddObject(theObject);
100 MESSAGE(" NewLength = "<<aList->GetList().length());
104 //=============================================================================
106 //=============================================================================
107 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfLong()
109 MESSAGE("GEOM_Superv_i::CreateListOfLong()");
110 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>();
111 return aListPtr->_this();
114 //=============================================================================
115 // AddItemToListOfLong:
116 //=============================================================================
117 void GEOM_Superv_i::AddItemToListOfLong(GEOM::GEOM_List_ptr& theList,
120 MESSAGE("GEOM_Superv_i::AddItemToListOfLong(...)");
121 if (GEOM_List_i<GEOM::ListOfLong>* aList =
122 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theList, myPOA).in())) {
123 aList->AddObject(theObject);
124 MESSAGE(" NewLength = "<<aList->GetList().length());
128 //=============================================================================
129 // CreateListOfDouble:
130 //=============================================================================
131 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfDouble()
133 MESSAGE("GEOM_Superv_i::CreateListOfDouble()");
134 GEOM_List_i<GEOM::ListOfDouble>* aListPtr = new GEOM_List_i<GEOM::ListOfDouble>();
135 return aListPtr->_this();
138 //=============================================================================
139 // AddItemToListOfDouble:
140 //=============================================================================
141 void GEOM_Superv_i::AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList,
144 MESSAGE("GEOM_Superv_i::AddItemToListOfDouble(...)");
145 if (GEOM_List_i<GEOM::ListOfDouble>* aList =
146 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theList, myPOA).in())) {
147 aList->AddObject(theObject);
148 MESSAGE(" NewLength = "<<aList->GetList().length());
152 //=============================================================================
154 //=============================================================================
155 void GEOM_Superv_i::getBasicOp()
157 if (CORBA::is_nil(myGeomEngine))
159 // get GEOM_IBasicOperations interface
160 myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
163 //=============================================================================
165 //=============================================================================
166 void GEOM_Superv_i::get3DPrimOp()
168 if (CORBA::is_nil(myGeomEngine))
170 // get GEOM_I3DPrimOperations interface
171 my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
174 //=============================================================================
176 //=============================================================================
177 void GEOM_Superv_i::getBoolOp()
179 if (CORBA::is_nil(myGeomEngine))
181 // get GEOM_IBooleanOperations interface
182 myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
185 //=============================================================================
187 //=============================================================================
188 void GEOM_Superv_i::getInsOp()
190 if (CORBA::is_nil(myGeomEngine))
192 // get GEOM_IInsertOperations interface
193 myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
196 //=============================================================================
198 //=============================================================================
199 void GEOM_Superv_i::getTransfOp()
201 if (CORBA::is_nil(myGeomEngine))
203 // get GEOM_ITransformOperations interface
204 myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
207 //=============================================================================
209 //=============================================================================
210 void GEOM_Superv_i::getShapesOp()
212 if (CORBA::is_nil(myGeomEngine))
214 // get GEOM_IShapesOperations interface
215 myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
218 //=============================================================================
220 //=============================================================================
221 void GEOM_Superv_i::getBlocksOp()
223 if (CORBA::is_nil(myGeomEngine))
225 // get GEOM_IBlocksOperations interface
226 myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
229 //=============================================================================
231 //=============================================================================
232 void GEOM_Superv_i::getCurvesOp()
234 if (CORBA::is_nil(myGeomEngine))
236 // get GEOM_ICurvesOperations interface
237 myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
240 //=============================================================================
242 //=============================================================================
243 void GEOM_Superv_i::getLocalOp()
245 if (CORBA::is_nil(myGeomEngine))
247 // get GEOM_ILocalOperations interface
248 myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
251 //=============================================================================
253 //=============================================================================
254 void GEOM_Superv_i::getGroupOp()
256 if (CORBA::is_nil(myGeomEngine))
258 // get GEOM_IGroupOperations interface
259 myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
262 //=============================================================================
264 //=============================================================================
265 PortableServer::ServantBase_var GEOM_Superv_i::GetServant(CORBA::Object_ptr theObject,
266 PortableServer::POA_ptr thePOA)
268 if(CORBA::is_nil(theObject)) return NULL;
269 PortableServer::Servant aServant = thePOA->reference_to_servant(theObject);
273 //============================================================================
275 // purpose : save OCAF/Geom document
276 //============================================================================
277 SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
281 SALOMEDS::TMPFile_var aStreamFile;
282 return aStreamFile._retn();
285 //============================================================================
286 // function : SaveASCII()
288 //============================================================================
289 SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
293 SALOMEDS::TMPFile_var aStreamFile;
294 return aStreamFile._retn();
297 //============================================================================
300 //============================================================================
301 CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
302 const SALOMEDS::TMPFile& theStream,
309 //============================================================================
310 // function : LoadASCII()
312 //============================================================================
313 CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
314 const SALOMEDS::TMPFile& theStream,
321 //============================================================================
322 // function : Close()
324 //============================================================================
325 void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr theComponent)
328 //============================================================================
329 // function : ComponentDataType()
331 //============================================================================
332 char* GEOM_Superv_i::ComponentDataType()
337 //============================================================================
338 // function : IORToLocalPersistentID()
340 //============================================================================
341 char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
342 const char* IORString,
343 CORBA::Boolean isMultiFile,
344 CORBA::Boolean isASCII)
349 //============================================================================
350 // function : LocalPersistentIDToIOR()
351 // purpose : Create/Load CORBA object from a persistent ref (an entry)
352 // : Used when a study is loaded
353 // : The IOR (IORName) of object created is returned
354 //============================================================================
355 char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
356 const char* aLocalPersistentID,
357 CORBA::Boolean isMultiFile,
358 CORBA::Boolean isASCII)
363 //============================================================================
364 // function : CanPublishInStudy
366 //============================================================================
367 bool GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
369 if (CORBA::is_nil(myGeomEngine))
371 return myGeomEngine->CanPublishInStudy(theIOR);
374 //============================================================================
375 // function : PublishInStudy
377 //============================================================================
378 SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
379 SALOMEDS::SObject_ptr theSObject,
380 CORBA::Object_ptr theObject,
381 const char* theName) throw (SALOME::SALOME_Exception)
383 if (CORBA::is_nil(myGeomEngine))
385 return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
388 //============================================================================
389 // function : CanCopy()
391 //============================================================================
392 CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr theObject)
397 //============================================================================
398 // function : CopyFrom()
400 //============================================================================
401 SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID)
403 SALOMEDS::TMPFile_var aStreamFile;
404 return aStreamFile._retn();
407 //============================================================================
408 // function : CanPaste()
410 //============================================================================
411 CORBA::Boolean GEOM_Superv_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID)
416 //============================================================================
417 // function : PasteInto()
419 //============================================================================
420 SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& theStream,
421 CORBA::Long theObjectID,
422 SALOMEDS::SObject_ptr theObject)
424 SALOMEDS::SObject_var aNewSO;
425 return aNewSO._retn();
428 //================= Primitives Construction : BasicOperations =================
429 //=============================================================================
431 //=============================================================================
432 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointXYZ(CORBA::Double theX,
436 MESSAGE("GEOM_Superv_i::MakePointXYZ");
437 if (CORBA::is_nil(myBasicOp)) getBasicOp();
438 // make vertex and return
439 return myBasicOp->MakePointXYZ(theX, theY, theZ);
442 //=============================================================================
443 // MakePointWithReference:
444 //=============================================================================
445 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
450 MESSAGE("GEOM_Superv_i::MakePointWithReference");
451 if (CORBA::is_nil(myBasicOp)) getBasicOp();
452 return myBasicOp->MakePointWithReference(theReference, theX, theY, theZ);
455 //=============================================================================
457 //=============================================================================
458 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
459 CORBA::Double theParameter)
461 MESSAGE("GEOM_Superv_i::MakePointOnCurve");
462 if (CORBA::is_nil(myBasicOp)) getBasicOp();
463 return myBasicOp->MakePointOnCurve(theRefCurve, theParameter);
466 //=============================================================================
468 //=============================================================================
469 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorDXDYDZ (CORBA::Double theDX,
473 MESSAGE("GEOM_Superv_i::MakeVectorDXDYDZ");
474 if (CORBA::is_nil(myBasicOp)) getBasicOp();
475 return myBasicOp->MakeVectorDXDYDZ(theDX, theDY, theDZ);
478 //=============================================================================
480 //=============================================================================
481 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
482 GEOM::GEOM_Object_ptr thePnt2)
484 MESSAGE("GEOM_Superv_i::MakeVector");
485 if (CORBA::is_nil(myBasicOp)) getBasicOp();
486 return myBasicOp->MakeVectorTwoPnt(thePnt1, thePnt2);
489 //=============================================================================
491 //=============================================================================
492 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
493 GEOM::GEOM_Object_ptr thePnt2)
495 MESSAGE("GEOM_Superv_i::MakeLineTwoPnt");
496 if (CORBA::is_nil(myBasicOp)) getBasicOp();
497 return myBasicOp->MakeLineTwoPnt(thePnt1, thePnt2);
500 //=============================================================================
501 // MakePlaneThreePnt:
502 //=============================================================================
503 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
504 GEOM::GEOM_Object_ptr thePnt2,
505 GEOM::GEOM_Object_ptr thePnt3,
506 CORBA::Double theTrimSize)
508 MESSAGE("GEOM_Superv_i::MakePlaneThreePnt");
509 if (CORBA::is_nil(myBasicOp)) getBasicOp();
510 return myBasicOp->MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize);
513 //=============================================================================
515 //=============================================================================
516 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
517 GEOM::GEOM_Object_ptr theVec,
518 CORBA::Double theTrimSize)
520 MESSAGE("GEOM_Superv_i::MakePlanePntVec");
521 if (CORBA::is_nil(myBasicOp)) getBasicOp();
522 return myBasicOp->MakePlanePntVec(thePnt, theVec, theTrimSize);
525 //=============================================================================
527 //=============================================================================
528 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
529 CORBA::Double theTrimSize)
531 MESSAGE("GEOM_Superv_i::MakePlaneFace");
532 if (CORBA::is_nil(myBasicOp)) getBasicOp();
533 return myBasicOp->MakePlaneFace(theFace, theTrimSize);
536 //=============================================================================
538 //=============================================================================
539 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarker
540 (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
541 CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
542 CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
544 MESSAGE("GEOM_Superv_i::MakeMarker");
545 if (CORBA::is_nil(myBasicOp)) getBasicOp();
546 return myBasicOp->MakeMarker(theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ);
549 //================= Primitives Construction : 3DPrimOperations ================
550 //=============================================================================
552 //=============================================================================
553 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBox (CORBA::Double theX1,
560 MESSAGE("GEOM_Superv_i::MakeBox");
561 if (CORBA::is_nil(myBasicOp)) getBasicOp();
562 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
563 return my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1),
564 myBasicOp->MakePointXYZ(theX2, theY2, theZ2));
567 //=============================================================================
569 //=============================================================================
570 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxDXDYDZ (CORBA::Double theDX,
574 MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ");
575 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
576 return my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ);
579 //=============================================================================
581 //=============================================================================
582 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
583 GEOM::GEOM_Object_ptr thePnt2)
585 MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt");
586 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
587 return my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2);
590 //=============================================================================
591 // MakeCylinderPntVecRH:
592 //=============================================================================
593 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
594 GEOM::GEOM_Object_ptr theAxis,
595 CORBA::Double theRadius,
596 CORBA::Double theHeight)
598 MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH");
599 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
600 return my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight);
603 //=============================================================================
605 //=============================================================================
606 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR,
609 MESSAGE("GEOM_Superv_i::MakeCylinderRH");
610 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
611 return my3DPrimOp->MakeCylinderRH(theR, theH);
614 //=============================================================================
616 //=============================================================================
617 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere (CORBA::Double theX,
620 CORBA::Double theRadius)
622 MESSAGE("GEOM_Superv_i::MakeSphepe");
623 if (CORBA::is_nil(myBasicOp)) getBasicOp();
624 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
625 return my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
628 //=============================================================================
630 //=============================================================================
631 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
633 MESSAGE("GEOM_Superv_i::MakeSphereR");
634 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
635 return my3DPrimOp->MakeSphereR(theR);
638 //=============================================================================
640 //=============================================================================
641 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
644 MESSAGE("GEOM_Superv_i::MakeSpherePntR");
645 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
646 return my3DPrimOp->MakeSpherePntR(thePnt, theR);
649 //=============================================================================
650 // MakeTorusPntVecRR:
651 //=============================================================================
652 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
653 GEOM::GEOM_Object_ptr theVec,
654 CORBA::Double theRMajor,
655 CORBA::Double theRMinor)
657 MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
658 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
659 return my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
662 //=============================================================================
664 //=============================================================================
665 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor,
666 CORBA::Double theRMinor)
668 MESSAGE("GEOM_Superv_i::MakeTorusRR");
669 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
670 return my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
673 //=============================================================================
674 // MakeConePntVecR1R2H:
675 //=============================================================================
676 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
677 GEOM::GEOM_Object_ptr theAxis,
680 CORBA::Double theHeight)
682 MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
683 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
684 return my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
687 //=============================================================================
689 //=============================================================================
690 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1,
692 CORBA::Double theHeight)
694 MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
695 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
696 return my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
699 //=============================================================================
701 //=============================================================================
702 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
703 GEOM::GEOM_Object_ptr theVec,
706 MESSAGE("GEOM_Superv_i::MakePrismVecH");
707 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
708 return my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
712 //=============================================================================
714 //=============================================================================
715 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
716 GEOM::GEOM_Object_ptr thePoint1,
717 GEOM::GEOM_Object_ptr thePoint2)
719 MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
720 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
721 return my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
724 //=============================================================================
726 //=============================================================================
727 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase,
728 GEOM::GEOM_Object_ptr thePath)
730 MESSAGE("GEOM_Superv_i::MakePipe");
731 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
732 return my3DPrimOp->MakePipe(theBase, thePath);
735 //=============================================================================
736 // MakeRevolutionAxisAngle:
737 //=============================================================================
738 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
739 GEOM::GEOM_Object_ptr theAxis,
740 CORBA::Double theAngle)
742 MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
743 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
744 return my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
747 //=============================================================================
749 //=============================================================================
750 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
751 CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
752 CORBA::Double theTol2D, CORBA::Double theTol3D,
753 CORBA::Long theNbIter)
755 MESSAGE("GEOM_Superv_i::MakeFilling");
756 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
757 return my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter);
760 //============================= BooleanOperations =============================
761 //=============================================================================
763 //=============================================================================
764 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
765 GEOM::GEOM_Object_ptr theShape2,
766 CORBA::Long theOperation)
768 // theOperation indicates the operation to be done:
769 // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
770 MESSAGE("GEOM_Superv_i::MakeBoolean");
771 if (CORBA::is_nil(myBoolOp)) getBoolOp();
772 return myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
775 //=============================================================================
777 //=============================================================================
778 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1,
779 GEOM::GEOM_Object_ptr theShape2)
781 MESSAGE("GEOM_Superv_i::MakeFuse");
782 if (CORBA::is_nil(myBoolOp)) getBoolOp();
783 return myBoolOp->MakeBoolean(theShape1, theShape2, 3);
786 //=============================================================================
788 //=============================================================================
789 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr theShapes,
790 GEOM::GEOM_List_ptr theTools,
791 GEOM::GEOM_List_ptr theKeepInside,
792 GEOM::GEOM_List_ptr theRemoveInside,
793 const CORBA::Short theLimit,
794 const CORBA::Boolean theRemoveWebs,
795 GEOM::GEOM_List_ptr theMaterials)
797 MESSAGE("GEOM_Superv_i::MakePartition");
798 GEOM_List_i<GEOM::ListOfGO>* aListImplS =
799 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in());
800 GEOM_List_i<GEOM::ListOfGO>* aListImplT =
801 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theTools, myPOA).in());
802 GEOM_List_i<GEOM::ListOfGO>* aListImplKI =
803 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theKeepInside, myPOA).in());
804 GEOM_List_i<GEOM::ListOfGO>* aListImplRI =
805 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theRemoveInside, myPOA).in());
806 GEOM_List_i<GEOM::ListOfLong>* aListImplM =
807 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theMaterials, myPOA).in());
808 if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
809 if (CORBA::is_nil(myBoolOp)) getBoolOp();
810 return myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(),
811 aListImplKI->GetList(), aListImplRI->GetList(),
812 theLimit, theRemoveWebs, aListImplM->GetList());
817 //=============================================================================
818 // MakeHalfPartition:
819 //=============================================================================
820 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
821 GEOM::GEOM_Object_ptr thePlane)
823 MESSAGE("GEOM_Superv_i::MakeHalfPartition");
824 if (CORBA::is_nil(myBoolOp)) getBoolOp();
825 return myBoolOp->MakeHalfPartition(theShape, thePlane);
828 //============================== InsertOperations =============================
829 //=============================================================================
831 //=============================================================================
832 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
834 MESSAGE("GEOM_Superv_i::MakeCopy");
835 if (CORBA::is_nil(myInsOp)) getInsOp();
836 return myInsOp->MakeCopy(theOriginal);
839 //=============================================================================
841 //=============================================================================
842 void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject,
843 const char* theFileName,
844 const char* theFormatName)
846 MESSAGE("GEOM_Superv_i::Export");
847 if (CORBA::is_nil(myInsOp)) getInsOp();
848 myInsOp->Export(theObject, theFileName, theFormatName);
851 //=============================================================================
853 //=============================================================================
854 GEOM::GEOM_Object_ptr GEOM_Superv_i::Import (const char* theFileName,
855 const char* theFormatName)
857 MESSAGE("GEOM_Superv_i::Import");
858 if (CORBA::is_nil(myInsOp)) getInsOp();
859 return myInsOp->Import(theFileName, theFormatName);
862 //=============================================================================
863 // ImportTranslators:
864 //=============================================================================
865 void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
866 GEOM::string_array_out thePatterns)
868 MESSAGE("GEOM_Superv_i::ImportTranslators");
869 if (CORBA::is_nil(myInsOp)) getInsOp();
870 myInsOp->ImportTranslators(theFormats, thePatterns);
873 //=============================================================================
874 // ExportTranslators:
875 //=============================================================================
876 void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
877 GEOM::string_array_out thePatterns)
879 MESSAGE("GEOM_Superv_i::ExportTranslators");
880 if (CORBA::is_nil(myInsOp)) getInsOp();
881 myInsOp->ExportTranslators(theFormats, thePatterns);
884 //============================= TransformOperations ===========================
885 //=============================================================================
886 // TranslateTwoPoints:
887 //=============================================================================
888 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
889 GEOM::GEOM_Object_ptr thePoint1,
890 GEOM::GEOM_Object_ptr thePoint2)
892 MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
893 if (CORBA::is_nil(myTransfOp)) getTransfOp();
894 return myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
897 //=============================================================================
898 // TranslateTwoPointsCopy:
899 //=============================================================================
900 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
901 GEOM::GEOM_Object_ptr thePoint1,
902 GEOM::GEOM_Object_ptr thePoint2)
904 MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
905 if (CORBA::is_nil(myTransfOp)) getTransfOp();
906 return myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
909 //=============================================================================
911 //=============================================================================
912 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
917 MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
918 if (CORBA::is_nil(myTransfOp)) getTransfOp();
919 return myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
922 //=============================================================================
923 // TranslateDXDYDZCopy:
924 //=============================================================================
925 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
930 MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
931 if (CORBA::is_nil(myTransfOp)) getTransfOp();
932 return myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
935 //=============================================================================
937 //=============================================================================
938 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject,
939 GEOM::GEOM_Object_ptr theVector)
941 MESSAGE("GEOM_Superv_i::TranslateVector");
942 if (CORBA::is_nil(myTransfOp)) getTransfOp();
943 return myTransfOp->TranslateVector(theObject, theVector);
946 //=============================================================================
947 // TranslateVectorCopy:
948 //=============================================================================
949 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
950 GEOM::GEOM_Object_ptr theVector)
952 MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
953 if (CORBA::is_nil(myTransfOp)) getTransfOp();
954 return myTransfOp->TranslateVectorCopy(theObject, theVector);
957 //=============================================================================
959 //=============================================================================
960 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
961 GEOM::GEOM_Object_ptr theVector,
962 CORBA::Double theStep,
963 CORBA::Long theNbTimes)
965 MESSAGE("GEOM_Superv_i::MultiTranslate1D");
966 if (CORBA::is_nil(myTransfOp)) getTransfOp();
967 return myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
970 //=============================================================================
972 //=============================================================================
973 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
974 GEOM::GEOM_Object_ptr theVector1,
975 CORBA::Double theStep1,
976 CORBA::Long theNbTimes1,
977 GEOM::GEOM_Object_ptr theVector2,
978 CORBA::Double theStep2,
979 CORBA::Long theNbTimes2)
981 MESSAGE("GEOM_Superv_i::MultiTranslate2D");
982 if (CORBA::is_nil(myTransfOp)) getTransfOp();
983 return myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
984 theVector2, theStep2, theNbTimes2);
987 //=============================================================================
989 //=============================================================================
990 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
991 GEOM::GEOM_Object_ptr theAxis,
992 CORBA::Double theAngle)
994 MESSAGE("GEOM_Superv_i::Rotate");
995 if (CORBA::is_nil(myTransfOp)) getTransfOp();
996 return myTransfOp->Rotate(theObject, theAxis, theAngle);
999 //=============================================================================
1001 //=============================================================================
1002 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
1003 GEOM::GEOM_Object_ptr theAxis,
1004 CORBA::Double theAngle)
1006 MESSAGE("GEOM_Superv_i::RotateCopy");
1007 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1008 return myTransfOp->RotateCopy(theObject, theAxis, theAngle);
1011 //=============================================================================
1013 //=============================================================================
1014 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1015 GEOM::GEOM_Object_ptr theAxis,
1016 CORBA::Long theNbTimes)
1018 MESSAGE("GEOM_Superv_i::MultiRotate1D");
1019 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1020 return myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
1023 //=============================================================================
1025 //=============================================================================
1026 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1027 GEOM::GEOM_Object_ptr theAxis,
1028 CORBA::Double theAngle,
1029 CORBA::Long theNbTimes1,
1030 CORBA::Double theStep,
1031 CORBA::Long theNbTimes2)
1033 MESSAGE("GEOM_Superv_i::MultiRotate2D");
1034 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1035 return myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
1038 //=============================================================================
1040 //=============================================================================
1041 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject,
1042 GEOM::GEOM_Object_ptr thePlane)
1044 MESSAGE("GEOM_Superv_i::MirrorPlane");
1045 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1046 return myTransfOp->MirrorPlane(theObject, thePlane);
1049 //=============================================================================
1051 //=============================================================================
1052 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
1053 GEOM::GEOM_Object_ptr thePlane)
1055 MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
1056 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1057 return myTransfOp->MirrorPlaneCopy(theObject, thePlane);
1060 //=============================================================================
1062 //=============================================================================
1063 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject,
1064 GEOM::GEOM_Object_ptr theAxis)
1066 MESSAGE("GEOM_Superv_i::MirrorAxis");
1067 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1068 return myTransfOp->MirrorAxis(theObject, theAxis);
1071 //=============================================================================
1073 //=============================================================================
1074 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
1075 GEOM::GEOM_Object_ptr theAxis)
1077 MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
1078 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1079 return myTransfOp->MirrorAxisCopy(theObject, theAxis);
1082 //=============================================================================
1084 //=============================================================================
1085 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject,
1086 GEOM::GEOM_Object_ptr thePoint)
1088 MESSAGE("GEOM_Superv_i::MirrorPoint");
1089 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1090 return myTransfOp->MirrorPoint(theObject, thePoint);
1093 //=============================================================================
1095 //=============================================================================
1096 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
1097 GEOM::GEOM_Object_ptr thePoint)
1099 MESSAGE("GEOM_Superv_i::MirrorPointCopy");
1100 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1101 return myTransfOp->MirrorPointCopy(theObject, thePoint);
1104 //=============================================================================
1106 //=============================================================================
1107 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject,
1108 CORBA::Double theOffset)
1110 MESSAGE("GEOM_Superv_i::OffsetShape");
1111 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1112 return myTransfOp->OffsetShape(theObject, theOffset);
1115 //=============================================================================
1117 //=============================================================================
1118 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
1119 CORBA::Double theOffset)
1121 MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1122 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1123 return myTransfOp->OffsetShapeCopy(theObject, theOffset);
1126 //=============================================================================
1128 //=============================================================================
1129 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject,
1130 GEOM::GEOM_Object_ptr thePoint,
1131 CORBA::Double theFactor)
1133 MESSAGE("GEOM_Superv_i::ScaleShape");
1134 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1135 return myTransfOp->ScaleShape(theObject, thePoint, theFactor);
1138 //=============================================================================
1140 //=============================================================================
1141 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
1142 GEOM::GEOM_Object_ptr thePoint,
1143 CORBA::Double theFactor)
1145 MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
1146 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1147 return myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
1150 //=============================================================================
1152 //=============================================================================
1153 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
1154 GEOM::GEOM_Object_ptr theStartLCS,
1155 GEOM::GEOM_Object_ptr theEndLCS)
1157 MESSAGE("GEOM_Superv_i::PositionShape");
1158 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1159 return myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
1162 //=============================================================================
1163 // PositionShapeCopy:
1164 //=============================================================================
1165 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
1166 GEOM::GEOM_Object_ptr theStartLCS,
1167 GEOM::GEOM_Object_ptr theEndLCS)
1169 MESSAGE("GEOM_Superv_i::PositionShapeCopy");
1170 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1171 return myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
1174 //=============================== ShapesOperations ============================
1175 //=============================================================================
1177 //=============================================================================
1178 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
1179 GEOM::GEOM_Object_ptr thePnt2)
1181 MESSAGE("GEOM_Superv_i::MakeEdge");
1182 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1183 return myShapesOp->MakeEdge(thePnt1, thePnt2);
1186 //=============================================================================
1188 //=============================================================================
1189 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires)
1191 MESSAGE("GEOM_Superv_i::MakeWire");
1192 if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW =
1193 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
1194 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1195 return myShapesOp->MakeWire(aListImplEW->GetList());
1200 //=============================================================================
1202 //=============================================================================
1203 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
1204 CORBA::Boolean isPlanarWanted)
1206 MESSAGE("GEOM_Superv_i::MakeFace");
1207 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1208 return myShapesOp->MakeFace(theWire, isPlanarWanted);
1211 //=============================================================================
1213 //=============================================================================
1214 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires,
1215 CORBA::Boolean isPlanarWanted)
1217 MESSAGE("GEOM_Superv_i::MakeFaceWires");
1218 if (GEOM_List_i<GEOM::ListOfGO>* aListImplW =
1219 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
1220 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1221 return myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
1226 //=============================================================================
1228 //=============================================================================
1229 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells)
1231 MESSAGE("GEOM_Superv_i::MakeShell");
1232 if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS =
1233 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
1234 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1235 return myShapesOp->MakeShell(aListImplFS->GetList());
1240 //=============================================================================
1242 //=============================================================================
1243 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
1245 MESSAGE("GEOM_Superv_i::MakeSolidShell");
1246 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1247 return myShapesOp->MakeSolidShell(theShell);
1250 //=============================================================================
1252 //=============================================================================
1253 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells)
1255 MESSAGE("GEOM_Superv_i::MakeSolidShells");
1256 if (GEOM_List_i<GEOM::ListOfGO>* aListImplS =
1257 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
1258 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1259 return myShapesOp->MakeSolidShells(aListImplS->GetList());
1264 //=============================================================================
1266 //=============================================================================
1267 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes)
1269 MESSAGE("GEOM_Superv_i::MakeCompound");
1270 if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
1271 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
1272 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1273 return myShapesOp->MakeCompound(aListImpl->GetList());
1278 //=============================================================================
1280 //=============================================================================
1281 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
1282 const CORBA::Double theTolerance)
1284 MESSAGE("GEOM_Superv_i::MakeGlueFaces");
1285 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1286 return myShapesOp->MakeGlueFaces(theShape, theTolerance);
1289 //=============================================================================
1291 //=============================================================================
1292 GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
1293 const CORBA::Long theShapeType,
1294 const CORBA::Boolean isSorted)
1296 MESSAGE("GEOM_Superv_i::MakeExplode");
1297 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1299 GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
1300 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1301 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1302 return aListPtr->_this();
1305 //=============================================================================
1307 //=============================================================================
1308 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
1310 MESSAGE("GEOM_Superv_i::NumberOfFaces");
1311 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1312 return myShapesOp->NumberOfFaces(theShape);
1315 //=============================================================================
1317 //=============================================================================
1318 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
1320 MESSAGE("GEOM_Superv_i::NumberOfEdges");
1321 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1322 return myShapesOp->NumberOfEdges(theShape);
1325 //=============================================================================
1326 // ChangeOrientation:
1327 //=============================================================================
1328 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
1330 MESSAGE("GEOM_Superv_i::ChangeOrientation");
1331 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1332 return myShapesOp->ChangeOrientation(theShape);
1336 //=============================== BlocksOperations ============================
1337 //=============================================================================
1338 // MakeQuad4Vertices:
1339 //=============================================================================
1340 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
1341 GEOM::GEOM_Object_ptr thePnt2,
1342 GEOM::GEOM_Object_ptr thePnt3,
1343 GEOM::GEOM_Object_ptr thePnt4)
1345 MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
1346 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1347 return myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
1350 //=============================================================================
1352 //=============================================================================
1353 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
1354 GEOM::GEOM_Object_ptr theEdge2,
1355 GEOM::GEOM_Object_ptr theEdge3,
1356 GEOM::GEOM_Object_ptr theEdge4)
1358 MESSAGE("GEOM_Superv_i::MakeQuad");
1359 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1360 return myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
1363 //=============================================================================
1365 //=============================================================================
1366 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
1367 GEOM::GEOM_Object_ptr theEdge2)
1369 MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
1370 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1371 return myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
1374 //=============================================================================
1376 //=============================================================================
1377 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
1378 GEOM::GEOM_Object_ptr theFace2,
1379 GEOM::GEOM_Object_ptr theFace3,
1380 GEOM::GEOM_Object_ptr theFace4,
1381 GEOM::GEOM_Object_ptr theFace5,
1382 GEOM::GEOM_Object_ptr theFace6)
1384 MESSAGE("GEOM_Superv_i::MakeHexa");
1385 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1386 return myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
1389 //=============================================================================
1391 //=============================================================================
1392 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
1393 GEOM::GEOM_Object_ptr theFace2)
1395 MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
1396 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1397 return myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
1400 //=============================================================================
1402 //=============================================================================
1403 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
1404 const CORBA::Double theX,
1405 const CORBA::Double theY,
1406 const CORBA::Double theZ,
1407 const CORBA::Double theEpsilon)
1409 MESSAGE("GEOM_Superv_i::GetPoint");
1410 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1411 return myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
1414 //=============================================================================
1416 //=============================================================================
1417 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
1418 GEOM::GEOM_Object_ptr thePoint1,
1419 GEOM::GEOM_Object_ptr thePoint2)
1421 MESSAGE("GEOM_Superv_i::GetEdge");
1422 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1423 return myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
1426 //=============================================================================
1427 // GetEdgeNearPoint:
1428 //=============================================================================
1429 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
1430 GEOM::GEOM_Object_ptr thePoint)
1432 MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
1433 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1434 return myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
1437 //=============================================================================
1439 //=============================================================================
1440 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
1441 GEOM::GEOM_Object_ptr thePoint1,
1442 GEOM::GEOM_Object_ptr thePoint2,
1443 GEOM::GEOM_Object_ptr thePoint3,
1444 GEOM::GEOM_Object_ptr thePoint4)
1446 MESSAGE("GEOM_Superv_i::GetFaceByPoints");
1447 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1448 return myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
1451 //=============================================================================
1453 //=============================================================================
1454 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
1455 GEOM::GEOM_Object_ptr theEdge1,
1456 GEOM::GEOM_Object_ptr theEdge2)
1458 MESSAGE("GEOM_Superv_i::GetFaceByEdges");
1459 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1460 return myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
1463 //=============================================================================
1465 //=============================================================================
1466 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
1467 GEOM::GEOM_Object_ptr theFace)
1469 MESSAGE("GEOM_Superv_i::GetOppositeFace");
1470 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1471 return myBlocksOp->GetOppositeFace(theBlock, theFace);
1474 //=============================================================================
1475 // GetFaceNearPoint:
1476 //=============================================================================
1477 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
1478 GEOM::GEOM_Object_ptr thePoint)
1480 MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
1481 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1482 return myBlocksOp->GetFaceNearPoint(theShape, thePoint);
1485 //=============================================================================
1486 // GetFaceByNormale:
1487 //=============================================================================
1488 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
1489 GEOM::GEOM_Object_ptr theVector)
1491 MESSAGE("GEOM_Superv_i::GetFaceByNormale");
1492 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1493 return myBlocksOp->GetFaceByNormale(theBlock, theVector);
1496 //=============================================================================
1497 // IsCompoundOfBlocks:
1498 //=============================================================================
1499 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
1500 const CORBA::Long theMinNbFaces,
1501 const CORBA::Long theMaxNbFaces,
1502 CORBA::Long& theNbBlocks)
1504 MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
1505 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1506 return myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
1509 //=============================================================================
1510 // CheckCompoundOfBlocks:
1511 //=============================================================================
1512 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks
1513 (GEOM::GEOM_Object_ptr theCompound,
1514 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
1516 MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
1517 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1518 return myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
1521 //=============================================================================
1523 //=============================================================================
1524 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
1525 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
1527 MESSAGE("GEOM_Superv_i::PrintBCErrors");
1528 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1529 return myBlocksOp->PrintBCErrors(theCompound, theErrors);
1532 //=============================================================================
1533 // ExplodeCompoundOfBlocks:
1534 //=============================================================================
1535 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
1536 const CORBA::Long theMinNbFaces,
1537 const CORBA::Long theMaxNbFaces)
1539 MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
1540 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1541 GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
1542 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
1543 return aListPtr->_this();
1546 //=============================================================================
1547 // GetBlockNearPoint:
1548 //=============================================================================
1549 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
1550 GEOM::GEOM_Object_ptr thePoint)
1552 MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
1553 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1554 return myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
1557 //=============================================================================
1559 //=============================================================================
1560 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
1561 GEOM::GEOM_List_ptr theParts)
1563 MESSAGE("GEOM_Superv_i::GetBlockByParts");
1564 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1565 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
1566 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1567 return myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
1572 //=============================================================================
1573 // GetBlocksByParts:
1574 //=============================================================================
1575 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
1576 GEOM::GEOM_List_ptr theParts)
1578 MESSAGE("GEOM_Superv_i::GetBlocksByParts");
1579 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1580 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
1581 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1583 GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
1584 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
1585 return aListPtr->_this();
1590 //=============================================================================
1591 // MakeMultiTransformation1D:
1592 //=============================================================================
1593 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
1594 const CORBA::Long theDirFace1,
1595 const CORBA::Long theDirFace2,
1596 const CORBA::Long theNbTimes)
1598 MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
1599 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1600 return myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
1603 //=============================================================================
1604 // MakeMultiTransformation2D:
1605 //=============================================================================
1606 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D
1607 (GEOM::GEOM_Object_ptr theBlock,
1608 const CORBA::Long theDirFace1U,
1609 const CORBA::Long theDirFace2U,
1610 const CORBA::Long theNbTimesU,
1611 const CORBA::Long theDirFace1V,
1612 const CORBA::Long theDirFace2V,
1613 const CORBA::Long theNbTimesV)
1615 MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
1616 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1617 return myBlocksOp->MakeMultiTransformation2D(theBlock,
1618 theDirFace1U, theDirFace2U, theNbTimesU,
1619 theDirFace1V, theDirFace2V, theNbTimesV);
1622 //=============================== CurvesOperations ============================
1623 //=============================================================================
1624 // MakeCirclePntVecR:
1625 //=============================================================================
1626 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
1627 GEOM::GEOM_Object_ptr theVector,
1630 MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
1631 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1632 return myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
1635 //=============================================================================
1636 // MakeCircleThreePnt:
1637 //=============================================================================
1638 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
1639 GEOM::GEOM_Object_ptr thePnt2,
1640 GEOM::GEOM_Object_ptr thePnt3)
1642 MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
1643 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1644 return myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
1647 //=============================================================================
1649 //=============================================================================
1650 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
1651 GEOM::GEOM_Object_ptr theVector,
1652 CORBA::Double theRMajor,
1653 CORBA::Double theRMinor)
1655 MESSAGE("GEOM_Superv_i::MakeEllipse");
1656 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1657 return myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
1660 //=============================================================================
1662 //=============================================================================
1663 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
1664 GEOM::GEOM_Object_ptr thePnt2,
1665 GEOM::GEOM_Object_ptr thePnt3)
1667 MESSAGE("GEOM_Superv_i::MakeArc");
1668 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1669 return myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
1672 //=============================================================================
1674 //=============================================================================
1675 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints)
1677 MESSAGE("GEOM_Superv_i::MakePolyline");
1678 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1679 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
1680 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1681 return myCurvesOp->MakePolyline(aListImplP->GetList());
1686 //=============================================================================
1687 // MakeSplineBezier:
1688 //=============================================================================
1689 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints)
1691 MESSAGE("GEOM_Superv_i::MakeSplineBezier");
1692 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1693 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
1694 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1695 return myCurvesOp->MakeSplineBezier(aListImplP->GetList());
1700 //=============================================================================
1701 // MakeSplineInterpolation:
1702 //=============================================================================
1703 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints)
1705 MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
1706 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1707 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
1708 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1709 return myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
1714 //=============================================================================
1716 //=============================================================================
1717 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand,
1718 GEOM::GEOM_List_ptr theWorkingPlane)
1720 MESSAGE("GEOM_Superv_i::MakeSketcher");
1721 if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP =
1722 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
1723 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1724 return myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
1729 //=============================== LocalOperations =============================
1730 //=============================================================================
1732 //=============================================================================
1733 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
1736 MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
1737 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1738 return myLocalOp->MakeFilletAll(theShape, theR);
1741 //=============================================================================
1743 //=============================================================================
1744 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape,
1746 GEOM::GEOM_List_ptr theEdges)
1748 MESSAGE("GEOM_Superv_i::MakeFilletEdges");
1749 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
1750 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
1751 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1752 return myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
1757 //=============================================================================
1759 //=============================================================================
1760 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape,
1762 GEOM::GEOM_List_ptr theFaces)
1764 MESSAGE("GEOM_Superv_i::MakeFilletFaces");
1765 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
1766 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
1767 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1768 return myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
1773 //=============================================================================
1775 //=============================================================================
1776 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
1778 MESSAGE("GEOM_Superv_i::MakeChamferAll");
1779 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1780 return myLocalOp->MakeChamferAll(theShape, theD);
1783 //=============================================================================
1785 //=============================================================================
1786 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
1787 CORBA::Double theD1, CORBA::Double theD2,
1788 CORBA::Long theFace1, CORBA::Long theFace2)
1790 MESSAGE("GEOM_Superv_i::MakeChamferEdge");
1791 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1792 return myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
1795 //=============================================================================
1796 // MakeChamferFaces:
1797 //=============================================================================
1798 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
1799 CORBA::Double theD1, CORBA::Double theD2,
1800 GEOM::GEOM_List_ptr theFaces)
1802 MESSAGE("GEOM_Superv_i::MakeChamferFaces");
1803 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
1804 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
1805 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1806 return myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
1811 //=============================================================================
1813 //=============================================================================
1814 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
1815 CORBA::Double theWeight,
1816 CORBA::Double theWaterDensity,
1817 CORBA::Double theMeshingDeflection)
1819 MESSAGE("GEOM_Superv_i::MakeArchimede");
1820 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1821 return myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
1824 //=============================================================================
1825 // GetSubShapeIndexMakeFilletAll:
1826 //=============================================================================
1827 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
1828 GEOM::GEOM_Object_ptr theSubShape)
1830 MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
1831 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1832 return myLocalOp->GetSubShapeIndex(theShape, theSubShape);
1835 //=============================== GroupOperations =============================
1836 //=============================================================================
1838 //=============================================================================
1839 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
1840 CORBA::Long theShapeType)
1842 MESSAGE("GEOM_Superv_i::CreateGroup");
1843 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1844 return myGroupOp->CreateGroup(theMainShape, theShapeType);
1847 //=============================================================================
1849 //=============================================================================
1850 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup,
1851 CORBA::Long theSubShapeId)
1853 MESSAGE("GEOM_Superv_i::AddObject");
1854 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1855 myGroupOp->AddObject(theGroup, theSubShapeId);
1858 //=============================================================================
1860 //=============================================================================
1861 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup,
1862 CORBA::Long theSubShapeId)
1864 MESSAGE("GEOM_Superv_i::RemoveObject");
1865 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1866 myGroupOp->RemoveObject(theGroup, theSubShapeId);
1869 //=============================================================================
1871 //=============================================================================
1872 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
1874 MESSAGE("GEOM_Superv_i::GetType");
1875 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1876 return myGroupOp->GetType(theGroup);
1879 //=============================================================================
1881 //=============================================================================
1882 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
1884 MESSAGE("GEOM_Superv_i::GetMainShape");
1885 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1886 return myGroupOp->GetMainShape(theGroup);
1889 //=============================================================================
1891 //=============================================================================
1892 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
1894 MESSAGE("GEOM_Superv_i::GetObjects");
1895 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1897 GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
1898 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
1899 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1900 return aListPtr->_this();
1903 //=====================================================================================
1905 //=====================================================================================
1908 PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
1909 PortableServer::POA_ptr poa,
1910 PortableServer::ObjectId * contId,
1911 const char *instanceName,
1912 const char * interfaceName)
1914 GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
1915 myGEOM_Superv_i->register_name("/myGEOM_Superv");
1916 return myGEOM_Superv_i->getId() ;