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);
30 myBasicOp = GEOM::GEOM_IBasicOperations::_nil();
31 my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil();
32 myBoolOp = GEOM::GEOM_IBooleanOperations::_nil();
33 myInsOp = GEOM::GEOM_IInsertOperations::_nil();
34 myTransfOp = GEOM::GEOM_ITransformOperations::_nil();
35 myShapesOp = GEOM::GEOM_IShapesOperations::_nil();
36 myBlocksOp = GEOM::GEOM_IBlocksOperations::_nil();
37 myCurvesOp = GEOM::GEOM_ICurvesOperations::_nil();
38 myLocalOp = GEOM::GEOM_ILocalOperations::_nil();
39 myGroupOp = GEOM::GEOM_IGroupOperations::_nil();
42 //=============================================================================
44 //=============================================================================
45 GEOM_Superv_i::~GEOM_Superv_i()
47 MESSAGE("GEOM_Superv_i::~GEOM_Superv_i");
51 //============================================================================
52 // function : register()
53 // purpose : register 'name' in 'name_service'
54 //============================================================================
55 void GEOM_Superv_i::register_name(char * name)
57 GEOM::GEOM_Superv_ptr g = GEOM::GEOM_Superv::_narrow(POA_GEOM::GEOM_Superv::_this());
58 name_service->Register(g, strdup(name));
61 //=============================================================================
63 //=============================================================================
64 void GEOM_Superv_i::setGeomEngine()
66 // get GEOM_Gen engine
67 SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
68 Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" );
70 myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
73 //=============================================================================
75 //=============================================================================
76 void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
81 //=============================================================================
83 //=============================================================================
84 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfGO()
86 MESSAGE("GEOM_Superv_i::CreateListOfGO()");
87 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>();
88 return aListPtr->_this();
91 //=============================================================================
93 //=============================================================================
94 void GEOM_Superv_i::AddItemToListOfGO(GEOM::GEOM_List_ptr& theList,
95 GEOM::GEOM_Object_ptr theObject)
97 MESSAGE("GEOM_Superv_i::AddItemToListOfGO(...)");
98 if (GEOM_List_i<GEOM::ListOfGO>* aList =
99 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theList, myPOA).in())) {
100 aList->AddObject(theObject);
101 MESSAGE(" NewLength = "<<aList->GetList().length());
105 //=============================================================================
107 //=============================================================================
108 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfLong()
110 MESSAGE("GEOM_Superv_i::CreateListOfLong()");
111 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>();
112 return aListPtr->_this();
115 //=============================================================================
116 // AddItemToListOfLong:
117 //=============================================================================
118 void GEOM_Superv_i::AddItemToListOfLong(GEOM::GEOM_List_ptr& theList,
121 MESSAGE("GEOM_Superv_i::AddItemToListOfLong(...)");
122 if (GEOM_List_i<GEOM::ListOfLong>* aList =
123 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theList, myPOA).in())) {
124 aList->AddObject(theObject);
125 MESSAGE(" NewLength = "<<aList->GetList().length());
129 //=============================================================================
130 // CreateListOfDouble:
131 //=============================================================================
132 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfDouble()
134 MESSAGE("GEOM_Superv_i::CreateListOfDouble()");
135 GEOM_List_i<GEOM::ListOfDouble>* aListPtr = new GEOM_List_i<GEOM::ListOfDouble>();
136 return aListPtr->_this();
139 //=============================================================================
140 // AddItemToListOfDouble:
141 //=============================================================================
142 void GEOM_Superv_i::AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList,
145 MESSAGE("GEOM_Superv_i::AddItemToListOfDouble(...)");
146 if (GEOM_List_i<GEOM::ListOfDouble>* aList =
147 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theList, myPOA).in())) {
148 aList->AddObject(theObject);
149 MESSAGE(" NewLength = "<<aList->GetList().length());
153 //=============================================================================
155 //=============================================================================
156 void GEOM_Superv_i::getBasicOp()
158 if (CORBA::is_nil(myGeomEngine))
160 // get GEOM_IBasicOperations interface
161 myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
164 //=============================================================================
166 //=============================================================================
167 void GEOM_Superv_i::get3DPrimOp()
169 if (CORBA::is_nil(myGeomEngine))
171 // get GEOM_I3DPrimOperations interface
172 my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
175 //=============================================================================
177 //=============================================================================
178 void GEOM_Superv_i::getBoolOp()
180 if (CORBA::is_nil(myGeomEngine))
182 // get GEOM_IBooleanOperations interface
183 myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
186 //=============================================================================
188 //=============================================================================
189 void GEOM_Superv_i::getInsOp()
191 if (CORBA::is_nil(myGeomEngine))
193 // get GEOM_IInsertOperations interface
194 myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
197 //=============================================================================
199 //=============================================================================
200 void GEOM_Superv_i::getTransfOp()
202 if (CORBA::is_nil(myGeomEngine))
204 // get GEOM_ITransformOperations interface
205 myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
208 //=============================================================================
210 //=============================================================================
211 void GEOM_Superv_i::getShapesOp()
213 if (CORBA::is_nil(myGeomEngine))
215 // get GEOM_IShapesOperations interface
216 myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
219 //=============================================================================
221 //=============================================================================
222 void GEOM_Superv_i::getBlocksOp()
224 if (CORBA::is_nil(myGeomEngine))
226 // get GEOM_IBlocksOperations interface
227 myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
230 //=============================================================================
232 //=============================================================================
233 void GEOM_Superv_i::getCurvesOp()
235 if (CORBA::is_nil(myGeomEngine))
237 // get GEOM_ICurvesOperations interface
238 myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
241 //=============================================================================
243 //=============================================================================
244 void GEOM_Superv_i::getLocalOp()
246 if (CORBA::is_nil(myGeomEngine))
248 // get GEOM_ILocalOperations interface
249 myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
252 //=============================================================================
254 //=============================================================================
255 void GEOM_Superv_i::getGroupOp()
257 if (CORBA::is_nil(myGeomEngine))
259 // get GEOM_IGroupOperations interface
260 myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
263 //=============================================================================
265 //=============================================================================
266 PortableServer::ServantBase_var GEOM_Superv_i::GetServant(CORBA::Object_ptr theObject,
267 PortableServer::POA_ptr thePOA)
269 if(CORBA::is_nil(theObject)) return NULL;
270 PortableServer::Servant aServant = thePOA->reference_to_servant(theObject);
274 //============================================================================
276 // purpose : save OCAF/Geom document
277 //============================================================================
278 SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
282 SALOMEDS::TMPFile_var aStreamFile;
283 return aStreamFile._retn();
286 //============================================================================
287 // function : SaveASCII()
289 //============================================================================
290 SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
294 SALOMEDS::TMPFile_var aStreamFile;
295 return aStreamFile._retn();
298 //============================================================================
301 //============================================================================
302 CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
303 const SALOMEDS::TMPFile& theStream,
310 //============================================================================
311 // function : LoadASCII()
313 //============================================================================
314 CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
315 const SALOMEDS::TMPFile& theStream,
322 //============================================================================
323 // function : Close()
325 //============================================================================
326 void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr theComponent)
329 //============================================================================
330 // function : ComponentDataType()
332 //============================================================================
333 char* GEOM_Superv_i::ComponentDataType()
338 //============================================================================
339 // function : IORToLocalPersistentID()
341 //============================================================================
342 char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
343 const char* IORString,
344 CORBA::Boolean isMultiFile,
345 CORBA::Boolean isASCII)
350 //============================================================================
351 // function : LocalPersistentIDToIOR()
352 // purpose : Create/Load CORBA object from a persistent ref (an entry)
353 // : Used when a study is loaded
354 // : The IOR (IORName) of object created is returned
355 //============================================================================
356 char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
357 const char* aLocalPersistentID,
358 CORBA::Boolean isMultiFile,
359 CORBA::Boolean isASCII)
364 //============================================================================
365 // function : CanPublishInStudy
367 //============================================================================
368 bool GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
370 if (CORBA::is_nil(myGeomEngine))
372 return myGeomEngine->CanPublishInStudy(theIOR);
375 //============================================================================
376 // function : PublishInStudy
378 //============================================================================
379 SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
380 SALOMEDS::SObject_ptr theSObject,
381 CORBA::Object_ptr theObject,
382 const char* theName) throw (SALOME::SALOME_Exception)
384 if (CORBA::is_nil(myGeomEngine))
386 return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
389 //============================================================================
390 // function : CanCopy()
392 //============================================================================
393 CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr theObject)
398 //============================================================================
399 // function : CopyFrom()
401 //============================================================================
402 SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID)
404 SALOMEDS::TMPFile_var aStreamFile;
405 return aStreamFile._retn();
408 //============================================================================
409 // function : CanPaste()
411 //============================================================================
412 CORBA::Boolean GEOM_Superv_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID)
417 //============================================================================
418 // function : PasteInto()
420 //============================================================================
421 SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& theStream,
422 CORBA::Long theObjectID,
423 SALOMEDS::SObject_ptr theObject)
425 SALOMEDS::SObject_var aNewSO;
426 return aNewSO._retn();
429 //================= Primitives Construction : BasicOperations =================
430 //=============================================================================
432 //=============================================================================
433 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointXYZ(CORBA::Double theX,
437 MESSAGE("GEOM_Superv_i::MakePointXYZ");
438 if (CORBA::is_nil(myBasicOp)) getBasicOp();
439 // make vertex and return
440 return myBasicOp->MakePointXYZ(theX, theY, theZ);
443 //=============================================================================
444 // MakePointWithReference:
445 //=============================================================================
446 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
451 MESSAGE("GEOM_Superv_i::MakePointWithReference");
452 if (CORBA::is_nil(myBasicOp)) getBasicOp();
453 return myBasicOp->MakePointWithReference(theReference, theX, theY, theZ);
456 //=============================================================================
458 //=============================================================================
459 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
460 CORBA::Double theParameter)
462 MESSAGE("GEOM_Superv_i::MakePointOnCurve");
463 if (CORBA::is_nil(myBasicOp)) getBasicOp();
464 return myBasicOp->MakePointOnCurve(theRefCurve, theParameter);
467 //=============================================================================
469 //=============================================================================
470 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorDXDYDZ (CORBA::Double theDX,
474 MESSAGE("GEOM_Superv_i::MakeVectorDXDYDZ");
475 if (CORBA::is_nil(myBasicOp)) getBasicOp();
476 return myBasicOp->MakeVectorDXDYDZ(theDX, theDY, theDZ);
479 //=============================================================================
481 //=============================================================================
482 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
483 GEOM::GEOM_Object_ptr thePnt2)
485 MESSAGE("GEOM_Superv_i::MakeVector");
486 if (CORBA::is_nil(myBasicOp)) getBasicOp();
487 return myBasicOp->MakeVectorTwoPnt(thePnt1, thePnt2);
490 //=============================================================================
492 //=============================================================================
493 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
494 GEOM::GEOM_Object_ptr thePnt2)
496 MESSAGE("GEOM_Superv_i::MakeLineTwoPnt");
497 if (CORBA::is_nil(myBasicOp)) getBasicOp();
498 return myBasicOp->MakeLineTwoPnt(thePnt1, thePnt2);
501 //=============================================================================
502 // MakePlaneThreePnt:
503 //=============================================================================
504 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
505 GEOM::GEOM_Object_ptr thePnt2,
506 GEOM::GEOM_Object_ptr thePnt3,
507 CORBA::Double theTrimSize)
509 MESSAGE("GEOM_Superv_i::MakePlaneThreePnt");
510 if (CORBA::is_nil(myBasicOp)) getBasicOp();
511 return myBasicOp->MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize);
514 //=============================================================================
516 //=============================================================================
517 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
518 GEOM::GEOM_Object_ptr theVec,
519 CORBA::Double theTrimSize)
521 MESSAGE("GEOM_Superv_i::MakePlanePntVec");
522 if (CORBA::is_nil(myBasicOp)) getBasicOp();
523 return myBasicOp->MakePlanePntVec(thePnt, theVec, theTrimSize);
526 //=============================================================================
528 //=============================================================================
529 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
530 CORBA::Double theTrimSize)
532 MESSAGE("GEOM_Superv_i::MakePlaneFace");
533 if (CORBA::is_nil(myBasicOp)) getBasicOp();
534 return myBasicOp->MakePlaneFace(theFace, theTrimSize);
537 //=============================================================================
539 //=============================================================================
540 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarker
541 (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
542 CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
543 CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
545 MESSAGE("GEOM_Superv_i::MakeMarker");
546 if (CORBA::is_nil(myBasicOp)) getBasicOp();
547 return myBasicOp->MakeMarker(theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ);
550 //================= Primitives Construction : 3DPrimOperations ================
551 //=============================================================================
553 //=============================================================================
554 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBox (CORBA::Double theX1,
561 MESSAGE("GEOM_Superv_i::MakeBox");
562 if (CORBA::is_nil(myBasicOp)) getBasicOp();
563 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
564 return my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1),
565 myBasicOp->MakePointXYZ(theX2, theY2, theZ2));
568 //=============================================================================
570 //=============================================================================
571 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxDXDYDZ (CORBA::Double theDX,
575 MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ");
576 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
577 return my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ);
580 //=============================================================================
582 //=============================================================================
583 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
584 GEOM::GEOM_Object_ptr thePnt2)
586 MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt");
587 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
588 return my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2);
591 //=============================================================================
592 // MakeCylinderPntVecRH:
593 //=============================================================================
594 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
595 GEOM::GEOM_Object_ptr theAxis,
596 CORBA::Double theRadius,
597 CORBA::Double theHeight)
599 MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH");
600 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
601 return my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight);
604 //=============================================================================
606 //=============================================================================
607 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR,
610 MESSAGE("GEOM_Superv_i::MakeCylinderRH");
611 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
612 return my3DPrimOp->MakeCylinderRH(theR, theH);
615 //=============================================================================
617 //=============================================================================
618 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere (CORBA::Double theX,
621 CORBA::Double theRadius)
623 MESSAGE("GEOM_Superv_i::MakeSphepe");
624 if (CORBA::is_nil(myBasicOp)) getBasicOp();
625 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
626 return my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
629 //=============================================================================
631 //=============================================================================
632 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
634 MESSAGE("GEOM_Superv_i::MakeSphereR");
635 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
636 return my3DPrimOp->MakeSphereR(theR);
639 //=============================================================================
641 //=============================================================================
642 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
645 MESSAGE("GEOM_Superv_i::MakeSpherePntR");
646 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
647 return my3DPrimOp->MakeSpherePntR(thePnt, theR);
650 //=============================================================================
651 // MakeTorusPntVecRR:
652 //=============================================================================
653 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
654 GEOM::GEOM_Object_ptr theVec,
655 CORBA::Double theRMajor,
656 CORBA::Double theRMinor)
658 MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
659 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
660 return my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
663 //=============================================================================
665 //=============================================================================
666 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor,
667 CORBA::Double theRMinor)
669 MESSAGE("GEOM_Superv_i::MakeTorusRR");
670 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
671 return my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
674 //=============================================================================
675 // MakeConePntVecR1R2H:
676 //=============================================================================
677 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
678 GEOM::GEOM_Object_ptr theAxis,
681 CORBA::Double theHeight)
683 MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
684 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
685 return my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
688 //=============================================================================
690 //=============================================================================
691 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1,
693 CORBA::Double theHeight)
695 MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
696 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
697 return my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
700 //=============================================================================
702 //=============================================================================
703 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
704 GEOM::GEOM_Object_ptr theVec,
707 MESSAGE("GEOM_Superv_i::MakePrismVecH");
708 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
709 return my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
713 //=============================================================================
715 //=============================================================================
716 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
717 GEOM::GEOM_Object_ptr thePoint1,
718 GEOM::GEOM_Object_ptr thePoint2)
720 MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
721 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
722 return my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
725 //=============================================================================
727 //=============================================================================
728 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase,
729 GEOM::GEOM_Object_ptr thePath)
731 MESSAGE("GEOM_Superv_i::MakePipe");
732 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
733 return my3DPrimOp->MakePipe(theBase, thePath);
736 //=============================================================================
737 // MakeRevolutionAxisAngle:
738 //=============================================================================
739 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
740 GEOM::GEOM_Object_ptr theAxis,
741 CORBA::Double theAngle)
743 MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
744 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
745 return my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
748 //=============================================================================
750 //=============================================================================
751 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
752 CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
753 CORBA::Double theTol2D, CORBA::Double theTol3D,
754 CORBA::Long theNbIter)
756 MESSAGE("GEOM_Superv_i::MakeFilling");
757 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
758 return my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter);
761 //============================= BooleanOperations =============================
762 //=============================================================================
764 //=============================================================================
765 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
766 GEOM::GEOM_Object_ptr theShape2,
767 CORBA::Long theOperation)
769 // theOperation indicates the operation to be done:
770 // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
771 MESSAGE("GEOM_Superv_i::MakeBoolean");
772 if (CORBA::is_nil(myBoolOp)) getBoolOp();
773 return myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
776 //=============================================================================
778 //=============================================================================
779 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1,
780 GEOM::GEOM_Object_ptr theShape2)
782 MESSAGE("GEOM_Superv_i::MakeFuse");
783 if (CORBA::is_nil(myBoolOp)) getBoolOp();
784 return myBoolOp->MakeBoolean(theShape1, theShape2, 3);
787 //=============================================================================
789 //=============================================================================
790 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr theShapes,
791 GEOM::GEOM_List_ptr theTools,
792 GEOM::GEOM_List_ptr theKeepInside,
793 GEOM::GEOM_List_ptr theRemoveInside,
794 const CORBA::Short theLimit,
795 const CORBA::Boolean theRemoveWebs,
796 GEOM::GEOM_List_ptr theMaterials)
798 MESSAGE("GEOM_Superv_i::MakePartition");
799 GEOM_List_i<GEOM::ListOfGO>* aListImplS =
800 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in());
801 GEOM_List_i<GEOM::ListOfGO>* aListImplT =
802 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theTools, myPOA).in());
803 GEOM_List_i<GEOM::ListOfGO>* aListImplKI =
804 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theKeepInside, myPOA).in());
805 GEOM_List_i<GEOM::ListOfGO>* aListImplRI =
806 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theRemoveInside, myPOA).in());
807 GEOM_List_i<GEOM::ListOfLong>* aListImplM =
808 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theMaterials, myPOA).in());
809 if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
810 if (CORBA::is_nil(myBoolOp)) getBoolOp();
811 return myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(),
812 aListImplKI->GetList(), aListImplRI->GetList(),
813 theLimit, theRemoveWebs, aListImplM->GetList());
818 //=============================================================================
819 // MakeHalfPartition:
820 //=============================================================================
821 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
822 GEOM::GEOM_Object_ptr thePlane)
824 MESSAGE("GEOM_Superv_i::MakeHalfPartition");
825 if (CORBA::is_nil(myBoolOp)) getBoolOp();
826 return myBoolOp->MakeHalfPartition(theShape, thePlane);
829 //============================== InsertOperations =============================
830 //=============================================================================
832 //=============================================================================
833 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
835 MESSAGE("GEOM_Superv_i::MakeCopy");
836 if (CORBA::is_nil(myInsOp)) getInsOp();
837 return myInsOp->MakeCopy(theOriginal);
840 //=============================================================================
842 //=============================================================================
843 void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject,
844 const char* theFileName,
845 const char* theFormatName)
847 MESSAGE("GEOM_Superv_i::Export");
848 if (CORBA::is_nil(myInsOp)) getInsOp();
849 myInsOp->Export(theObject, theFileName, theFormatName);
852 //=============================================================================
854 //=============================================================================
855 GEOM::GEOM_Object_ptr GEOM_Superv_i::Import (const char* theFileName,
856 const char* theFormatName)
858 MESSAGE("GEOM_Superv_i::Import");
859 if (CORBA::is_nil(myInsOp)) getInsOp();
860 return myInsOp->Import(theFileName, theFormatName);
863 //=============================================================================
864 // ImportTranslators:
865 //=============================================================================
866 void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
867 GEOM::string_array_out thePatterns)
869 MESSAGE("GEOM_Superv_i::ImportTranslators");
870 if (CORBA::is_nil(myInsOp)) getInsOp();
871 myInsOp->ImportTranslators(theFormats, thePatterns);
874 //=============================================================================
875 // ExportTranslators:
876 //=============================================================================
877 void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
878 GEOM::string_array_out thePatterns)
880 MESSAGE("GEOM_Superv_i::ExportTranslators");
881 if (CORBA::is_nil(myInsOp)) getInsOp();
882 myInsOp->ExportTranslators(theFormats, thePatterns);
885 //============================= TransformOperations ===========================
886 //=============================================================================
887 // TranslateTwoPoints:
888 //=============================================================================
889 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
890 GEOM::GEOM_Object_ptr thePoint1,
891 GEOM::GEOM_Object_ptr thePoint2)
893 MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
894 if (CORBA::is_nil(myTransfOp)) getTransfOp();
895 return myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
898 //=============================================================================
899 // TranslateTwoPointsCopy:
900 //=============================================================================
901 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
902 GEOM::GEOM_Object_ptr thePoint1,
903 GEOM::GEOM_Object_ptr thePoint2)
905 MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
906 if (CORBA::is_nil(myTransfOp)) getTransfOp();
907 return myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
910 //=============================================================================
912 //=============================================================================
913 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
918 MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
919 if (CORBA::is_nil(myTransfOp)) getTransfOp();
920 return myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
923 //=============================================================================
924 // TranslateDXDYDZCopy:
925 //=============================================================================
926 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
931 MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
932 if (CORBA::is_nil(myTransfOp)) getTransfOp();
933 return myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
936 //=============================================================================
938 //=============================================================================
939 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject,
940 GEOM::GEOM_Object_ptr theVector)
942 MESSAGE("GEOM_Superv_i::TranslateVector");
943 if (CORBA::is_nil(myTransfOp)) getTransfOp();
944 return myTransfOp->TranslateVector(theObject, theVector);
947 //=============================================================================
948 // TranslateVectorCopy:
949 //=============================================================================
950 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
951 GEOM::GEOM_Object_ptr theVector)
953 MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
954 if (CORBA::is_nil(myTransfOp)) getTransfOp();
955 return myTransfOp->TranslateVectorCopy(theObject, theVector);
958 //=============================================================================
960 //=============================================================================
961 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
962 GEOM::GEOM_Object_ptr theVector,
963 CORBA::Double theStep,
964 CORBA::Long theNbTimes)
966 MESSAGE("GEOM_Superv_i::MultiTranslate1D");
967 if (CORBA::is_nil(myTransfOp)) getTransfOp();
968 return myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
971 //=============================================================================
973 //=============================================================================
974 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
975 GEOM::GEOM_Object_ptr theVector1,
976 CORBA::Double theStep1,
977 CORBA::Long theNbTimes1,
978 GEOM::GEOM_Object_ptr theVector2,
979 CORBA::Double theStep2,
980 CORBA::Long theNbTimes2)
982 MESSAGE("GEOM_Superv_i::MultiTranslate2D");
983 if (CORBA::is_nil(myTransfOp)) getTransfOp();
984 return myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
985 theVector2, theStep2, theNbTimes2);
988 //=============================================================================
990 //=============================================================================
991 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
992 GEOM::GEOM_Object_ptr theAxis,
993 CORBA::Double theAngle)
995 MESSAGE("GEOM_Superv_i::Rotate");
996 if (CORBA::is_nil(myTransfOp)) getTransfOp();
997 return myTransfOp->Rotate(theObject, theAxis, theAngle);
1000 //=============================================================================
1002 //=============================================================================
1003 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
1004 GEOM::GEOM_Object_ptr theAxis,
1005 CORBA::Double theAngle)
1007 MESSAGE("GEOM_Superv_i::RotateCopy");
1008 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1009 return myTransfOp->RotateCopy(theObject, theAxis, theAngle);
1012 //=============================================================================
1014 //=============================================================================
1015 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1016 GEOM::GEOM_Object_ptr theAxis,
1017 CORBA::Long theNbTimes)
1019 MESSAGE("GEOM_Superv_i::MultiRotate1D");
1020 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1021 return myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
1024 //=============================================================================
1026 //=============================================================================
1027 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1028 GEOM::GEOM_Object_ptr theAxis,
1029 CORBA::Double theAngle,
1030 CORBA::Long theNbTimes1,
1031 CORBA::Double theStep,
1032 CORBA::Long theNbTimes2)
1034 MESSAGE("GEOM_Superv_i::MultiRotate2D");
1035 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1036 return myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
1039 //=============================================================================
1041 //=============================================================================
1042 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject,
1043 GEOM::GEOM_Object_ptr thePlane)
1045 MESSAGE("GEOM_Superv_i::MirrorPlane");
1046 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1047 return myTransfOp->MirrorPlane(theObject, thePlane);
1050 //=============================================================================
1052 //=============================================================================
1053 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
1054 GEOM::GEOM_Object_ptr thePlane)
1056 MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
1057 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1058 return myTransfOp->MirrorPlaneCopy(theObject, thePlane);
1061 //=============================================================================
1063 //=============================================================================
1064 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject,
1065 GEOM::GEOM_Object_ptr theAxis)
1067 MESSAGE("GEOM_Superv_i::MirrorAxis");
1068 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1069 return myTransfOp->MirrorAxis(theObject, theAxis);
1072 //=============================================================================
1074 //=============================================================================
1075 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
1076 GEOM::GEOM_Object_ptr theAxis)
1078 MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
1079 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1080 return myTransfOp->MirrorAxisCopy(theObject, theAxis);
1083 //=============================================================================
1085 //=============================================================================
1086 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject,
1087 GEOM::GEOM_Object_ptr thePoint)
1089 MESSAGE("GEOM_Superv_i::MirrorPoint");
1090 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1091 return myTransfOp->MirrorPoint(theObject, thePoint);
1094 //=============================================================================
1096 //=============================================================================
1097 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
1098 GEOM::GEOM_Object_ptr thePoint)
1100 MESSAGE("GEOM_Superv_i::MirrorPointCopy");
1101 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1102 return myTransfOp->MirrorPointCopy(theObject, thePoint);
1105 //=============================================================================
1107 //=============================================================================
1108 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject,
1109 CORBA::Double theOffset)
1111 MESSAGE("GEOM_Superv_i::OffsetShape");
1112 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1113 return myTransfOp->OffsetShape(theObject, theOffset);
1116 //=============================================================================
1118 //=============================================================================
1119 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
1120 CORBA::Double theOffset)
1122 MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1123 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1124 return myTransfOp->OffsetShapeCopy(theObject, theOffset);
1127 //=============================================================================
1129 //=============================================================================
1130 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject,
1131 GEOM::GEOM_Object_ptr thePoint,
1132 CORBA::Double theFactor)
1134 MESSAGE("GEOM_Superv_i::ScaleShape");
1135 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1136 return myTransfOp->ScaleShape(theObject, thePoint, theFactor);
1139 //=============================================================================
1141 //=============================================================================
1142 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
1143 GEOM::GEOM_Object_ptr thePoint,
1144 CORBA::Double theFactor)
1146 MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
1147 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1148 return myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
1151 //=============================================================================
1153 //=============================================================================
1154 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
1155 GEOM::GEOM_Object_ptr theStartLCS,
1156 GEOM::GEOM_Object_ptr theEndLCS)
1158 MESSAGE("GEOM_Superv_i::PositionShape");
1159 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1160 return myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
1163 //=============================================================================
1164 // PositionShapeCopy:
1165 //=============================================================================
1166 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
1167 GEOM::GEOM_Object_ptr theStartLCS,
1168 GEOM::GEOM_Object_ptr theEndLCS)
1170 MESSAGE("GEOM_Superv_i::PositionShapeCopy");
1171 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1172 return myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
1175 //=============================== ShapesOperations ============================
1176 //=============================================================================
1178 //=============================================================================
1179 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
1180 GEOM::GEOM_Object_ptr thePnt2)
1182 MESSAGE("GEOM_Superv_i::MakeEdge");
1183 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1184 return myShapesOp->MakeEdge(thePnt1, thePnt2);
1187 //=============================================================================
1189 //=============================================================================
1190 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires)
1192 MESSAGE("GEOM_Superv_i::MakeWire");
1193 if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW =
1194 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
1195 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1196 return myShapesOp->MakeWire(aListImplEW->GetList());
1201 //=============================================================================
1203 //=============================================================================
1204 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
1205 CORBA::Boolean isPlanarWanted)
1207 MESSAGE("GEOM_Superv_i::MakeFace");
1208 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1209 return myShapesOp->MakeFace(theWire, isPlanarWanted);
1212 //=============================================================================
1214 //=============================================================================
1215 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires,
1216 CORBA::Boolean isPlanarWanted)
1218 MESSAGE("GEOM_Superv_i::MakeFaceWires");
1219 if (GEOM_List_i<GEOM::ListOfGO>* aListImplW =
1220 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
1221 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1222 return myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
1227 //=============================================================================
1229 //=============================================================================
1230 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells)
1232 MESSAGE("GEOM_Superv_i::MakeShell");
1233 if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS =
1234 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
1235 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1236 return myShapesOp->MakeShell(aListImplFS->GetList());
1241 //=============================================================================
1243 //=============================================================================
1244 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
1246 MESSAGE("GEOM_Superv_i::MakeSolidShell");
1247 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1248 return myShapesOp->MakeSolidShell(theShell);
1251 //=============================================================================
1253 //=============================================================================
1254 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells)
1256 MESSAGE("GEOM_Superv_i::MakeSolidShells");
1257 if (GEOM_List_i<GEOM::ListOfGO>* aListImplS =
1258 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
1259 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1260 return myShapesOp->MakeSolidShells(aListImplS->GetList());
1265 //=============================================================================
1267 //=============================================================================
1268 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes)
1270 MESSAGE("GEOM_Superv_i::MakeCompound");
1271 if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
1272 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
1273 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1274 return myShapesOp->MakeCompound(aListImpl->GetList());
1279 //=============================================================================
1281 //=============================================================================
1282 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
1283 const CORBA::Double theTolerance)
1285 MESSAGE("GEOM_Superv_i::MakeGlueFaces");
1286 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1287 return myShapesOp->MakeGlueFaces(theShape, theTolerance);
1290 //=============================================================================
1292 //=============================================================================
1293 GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
1294 const CORBA::Long theShapeType,
1295 const CORBA::Boolean isSorted)
1297 MESSAGE("GEOM_Superv_i::MakeExplode");
1298 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1300 GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
1301 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1302 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1303 return aListPtr->_this();
1306 //=============================================================================
1308 //=============================================================================
1309 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
1311 MESSAGE("GEOM_Superv_i::NumberOfFaces");
1312 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1313 return myShapesOp->NumberOfFaces(theShape);
1316 //=============================================================================
1318 //=============================================================================
1319 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
1321 MESSAGE("GEOM_Superv_i::NumberOfEdges");
1322 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1323 return myShapesOp->NumberOfEdges(theShape);
1326 //=============================================================================
1327 // ChangeOrientation:
1328 //=============================================================================
1329 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
1331 MESSAGE("GEOM_Superv_i::ChangeOrientation");
1332 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1333 return myShapesOp->ChangeOrientation(theShape);
1337 //=============================== BlocksOperations ============================
1338 //=============================================================================
1339 // MakeQuad4Vertices:
1340 //=============================================================================
1341 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
1342 GEOM::GEOM_Object_ptr thePnt2,
1343 GEOM::GEOM_Object_ptr thePnt3,
1344 GEOM::GEOM_Object_ptr thePnt4)
1346 MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
1347 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1348 return myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
1351 //=============================================================================
1353 //=============================================================================
1354 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
1355 GEOM::GEOM_Object_ptr theEdge2,
1356 GEOM::GEOM_Object_ptr theEdge3,
1357 GEOM::GEOM_Object_ptr theEdge4)
1359 MESSAGE("GEOM_Superv_i::MakeQuad");
1360 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1361 return myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
1364 //=============================================================================
1366 //=============================================================================
1367 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
1368 GEOM::GEOM_Object_ptr theEdge2)
1370 MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
1371 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1372 return myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
1375 //=============================================================================
1377 //=============================================================================
1378 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
1379 GEOM::GEOM_Object_ptr theFace2,
1380 GEOM::GEOM_Object_ptr theFace3,
1381 GEOM::GEOM_Object_ptr theFace4,
1382 GEOM::GEOM_Object_ptr theFace5,
1383 GEOM::GEOM_Object_ptr theFace6)
1385 MESSAGE("GEOM_Superv_i::MakeHexa");
1386 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1387 return myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
1390 //=============================================================================
1392 //=============================================================================
1393 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
1394 GEOM::GEOM_Object_ptr theFace2)
1396 MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
1397 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1398 return myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
1401 //=============================================================================
1403 //=============================================================================
1404 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
1405 const CORBA::Double theX,
1406 const CORBA::Double theY,
1407 const CORBA::Double theZ,
1408 const CORBA::Double theEpsilon)
1410 MESSAGE("GEOM_Superv_i::GetPoint");
1411 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1412 return myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
1415 //=============================================================================
1417 //=============================================================================
1418 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
1419 GEOM::GEOM_Object_ptr thePoint1,
1420 GEOM::GEOM_Object_ptr thePoint2)
1422 MESSAGE("GEOM_Superv_i::GetEdge");
1423 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1424 return myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
1427 //=============================================================================
1428 // GetEdgeNearPoint:
1429 //=============================================================================
1430 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
1431 GEOM::GEOM_Object_ptr thePoint)
1433 MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
1434 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1435 return myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
1438 //=============================================================================
1440 //=============================================================================
1441 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
1442 GEOM::GEOM_Object_ptr thePoint1,
1443 GEOM::GEOM_Object_ptr thePoint2,
1444 GEOM::GEOM_Object_ptr thePoint3,
1445 GEOM::GEOM_Object_ptr thePoint4)
1447 MESSAGE("GEOM_Superv_i::GetFaceByPoints");
1448 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1449 return myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
1452 //=============================================================================
1454 //=============================================================================
1455 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
1456 GEOM::GEOM_Object_ptr theEdge1,
1457 GEOM::GEOM_Object_ptr theEdge2)
1459 MESSAGE("GEOM_Superv_i::GetFaceByEdges");
1460 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1461 return myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
1464 //=============================================================================
1466 //=============================================================================
1467 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
1468 GEOM::GEOM_Object_ptr theFace)
1470 MESSAGE("GEOM_Superv_i::GetOppositeFace");
1471 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1472 return myBlocksOp->GetOppositeFace(theBlock, theFace);
1475 //=============================================================================
1476 // GetFaceNearPoint:
1477 //=============================================================================
1478 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
1479 GEOM::GEOM_Object_ptr thePoint)
1481 MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
1482 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1483 return myBlocksOp->GetFaceNearPoint(theShape, thePoint);
1486 //=============================================================================
1487 // GetFaceByNormale:
1488 //=============================================================================
1489 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
1490 GEOM::GEOM_Object_ptr theVector)
1492 MESSAGE("GEOM_Superv_i::GetFaceByNormale");
1493 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1494 return myBlocksOp->GetFaceByNormale(theBlock, theVector);
1497 //=============================================================================
1498 // IsCompoundOfBlocks:
1499 //=============================================================================
1500 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
1501 const CORBA::Long theMinNbFaces,
1502 const CORBA::Long theMaxNbFaces,
1503 CORBA::Long& theNbBlocks)
1505 MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
1506 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1507 return myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
1510 //=============================================================================
1511 // CheckCompoundOfBlocks:
1512 //=============================================================================
1513 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks
1514 (GEOM::GEOM_Object_ptr theCompound,
1515 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
1517 MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
1518 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1519 return myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
1522 //=============================================================================
1524 //=============================================================================
1525 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
1526 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
1528 MESSAGE("GEOM_Superv_i::PrintBCErrors");
1529 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1530 return myBlocksOp->PrintBCErrors(theCompound, theErrors);
1533 //=============================================================================
1534 // ExplodeCompoundOfBlocks:
1535 //=============================================================================
1536 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
1537 const CORBA::Long theMinNbFaces,
1538 const CORBA::Long theMaxNbFaces)
1540 MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
1541 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1542 GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
1543 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
1544 return aListPtr->_this();
1547 //=============================================================================
1548 // GetBlockNearPoint:
1549 //=============================================================================
1550 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
1551 GEOM::GEOM_Object_ptr thePoint)
1553 MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
1554 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1555 return myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
1558 //=============================================================================
1560 //=============================================================================
1561 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
1562 GEOM::GEOM_List_ptr theParts)
1564 MESSAGE("GEOM_Superv_i::GetBlockByParts");
1565 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1566 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
1567 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1568 return myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
1573 //=============================================================================
1574 // GetBlocksByParts:
1575 //=============================================================================
1576 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
1577 GEOM::GEOM_List_ptr theParts)
1579 MESSAGE("GEOM_Superv_i::GetBlocksByParts");
1580 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1581 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
1582 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1584 GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
1585 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
1586 return aListPtr->_this();
1591 //=============================================================================
1592 // MakeMultiTransformation1D:
1593 //=============================================================================
1594 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
1595 const CORBA::Long theDirFace1,
1596 const CORBA::Long theDirFace2,
1597 const CORBA::Long theNbTimes)
1599 MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
1600 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1601 return myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
1604 //=============================================================================
1605 // MakeMultiTransformation2D:
1606 //=============================================================================
1607 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D
1608 (GEOM::GEOM_Object_ptr theBlock,
1609 const CORBA::Long theDirFace1U,
1610 const CORBA::Long theDirFace2U,
1611 const CORBA::Long theNbTimesU,
1612 const CORBA::Long theDirFace1V,
1613 const CORBA::Long theDirFace2V,
1614 const CORBA::Long theNbTimesV)
1616 MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
1617 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1618 return myBlocksOp->MakeMultiTransformation2D(theBlock,
1619 theDirFace1U, theDirFace2U, theNbTimesU,
1620 theDirFace1V, theDirFace2V, theNbTimesV);
1623 //=============================== CurvesOperations ============================
1624 //=============================================================================
1625 // MakeCirclePntVecR:
1626 //=============================================================================
1627 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
1628 GEOM::GEOM_Object_ptr theVector,
1631 MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
1632 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1633 return myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
1636 //=============================================================================
1637 // MakeCircleThreePnt:
1638 //=============================================================================
1639 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
1640 GEOM::GEOM_Object_ptr thePnt2,
1641 GEOM::GEOM_Object_ptr thePnt3)
1643 MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
1644 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1645 return myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
1648 //=============================================================================
1650 //=============================================================================
1651 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
1652 GEOM::GEOM_Object_ptr theVector,
1653 CORBA::Double theRMajor,
1654 CORBA::Double theRMinor)
1656 MESSAGE("GEOM_Superv_i::MakeEllipse");
1657 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1658 return myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
1661 //=============================================================================
1663 //=============================================================================
1664 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
1665 GEOM::GEOM_Object_ptr thePnt2,
1666 GEOM::GEOM_Object_ptr thePnt3)
1668 MESSAGE("GEOM_Superv_i::MakeArc");
1669 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1670 return myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
1673 //=============================================================================
1675 //=============================================================================
1676 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints)
1678 MESSAGE("GEOM_Superv_i::MakePolyline");
1679 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1680 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
1681 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1682 return myCurvesOp->MakePolyline(aListImplP->GetList());
1687 //=============================================================================
1688 // MakeSplineBezier:
1689 //=============================================================================
1690 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints)
1692 MESSAGE("GEOM_Superv_i::MakeSplineBezier");
1693 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1694 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
1695 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1696 return myCurvesOp->MakeSplineBezier(aListImplP->GetList());
1701 //=============================================================================
1702 // MakeSplineInterpolation:
1703 //=============================================================================
1704 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints)
1706 MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
1707 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1708 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
1709 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1710 return myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
1715 //=============================================================================
1717 //=============================================================================
1718 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand,
1719 GEOM::GEOM_List_ptr theWorkingPlane)
1721 MESSAGE("GEOM_Superv_i::MakeSketcher");
1722 if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP =
1723 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
1724 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1725 return myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
1730 //=============================== LocalOperations =============================
1731 //=============================================================================
1733 //=============================================================================
1734 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
1737 MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
1738 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1739 return myLocalOp->MakeFilletAll(theShape, theR);
1742 //=============================================================================
1744 //=============================================================================
1745 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape,
1747 GEOM::GEOM_List_ptr theEdges)
1749 MESSAGE("GEOM_Superv_i::MakeFilletEdges");
1750 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
1751 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
1752 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1753 return myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
1758 //=============================================================================
1760 //=============================================================================
1761 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape,
1763 GEOM::GEOM_List_ptr theFaces)
1765 MESSAGE("GEOM_Superv_i::MakeFilletFaces");
1766 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
1767 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
1768 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1769 return myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
1774 //=============================================================================
1776 //=============================================================================
1777 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
1779 MESSAGE("GEOM_Superv_i::MakeChamferAll");
1780 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1781 return myLocalOp->MakeChamferAll(theShape, theD);
1784 //=============================================================================
1786 //=============================================================================
1787 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
1788 CORBA::Double theD1, CORBA::Double theD2,
1789 CORBA::Long theFace1, CORBA::Long theFace2)
1791 MESSAGE("GEOM_Superv_i::MakeChamferEdge");
1792 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1793 return myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
1796 //=============================================================================
1797 // MakeChamferFaces:
1798 //=============================================================================
1799 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
1800 CORBA::Double theD1, CORBA::Double theD2,
1801 GEOM::GEOM_List_ptr theFaces)
1803 MESSAGE("GEOM_Superv_i::MakeChamferFaces");
1804 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
1805 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
1806 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1807 return myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
1812 //=============================================================================
1814 //=============================================================================
1815 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
1816 CORBA::Double theWeight,
1817 CORBA::Double theWaterDensity,
1818 CORBA::Double theMeshingDeflection)
1820 MESSAGE("GEOM_Superv_i::MakeArchimede");
1821 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1822 return myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
1825 //=============================================================================
1826 // GetSubShapeIndexMakeFilletAll:
1827 //=============================================================================
1828 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
1829 GEOM::GEOM_Object_ptr theSubShape)
1831 MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
1832 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1833 return myLocalOp->GetSubShapeIndex(theShape, theSubShape);
1836 //=============================== GroupOperations =============================
1837 //=============================================================================
1839 //=============================================================================
1840 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
1841 CORBA::Long theShapeType)
1843 MESSAGE("GEOM_Superv_i::CreateGroup");
1844 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1845 return myGroupOp->CreateGroup(theMainShape, theShapeType);
1848 //=============================================================================
1850 //=============================================================================
1851 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup,
1852 CORBA::Long theSubShapeId)
1854 MESSAGE("GEOM_Superv_i::AddObject");
1855 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1856 myGroupOp->AddObject(theGroup, theSubShapeId);
1859 //=============================================================================
1861 //=============================================================================
1862 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup,
1863 CORBA::Long theSubShapeId)
1865 MESSAGE("GEOM_Superv_i::RemoveObject");
1866 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1867 myGroupOp->RemoveObject(theGroup, theSubShapeId);
1870 //=============================================================================
1872 //=============================================================================
1873 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
1875 MESSAGE("GEOM_Superv_i::GetType");
1876 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1877 return myGroupOp->GetType(theGroup);
1880 //=============================================================================
1882 //=============================================================================
1883 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
1885 MESSAGE("GEOM_Superv_i::GetMainShape");
1886 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1887 return myGroupOp->GetMainShape(theGroup);
1890 //=============================================================================
1892 //=============================================================================
1893 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
1895 MESSAGE("GEOM_Superv_i::GetObjects");
1896 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1898 GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
1899 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
1900 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1901 return aListPtr->_this();
1904 //=====================================================================================
1906 //=====================================================================================
1909 PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
1910 PortableServer::POA_ptr poa,
1911 PortableServer::ObjectId * contId,
1912 const char *instanceName,
1913 const char * interfaceName)
1915 GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
1916 myGEOM_Superv_i->register_name("/myGEOM_Superv");
1917 return myGEOM_Superv_i->getId() ;