1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/
21 #include "GEOM_Superv_i.hh"
22 #include "SALOME_LifeCycleCORBA.hxx"
24 //=============================================================================
26 //=============================================================================
27 GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
28 PortableServer::POA_ptr poa,
29 PortableServer::ObjectId * contId,
30 const char *instanceName,
31 const char *interfaceName) :
32 Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
34 MESSAGE("GEOM_Superv_i::GEOM_Superv_i");
37 _id = _poa->activate_object(_thisObj);
38 name_service = new SALOME_NamingService(_orb);
39 //get RootPOA (the default)
40 //myPOA = PortableServer::RefCountServantBase::_default_POA();
41 CORBA::Object_var anObj = _orb->resolve_initial_references("RootPOA");
42 myPOA = PortableServer::POA::_narrow(anObj);
48 myBasicOp = GEOM::GEOM_IBasicOperations::_nil();
49 my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil();
50 myBoolOp = GEOM::GEOM_IBooleanOperations::_nil();
51 myInsOp = GEOM::GEOM_IInsertOperations::_nil();
52 myTransfOp = GEOM::GEOM_ITransformOperations::_nil();
53 myShapesOp = GEOM::GEOM_IShapesOperations::_nil();
54 myBlocksOp = GEOM::GEOM_IBlocksOperations::_nil();
55 myCurvesOp = GEOM::GEOM_ICurvesOperations::_nil();
56 myLocalOp = GEOM::GEOM_ILocalOperations::_nil();
57 myGroupOp = GEOM::GEOM_IGroupOperations::_nil();
60 //=============================================================================
62 //=============================================================================
63 GEOM_Superv_i::~GEOM_Superv_i()
65 MESSAGE("GEOM_Superv_i::~GEOM_Superv_i");
69 //============================================================================
70 // function : register()
71 // purpose : register 'name' in 'name_service'
72 //============================================================================
73 void GEOM_Superv_i::register_name(char * name)
75 GEOM::GEOM_Superv_ptr g = GEOM::GEOM_Superv::_narrow(POA_GEOM::GEOM_Superv::_this());
76 name_service->Register(g, strdup(name));
79 //=============================================================================
81 //=============================================================================
82 void GEOM_Superv_i::setGeomEngine()
84 // get GEOM_Gen engine
85 SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
86 Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" );
88 myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
91 //=============================================================================
93 //=============================================================================
94 void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
99 //=============================================================================
101 //=============================================================================
102 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfGO()
104 MESSAGE("GEOM_Superv_i::CreateListOfGO()");
105 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>();
106 return aListPtr->_this();
109 //=============================================================================
110 // AddItemToListOfGO:
111 //=============================================================================
112 void GEOM_Superv_i::AddItemToListOfGO(GEOM::GEOM_List_ptr& theList,
113 GEOM::GEOM_Object_ptr theObject)
115 MESSAGE("GEOM_Superv_i::AddItemToListOfGO(...)");
116 if (GEOM_List_i<GEOM::ListOfGO>* aList =
117 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theList, myPOA).in())) {
118 aList->AddObject(theObject);
119 MESSAGE(" NewLength = "<<aList->GetList().length());
123 //=============================================================================
125 //=============================================================================
126 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfLong()
128 MESSAGE("GEOM_Superv_i::CreateListOfLong()");
129 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>();
130 return aListPtr->_this();
133 //=============================================================================
134 // AddItemToListOfLong:
135 //=============================================================================
136 void GEOM_Superv_i::AddItemToListOfLong(GEOM::GEOM_List_ptr& theList,
139 MESSAGE("GEOM_Superv_i::AddItemToListOfLong(...)");
140 if (GEOM_List_i<GEOM::ListOfLong>* aList =
141 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theList, myPOA).in())) {
142 aList->AddObject(theObject);
143 MESSAGE(" NewLength = "<<aList->GetList().length());
147 //=============================================================================
148 // CreateListOfDouble:
149 //=============================================================================
150 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfDouble()
152 MESSAGE("GEOM_Superv_i::CreateListOfDouble()");
153 GEOM_List_i<GEOM::ListOfDouble>* aListPtr = new GEOM_List_i<GEOM::ListOfDouble>();
154 return aListPtr->_this();
157 //=============================================================================
158 // AddItemToListOfDouble:
159 //=============================================================================
160 void GEOM_Superv_i::AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList,
163 MESSAGE("GEOM_Superv_i::AddItemToListOfDouble(...)");
164 if (GEOM_List_i<GEOM::ListOfDouble>* aList =
165 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theList, myPOA).in())) {
166 aList->AddObject(theObject);
167 MESSAGE(" NewLength = "<<aList->GetList().length());
171 //=============================================================================
173 //=============================================================================
174 void GEOM_Superv_i::getBasicOp()
176 if (CORBA::is_nil(myGeomEngine))
178 // get GEOM_IBasicOperations interface
179 myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
182 //=============================================================================
184 //=============================================================================
185 void GEOM_Superv_i::get3DPrimOp()
187 if (CORBA::is_nil(myGeomEngine))
189 // get GEOM_I3DPrimOperations interface
190 my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
193 //=============================================================================
195 //=============================================================================
196 void GEOM_Superv_i::getBoolOp()
198 if (CORBA::is_nil(myGeomEngine))
200 // get GEOM_IBooleanOperations interface
201 myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
204 //=============================================================================
206 //=============================================================================
207 void GEOM_Superv_i::getInsOp()
209 if (CORBA::is_nil(myGeomEngine))
211 // get GEOM_IInsertOperations interface
212 myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
215 //=============================================================================
217 //=============================================================================
218 void GEOM_Superv_i::getTransfOp()
220 if (CORBA::is_nil(myGeomEngine))
222 // get GEOM_ITransformOperations interface
223 myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
226 //=============================================================================
228 //=============================================================================
229 void GEOM_Superv_i::getShapesOp()
231 if (CORBA::is_nil(myGeomEngine))
233 // get GEOM_IShapesOperations interface
234 myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
237 //=============================================================================
239 //=============================================================================
240 void GEOM_Superv_i::getBlocksOp()
242 if (CORBA::is_nil(myGeomEngine))
244 // get GEOM_IBlocksOperations interface
245 myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
248 //=============================================================================
250 //=============================================================================
251 void GEOM_Superv_i::getCurvesOp()
253 if (CORBA::is_nil(myGeomEngine))
255 // get GEOM_ICurvesOperations interface
256 myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
259 //=============================================================================
261 //=============================================================================
262 void GEOM_Superv_i::getLocalOp()
264 if (CORBA::is_nil(myGeomEngine))
266 // get GEOM_ILocalOperations interface
267 myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
270 //=============================================================================
272 //=============================================================================
273 void GEOM_Superv_i::getGroupOp()
275 if (CORBA::is_nil(myGeomEngine))
277 // get GEOM_IGroupOperations interface
278 myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
281 //=============================================================================
283 //=============================================================================
284 PortableServer::ServantBase_var GEOM_Superv_i::GetServant(CORBA::Object_ptr theObject,
285 PortableServer::POA_ptr thePOA)
287 if(CORBA::is_nil(theObject)) return NULL;
288 PortableServer::Servant aServant = thePOA->reference_to_servant(theObject);
292 //============================================================================
294 // purpose : save OCAF/Geom document
295 //============================================================================
296 SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
300 SALOMEDS::TMPFile_var aStreamFile;
301 return aStreamFile._retn();
304 //============================================================================
305 // function : SaveASCII()
307 //============================================================================
308 SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
312 SALOMEDS::TMPFile_var aStreamFile;
313 return aStreamFile._retn();
316 //============================================================================
319 //============================================================================
320 CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
321 const SALOMEDS::TMPFile& theStream,
328 //============================================================================
329 // function : LoadASCII()
331 //============================================================================
332 CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
333 const SALOMEDS::TMPFile& theStream,
340 //============================================================================
341 // function : Close()
343 //============================================================================
344 void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr theComponent)
347 //============================================================================
348 // function : ComponentDataType()
350 //============================================================================
351 char* GEOM_Superv_i::ComponentDataType()
356 //============================================================================
357 // function : IORToLocalPersistentID()
359 //============================================================================
360 char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
361 const char* IORString,
362 CORBA::Boolean isMultiFile,
363 CORBA::Boolean isASCII)
368 //============================================================================
369 // function : LocalPersistentIDToIOR()
370 // purpose : Create/Load CORBA object from a persistent ref (an entry)
371 // : Used when a study is loaded
372 // : The IOR (IORName) of object created is returned
373 //============================================================================
374 char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
375 const char* aLocalPersistentID,
376 CORBA::Boolean isMultiFile,
377 CORBA::Boolean isASCII)
382 //============================================================================
383 // function : CanPublishInStudy
385 //============================================================================
386 bool GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
388 if (CORBA::is_nil(myGeomEngine))
390 return myGeomEngine->CanPublishInStudy(theIOR);
393 //============================================================================
394 // function : PublishInStudy
396 //============================================================================
397 SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
398 SALOMEDS::SObject_ptr theSObject,
399 CORBA::Object_ptr theObject,
400 const char* theName) throw (SALOME::SALOME_Exception)
402 if (CORBA::is_nil(myGeomEngine))
404 return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
407 //============================================================================
408 // function : CanCopy()
410 //============================================================================
411 CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr theObject)
416 //============================================================================
417 // function : CopyFrom()
419 //============================================================================
420 SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID)
422 SALOMEDS::TMPFile_var aStreamFile;
423 return aStreamFile._retn();
426 //============================================================================
427 // function : CanPaste()
429 //============================================================================
430 CORBA::Boolean GEOM_Superv_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID)
435 //============================================================================
436 // function : PasteInto()
438 //============================================================================
439 SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& theStream,
440 CORBA::Long theObjectID,
441 SALOMEDS::SObject_ptr theObject)
443 SALOMEDS::SObject_var aNewSO;
444 return aNewSO._retn();
447 //================= Primitives Construction : BasicOperations =================
448 //=============================================================================
450 //=============================================================================
451 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointXYZ(CORBA::Double theX,
455 MESSAGE("GEOM_Superv_i::MakePointXYZ");
456 if (CORBA::is_nil(myBasicOp)) getBasicOp();
457 // make vertex and return
458 return myBasicOp->MakePointXYZ(theX, theY, theZ);
461 //=============================================================================
462 // MakePointWithReference:
463 //=============================================================================
464 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
469 MESSAGE("GEOM_Superv_i::MakePointWithReference");
470 if (CORBA::is_nil(myBasicOp)) getBasicOp();
471 return myBasicOp->MakePointWithReference(theReference, theX, theY, theZ);
474 //=============================================================================
476 //=============================================================================
477 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
478 CORBA::Double theParameter)
480 MESSAGE("GEOM_Superv_i::MakePointOnCurve");
481 if (CORBA::is_nil(myBasicOp)) getBasicOp();
482 return myBasicOp->MakePointOnCurve(theRefCurve, theParameter);
485 //=============================================================================
487 //=============================================================================
488 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorDXDYDZ (CORBA::Double theDX,
492 MESSAGE("GEOM_Superv_i::MakeVectorDXDYDZ");
493 if (CORBA::is_nil(myBasicOp)) getBasicOp();
494 return myBasicOp->MakeVectorDXDYDZ(theDX, theDY, theDZ);
497 //=============================================================================
499 //=============================================================================
500 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
501 GEOM::GEOM_Object_ptr thePnt2)
503 MESSAGE("GEOM_Superv_i::MakeVector");
504 if (CORBA::is_nil(myBasicOp)) getBasicOp();
505 return myBasicOp->MakeVectorTwoPnt(thePnt1, thePnt2);
508 //=============================================================================
510 //=============================================================================
511 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
512 GEOM::GEOM_Object_ptr thePnt2)
514 MESSAGE("GEOM_Superv_i::MakeLineTwoPnt");
515 if (CORBA::is_nil(myBasicOp)) getBasicOp();
516 return myBasicOp->MakeLineTwoPnt(thePnt1, thePnt2);
519 //=============================================================================
520 // MakePlaneThreePnt:
521 //=============================================================================
522 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
523 GEOM::GEOM_Object_ptr thePnt2,
524 GEOM::GEOM_Object_ptr thePnt3,
525 CORBA::Double theTrimSize)
527 MESSAGE("GEOM_Superv_i::MakePlaneThreePnt");
528 if (CORBA::is_nil(myBasicOp)) getBasicOp();
529 return myBasicOp->MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize);
532 //=============================================================================
534 //=============================================================================
535 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
536 GEOM::GEOM_Object_ptr theVec,
537 CORBA::Double theTrimSize)
539 MESSAGE("GEOM_Superv_i::MakePlanePntVec");
540 if (CORBA::is_nil(myBasicOp)) getBasicOp();
541 return myBasicOp->MakePlanePntVec(thePnt, theVec, theTrimSize);
544 //=============================================================================
546 //=============================================================================
547 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
548 CORBA::Double theTrimSize)
550 MESSAGE("GEOM_Superv_i::MakePlaneFace");
551 if (CORBA::is_nil(myBasicOp)) getBasicOp();
552 return myBasicOp->MakePlaneFace(theFace, theTrimSize);
555 //=============================================================================
557 //=============================================================================
558 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarker
559 (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
560 CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
561 CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
563 MESSAGE("GEOM_Superv_i::MakeMarker");
564 if (CORBA::is_nil(myBasicOp)) getBasicOp();
565 return myBasicOp->MakeMarker(theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ);
568 //================= Primitives Construction : 3DPrimOperations ================
569 //=============================================================================
571 //=============================================================================
572 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBox (CORBA::Double theX1,
579 MESSAGE("GEOM_Superv_i::MakeBox");
580 if (CORBA::is_nil(myBasicOp)) getBasicOp();
581 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
582 return my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1),
583 myBasicOp->MakePointXYZ(theX2, theY2, theZ2));
586 //=============================================================================
588 //=============================================================================
589 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxDXDYDZ (CORBA::Double theDX,
593 MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ");
594 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
595 return my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ);
598 //=============================================================================
600 //=============================================================================
601 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
602 GEOM::GEOM_Object_ptr thePnt2)
604 MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt");
605 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
606 return my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2);
609 //=============================================================================
610 // MakeCylinderPntVecRH:
611 //=============================================================================
612 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
613 GEOM::GEOM_Object_ptr theAxis,
614 CORBA::Double theRadius,
615 CORBA::Double theHeight)
617 MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH");
618 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
619 return my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight);
622 //=============================================================================
624 //=============================================================================
625 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR,
628 MESSAGE("GEOM_Superv_i::MakeCylinderRH");
629 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
630 return my3DPrimOp->MakeCylinderRH(theR, theH);
633 //=============================================================================
635 //=============================================================================
636 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere (CORBA::Double theX,
639 CORBA::Double theRadius)
641 MESSAGE("GEOM_Superv_i::MakeSphepe");
642 if (CORBA::is_nil(myBasicOp)) getBasicOp();
643 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
644 return my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
647 //=============================================================================
649 //=============================================================================
650 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
652 MESSAGE("GEOM_Superv_i::MakeSphereR");
653 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
654 return my3DPrimOp->MakeSphereR(theR);
657 //=============================================================================
659 //=============================================================================
660 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
663 MESSAGE("GEOM_Superv_i::MakeSpherePntR");
664 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
665 return my3DPrimOp->MakeSpherePntR(thePnt, theR);
668 //=============================================================================
669 // MakeTorusPntVecRR:
670 //=============================================================================
671 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
672 GEOM::GEOM_Object_ptr theVec,
673 CORBA::Double theRMajor,
674 CORBA::Double theRMinor)
676 MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
677 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
678 return my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
681 //=============================================================================
683 //=============================================================================
684 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor,
685 CORBA::Double theRMinor)
687 MESSAGE("GEOM_Superv_i::MakeTorusRR");
688 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
689 return my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
692 //=============================================================================
693 // MakeConePntVecR1R2H:
694 //=============================================================================
695 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
696 GEOM::GEOM_Object_ptr theAxis,
699 CORBA::Double theHeight)
701 MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
702 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
703 return my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
706 //=============================================================================
708 //=============================================================================
709 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1,
711 CORBA::Double theHeight)
713 MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
714 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
715 return my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
718 //=============================================================================
720 //=============================================================================
721 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
722 GEOM::GEOM_Object_ptr theVec,
725 MESSAGE("GEOM_Superv_i::MakePrismVecH");
726 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
727 return my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
731 //=============================================================================
733 //=============================================================================
734 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
735 GEOM::GEOM_Object_ptr thePoint1,
736 GEOM::GEOM_Object_ptr thePoint2)
738 MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
739 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
740 return my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
743 //=============================================================================
745 //=============================================================================
746 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase,
747 GEOM::GEOM_Object_ptr thePath)
749 MESSAGE("GEOM_Superv_i::MakePipe");
750 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
751 return my3DPrimOp->MakePipe(theBase, thePath);
754 //=============================================================================
755 // MakeRevolutionAxisAngle:
756 //=============================================================================
757 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
758 GEOM::GEOM_Object_ptr theAxis,
759 CORBA::Double theAngle)
761 MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
762 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
763 return my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
766 //=============================================================================
768 //=============================================================================
769 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
770 CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
771 CORBA::Double theTol2D, CORBA::Double theTol3D,
772 CORBA::Long theNbIter)
774 MESSAGE("GEOM_Superv_i::MakeFilling");
775 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
776 return my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter);
779 //============================= BooleanOperations =============================
780 //=============================================================================
782 //=============================================================================
783 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
784 GEOM::GEOM_Object_ptr theShape2,
785 CORBA::Long theOperation)
787 // theOperation indicates the operation to be done:
788 // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
789 MESSAGE("GEOM_Superv_i::MakeBoolean");
790 if (CORBA::is_nil(myBoolOp)) getBoolOp();
791 return myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
794 //=============================================================================
796 //=============================================================================
797 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1,
798 GEOM::GEOM_Object_ptr theShape2)
800 MESSAGE("GEOM_Superv_i::MakeFuse");
801 if (CORBA::is_nil(myBoolOp)) getBoolOp();
802 return myBoolOp->MakeBoolean(theShape1, theShape2, 3);
805 //=============================================================================
807 //=============================================================================
808 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr theShapes,
809 GEOM::GEOM_List_ptr theTools,
810 GEOM::GEOM_List_ptr theKeepInside,
811 GEOM::GEOM_List_ptr theRemoveInside,
812 CORBA::Short theLimit,
813 CORBA::Boolean theRemoveWebs,
814 GEOM::GEOM_List_ptr theMaterials)
816 MESSAGE("GEOM_Superv_i::MakePartition");
817 GEOM_List_i<GEOM::ListOfGO>* aListImplS =
818 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in());
819 GEOM_List_i<GEOM::ListOfGO>* aListImplT =
820 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theTools, myPOA).in());
821 GEOM_List_i<GEOM::ListOfGO>* aListImplKI =
822 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theKeepInside, myPOA).in());
823 GEOM_List_i<GEOM::ListOfGO>* aListImplRI =
824 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theRemoveInside, myPOA).in());
825 GEOM_List_i<GEOM::ListOfLong>* aListImplM =
826 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theMaterials, myPOA).in());
827 if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
828 if (CORBA::is_nil(myBoolOp)) getBoolOp();
829 return myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(),
830 aListImplKI->GetList(), aListImplRI->GetList(),
831 theLimit, theRemoveWebs, aListImplM->GetList());
836 //=============================================================================
837 // MakeHalfPartition:
838 //=============================================================================
839 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
840 GEOM::GEOM_Object_ptr thePlane)
842 MESSAGE("GEOM_Superv_i::MakeHalfPartition");
843 if (CORBA::is_nil(myBoolOp)) getBoolOp();
844 return myBoolOp->MakeHalfPartition(theShape, thePlane);
847 //============================== InsertOperations =============================
848 //=============================================================================
850 //=============================================================================
851 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
853 MESSAGE("GEOM_Superv_i::MakeCopy");
854 if (CORBA::is_nil(myInsOp)) getInsOp();
855 return myInsOp->MakeCopy(theOriginal);
858 //=============================================================================
860 //=============================================================================
861 void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject,
862 const char* theFileName,
863 const char* theFormatName)
865 MESSAGE("GEOM_Superv_i::Export");
866 if (CORBA::is_nil(myInsOp)) getInsOp();
867 myInsOp->Export(theObject, theFileName, theFormatName);
870 //=============================================================================
872 //=============================================================================
873 GEOM::GEOM_Object_ptr GEOM_Superv_i::Import (const char* theFileName,
874 const char* theFormatName)
876 MESSAGE("GEOM_Superv_i::Import");
877 if (CORBA::is_nil(myInsOp)) getInsOp();
878 return myInsOp->Import(theFileName, theFormatName);
881 //=============================================================================
882 // ImportTranslators:
883 //=============================================================================
884 void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
885 GEOM::string_array_out thePatterns)
887 MESSAGE("GEOM_Superv_i::ImportTranslators");
888 if (CORBA::is_nil(myInsOp)) getInsOp();
889 myInsOp->ImportTranslators(theFormats, thePatterns);
892 //=============================================================================
893 // ExportTranslators:
894 //=============================================================================
895 void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
896 GEOM::string_array_out thePatterns)
898 MESSAGE("GEOM_Superv_i::ExportTranslators");
899 if (CORBA::is_nil(myInsOp)) getInsOp();
900 myInsOp->ExportTranslators(theFormats, thePatterns);
903 //============================= TransformOperations ===========================
904 //=============================================================================
905 // TranslateTwoPoints:
906 //=============================================================================
907 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
908 GEOM::GEOM_Object_ptr thePoint1,
909 GEOM::GEOM_Object_ptr thePoint2)
911 MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
912 if (CORBA::is_nil(myTransfOp)) getTransfOp();
913 return myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
916 //=============================================================================
917 // TranslateTwoPointsCopy:
918 //=============================================================================
919 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
920 GEOM::GEOM_Object_ptr thePoint1,
921 GEOM::GEOM_Object_ptr thePoint2)
923 MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
924 if (CORBA::is_nil(myTransfOp)) getTransfOp();
925 return myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
928 //=============================================================================
930 //=============================================================================
931 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
936 MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
937 if (CORBA::is_nil(myTransfOp)) getTransfOp();
938 return myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
941 //=============================================================================
942 // TranslateDXDYDZCopy:
943 //=============================================================================
944 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
949 MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
950 if (CORBA::is_nil(myTransfOp)) getTransfOp();
951 return myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
954 //=============================================================================
956 //=============================================================================
957 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject,
958 GEOM::GEOM_Object_ptr theVector)
960 MESSAGE("GEOM_Superv_i::TranslateVector");
961 if (CORBA::is_nil(myTransfOp)) getTransfOp();
962 return myTransfOp->TranslateVector(theObject, theVector);
965 //=============================================================================
966 // TranslateVectorCopy:
967 //=============================================================================
968 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
969 GEOM::GEOM_Object_ptr theVector)
971 MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
972 if (CORBA::is_nil(myTransfOp)) getTransfOp();
973 return myTransfOp->TranslateVectorCopy(theObject, theVector);
976 //=============================================================================
978 //=============================================================================
979 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
980 GEOM::GEOM_Object_ptr theVector,
981 CORBA::Double theStep,
982 CORBA::Long theNbTimes)
984 MESSAGE("GEOM_Superv_i::MultiTranslate1D");
985 if (CORBA::is_nil(myTransfOp)) getTransfOp();
986 return myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
989 //=============================================================================
991 //=============================================================================
992 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
993 GEOM::GEOM_Object_ptr theVector1,
994 CORBA::Double theStep1,
995 CORBA::Long theNbTimes1,
996 GEOM::GEOM_Object_ptr theVector2,
997 CORBA::Double theStep2,
998 CORBA::Long theNbTimes2)
1000 MESSAGE("GEOM_Superv_i::MultiTranslate2D");
1001 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1002 return myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
1003 theVector2, theStep2, theNbTimes2);
1006 //=============================================================================
1008 //=============================================================================
1009 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
1010 GEOM::GEOM_Object_ptr theAxis,
1011 CORBA::Double theAngle)
1013 MESSAGE("GEOM_Superv_i::Rotate");
1014 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1015 return myTransfOp->Rotate(theObject, theAxis, theAngle);
1018 //=============================================================================
1020 //=============================================================================
1021 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
1022 GEOM::GEOM_Object_ptr theAxis,
1023 CORBA::Double theAngle)
1025 MESSAGE("GEOM_Superv_i::RotateCopy");
1026 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1027 return myTransfOp->RotateCopy(theObject, theAxis, theAngle);
1030 //=============================================================================
1032 //=============================================================================
1033 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1034 GEOM::GEOM_Object_ptr theAxis,
1035 CORBA::Long theNbTimes)
1037 MESSAGE("GEOM_Superv_i::MultiRotate1D");
1038 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1039 return myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
1042 //=============================================================================
1044 //=============================================================================
1045 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1046 GEOM::GEOM_Object_ptr theAxis,
1047 CORBA::Double theAngle,
1048 CORBA::Long theNbTimes1,
1049 CORBA::Double theStep,
1050 CORBA::Long theNbTimes2)
1052 MESSAGE("GEOM_Superv_i::MultiRotate2D");
1053 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1054 return myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
1057 //=============================================================================
1059 //=============================================================================
1060 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject,
1061 GEOM::GEOM_Object_ptr thePlane)
1063 MESSAGE("GEOM_Superv_i::MirrorPlane");
1064 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1065 return myTransfOp->MirrorPlane(theObject, thePlane);
1068 //=============================================================================
1070 //=============================================================================
1071 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
1072 GEOM::GEOM_Object_ptr thePlane)
1074 MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
1075 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1076 return myTransfOp->MirrorPlaneCopy(theObject, thePlane);
1079 //=============================================================================
1081 //=============================================================================
1082 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject,
1083 GEOM::GEOM_Object_ptr theAxis)
1085 MESSAGE("GEOM_Superv_i::MirrorAxis");
1086 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1087 return myTransfOp->MirrorAxis(theObject, theAxis);
1090 //=============================================================================
1092 //=============================================================================
1093 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
1094 GEOM::GEOM_Object_ptr theAxis)
1096 MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
1097 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1098 return myTransfOp->MirrorAxisCopy(theObject, theAxis);
1101 //=============================================================================
1103 //=============================================================================
1104 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject,
1105 GEOM::GEOM_Object_ptr thePoint)
1107 MESSAGE("GEOM_Superv_i::MirrorPoint");
1108 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1109 return myTransfOp->MirrorPoint(theObject, thePoint);
1112 //=============================================================================
1114 //=============================================================================
1115 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
1116 GEOM::GEOM_Object_ptr thePoint)
1118 MESSAGE("GEOM_Superv_i::MirrorPointCopy");
1119 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1120 return myTransfOp->MirrorPointCopy(theObject, thePoint);
1123 //=============================================================================
1125 //=============================================================================
1126 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject,
1127 CORBA::Double theOffset)
1129 MESSAGE("GEOM_Superv_i::OffsetShape");
1130 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1131 return myTransfOp->OffsetShape(theObject, theOffset);
1134 //=============================================================================
1136 //=============================================================================
1137 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
1138 CORBA::Double theOffset)
1140 MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1141 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1142 return myTransfOp->OffsetShapeCopy(theObject, theOffset);
1145 //=============================================================================
1147 //=============================================================================
1148 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject,
1149 GEOM::GEOM_Object_ptr thePoint,
1150 CORBA::Double theFactor)
1152 MESSAGE("GEOM_Superv_i::ScaleShape");
1153 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1154 return myTransfOp->ScaleShape(theObject, thePoint, theFactor);
1157 //=============================================================================
1159 //=============================================================================
1160 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
1161 GEOM::GEOM_Object_ptr thePoint,
1162 CORBA::Double theFactor)
1164 MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
1165 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1166 return myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
1169 //=============================================================================
1171 //=============================================================================
1172 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
1173 GEOM::GEOM_Object_ptr theStartLCS,
1174 GEOM::GEOM_Object_ptr theEndLCS)
1176 MESSAGE("GEOM_Superv_i::PositionShape");
1177 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1178 return myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
1181 //=============================================================================
1182 // PositionShapeCopy:
1183 //=============================================================================
1184 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
1185 GEOM::GEOM_Object_ptr theStartLCS,
1186 GEOM::GEOM_Object_ptr theEndLCS)
1188 MESSAGE("GEOM_Superv_i::PositionShapeCopy");
1189 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1190 return myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
1193 //=============================== ShapesOperations ============================
1194 //=============================================================================
1196 //=============================================================================
1197 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
1198 GEOM::GEOM_Object_ptr thePnt2)
1200 MESSAGE("GEOM_Superv_i::MakeEdge");
1201 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1202 return myShapesOp->MakeEdge(thePnt1, thePnt2);
1205 //=============================================================================
1207 //=============================================================================
1208 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires)
1210 MESSAGE("GEOM_Superv_i::MakeWire");
1211 if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW =
1212 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
1213 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1214 return myShapesOp->MakeWire(aListImplEW->GetList());
1219 //=============================================================================
1221 //=============================================================================
1222 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
1223 CORBA::Boolean isPlanarWanted)
1225 MESSAGE("GEOM_Superv_i::MakeFace");
1226 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1227 return myShapesOp->MakeFace(theWire, isPlanarWanted);
1230 //=============================================================================
1232 //=============================================================================
1233 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires,
1234 CORBA::Boolean isPlanarWanted)
1236 MESSAGE("GEOM_Superv_i::MakeFaceWires");
1237 if (GEOM_List_i<GEOM::ListOfGO>* aListImplW =
1238 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
1239 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1240 return myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
1245 //=============================================================================
1247 //=============================================================================
1248 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells)
1250 MESSAGE("GEOM_Superv_i::MakeShell");
1251 if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS =
1252 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
1253 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1254 return myShapesOp->MakeShell(aListImplFS->GetList());
1259 //=============================================================================
1261 //=============================================================================
1262 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
1264 MESSAGE("GEOM_Superv_i::MakeSolidShell");
1265 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1266 return myShapesOp->MakeSolidShell(theShell);
1269 //=============================================================================
1271 //=============================================================================
1272 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells)
1274 MESSAGE("GEOM_Superv_i::MakeSolidShells");
1275 if (GEOM_List_i<GEOM::ListOfGO>* aListImplS =
1276 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
1277 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1278 return myShapesOp->MakeSolidShells(aListImplS->GetList());
1283 //=============================================================================
1285 //=============================================================================
1286 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes)
1288 MESSAGE("GEOM_Superv_i::MakeCompound");
1289 if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
1290 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
1291 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1292 return myShapesOp->MakeCompound(aListImpl->GetList());
1297 //=============================================================================
1299 //=============================================================================
1300 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
1301 CORBA::Double theTolerance)
1303 MESSAGE("GEOM_Superv_i::MakeGlueFaces");
1304 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1305 return myShapesOp->MakeGlueFaces(theShape, theTolerance);
1308 //=============================================================================
1310 //=============================================================================
1311 GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
1312 CORBA::Long theShapeType,
1313 CORBA::Boolean isSorted)
1315 MESSAGE("GEOM_Superv_i::MakeExplode");
1316 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1318 GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
1319 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1320 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1321 return aListPtr->_this();
1324 //=============================================================================
1326 //=============================================================================
1327 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
1329 MESSAGE("GEOM_Superv_i::NumberOfFaces");
1330 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1331 return myShapesOp->NumberOfFaces(theShape);
1334 //=============================================================================
1336 //=============================================================================
1337 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
1339 MESSAGE("GEOM_Superv_i::NumberOfEdges");
1340 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1341 return myShapesOp->NumberOfEdges(theShape);
1344 //=============================================================================
1345 // ChangeOrientation:
1346 //=============================================================================
1347 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
1349 MESSAGE("GEOM_Superv_i::ChangeOrientation");
1350 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1351 return myShapesOp->ChangeOrientation(theShape);
1355 //=============================== BlocksOperations ============================
1356 //=============================================================================
1357 // MakeQuad4Vertices:
1358 //=============================================================================
1359 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
1360 GEOM::GEOM_Object_ptr thePnt2,
1361 GEOM::GEOM_Object_ptr thePnt3,
1362 GEOM::GEOM_Object_ptr thePnt4)
1364 MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
1365 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1366 return myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
1369 //=============================================================================
1371 //=============================================================================
1372 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
1373 GEOM::GEOM_Object_ptr theEdge2,
1374 GEOM::GEOM_Object_ptr theEdge3,
1375 GEOM::GEOM_Object_ptr theEdge4)
1377 MESSAGE("GEOM_Superv_i::MakeQuad");
1378 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1379 return myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
1382 //=============================================================================
1384 //=============================================================================
1385 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
1386 GEOM::GEOM_Object_ptr theEdge2)
1388 MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
1389 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1390 return myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
1393 //=============================================================================
1395 //=============================================================================
1396 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
1397 GEOM::GEOM_Object_ptr theFace2,
1398 GEOM::GEOM_Object_ptr theFace3,
1399 GEOM::GEOM_Object_ptr theFace4,
1400 GEOM::GEOM_Object_ptr theFace5,
1401 GEOM::GEOM_Object_ptr theFace6)
1403 MESSAGE("GEOM_Superv_i::MakeHexa");
1404 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1405 return myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
1408 //=============================================================================
1410 //=============================================================================
1411 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
1412 GEOM::GEOM_Object_ptr theFace2)
1414 MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
1415 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1416 return myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
1419 //=============================================================================
1421 //=============================================================================
1422 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
1426 CORBA::Double theEpsilon)
1428 MESSAGE("GEOM_Superv_i::GetPoint");
1429 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1430 return myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
1433 //=============================================================================
1435 //=============================================================================
1436 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
1437 GEOM::GEOM_Object_ptr thePoint1,
1438 GEOM::GEOM_Object_ptr thePoint2)
1440 MESSAGE("GEOM_Superv_i::GetEdge");
1441 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1442 return myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
1445 //=============================================================================
1446 // GetEdgeNearPoint:
1447 //=============================================================================
1448 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
1449 GEOM::GEOM_Object_ptr thePoint)
1451 MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
1452 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1453 return myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
1456 //=============================================================================
1458 //=============================================================================
1459 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
1460 GEOM::GEOM_Object_ptr thePoint1,
1461 GEOM::GEOM_Object_ptr thePoint2,
1462 GEOM::GEOM_Object_ptr thePoint3,
1463 GEOM::GEOM_Object_ptr thePoint4)
1465 MESSAGE("GEOM_Superv_i::GetFaceByPoints");
1466 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1467 return myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
1470 //=============================================================================
1472 //=============================================================================
1473 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
1474 GEOM::GEOM_Object_ptr theEdge1,
1475 GEOM::GEOM_Object_ptr theEdge2)
1477 MESSAGE("GEOM_Superv_i::GetFaceByEdges");
1478 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1479 return myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
1482 //=============================================================================
1484 //=============================================================================
1485 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
1486 GEOM::GEOM_Object_ptr theFace)
1488 MESSAGE("GEOM_Superv_i::GetOppositeFace");
1489 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1490 return myBlocksOp->GetOppositeFace(theBlock, theFace);
1493 //=============================================================================
1494 // GetFaceNearPoint:
1495 //=============================================================================
1496 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
1497 GEOM::GEOM_Object_ptr thePoint)
1499 MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
1500 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1501 return myBlocksOp->GetFaceNearPoint(theShape, thePoint);
1504 //=============================================================================
1505 // GetFaceByNormale:
1506 //=============================================================================
1507 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
1508 GEOM::GEOM_Object_ptr theVector)
1510 MESSAGE("GEOM_Superv_i::GetFaceByNormale");
1511 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1512 return myBlocksOp->GetFaceByNormale(theBlock, theVector);
1515 //=============================================================================
1516 // IsCompoundOfBlocks:
1517 //=============================================================================
1518 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
1519 CORBA::Long theMinNbFaces,
1520 CORBA::Long theMaxNbFaces,
1521 CORBA::Long& theNbBlocks)
1523 MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
1524 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1525 return myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
1528 //=============================================================================
1529 // CheckCompoundOfBlocks:
1530 //=============================================================================
1531 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks
1532 (GEOM::GEOM_Object_ptr theCompound,
1533 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
1535 MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
1536 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1537 return myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
1540 //=============================================================================
1542 //=============================================================================
1543 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
1544 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
1546 MESSAGE("GEOM_Superv_i::PrintBCErrors");
1547 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1548 return myBlocksOp->PrintBCErrors(theCompound, theErrors);
1551 //=============================================================================
1552 // ExplodeCompoundOfBlocks:
1553 //=============================================================================
1554 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
1555 CORBA::Long theMinNbFaces,
1556 CORBA::Long theMaxNbFaces)
1558 MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
1559 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1560 GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
1561 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
1562 return aListPtr->_this();
1565 //=============================================================================
1566 // GetBlockNearPoint:
1567 //=============================================================================
1568 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
1569 GEOM::GEOM_Object_ptr thePoint)
1571 MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
1572 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1573 return myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
1576 //=============================================================================
1578 //=============================================================================
1579 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
1580 GEOM::GEOM_List_ptr theParts)
1582 MESSAGE("GEOM_Superv_i::GetBlockByParts");
1583 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1584 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
1585 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1586 return myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
1591 //=============================================================================
1592 // GetBlocksByParts:
1593 //=============================================================================
1594 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
1595 GEOM::GEOM_List_ptr theParts)
1597 MESSAGE("GEOM_Superv_i::GetBlocksByParts");
1598 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1599 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
1600 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1602 GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
1603 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
1604 return aListPtr->_this();
1609 //=============================================================================
1610 // MakeMultiTransformation1D:
1611 //=============================================================================
1612 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
1613 CORBA::Long theDirFace1,
1614 CORBA::Long theDirFace2,
1615 CORBA::Long theNbTimes)
1617 MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
1618 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1619 return myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
1622 //=============================================================================
1623 // MakeMultiTransformation2D:
1624 //=============================================================================
1625 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D
1626 (GEOM::GEOM_Object_ptr theBlock,
1627 CORBA::Long theDirFace1U,
1628 CORBA::Long theDirFace2U,
1629 CORBA::Long theNbTimesU,
1630 CORBA::Long theDirFace1V,
1631 CORBA::Long theDirFace2V,
1632 CORBA::Long theNbTimesV)
1634 MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
1635 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1636 return myBlocksOp->MakeMultiTransformation2D(theBlock,
1637 theDirFace1U, theDirFace2U, theNbTimesU,
1638 theDirFace1V, theDirFace2V, theNbTimesV);
1641 //=============================== CurvesOperations ============================
1642 //=============================================================================
1643 // MakeCirclePntVecR:
1644 //=============================================================================
1645 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
1646 GEOM::GEOM_Object_ptr theVector,
1649 MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
1650 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1651 return myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
1654 //=============================================================================
1655 // MakeCircleThreePnt:
1656 //=============================================================================
1657 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
1658 GEOM::GEOM_Object_ptr thePnt2,
1659 GEOM::GEOM_Object_ptr thePnt3)
1661 MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
1662 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1663 return myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
1666 //=============================================================================
1668 //=============================================================================
1669 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
1670 GEOM::GEOM_Object_ptr theVector,
1671 CORBA::Double theRMajor,
1672 CORBA::Double theRMinor)
1674 MESSAGE("GEOM_Superv_i::MakeEllipse");
1675 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1676 return myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
1679 //=============================================================================
1681 //=============================================================================
1682 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
1683 GEOM::GEOM_Object_ptr thePnt2,
1684 GEOM::GEOM_Object_ptr thePnt3)
1686 MESSAGE("GEOM_Superv_i::MakeArc");
1687 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1688 return myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
1691 //=============================================================================
1693 //=============================================================================
1694 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints)
1696 MESSAGE("GEOM_Superv_i::MakePolyline");
1697 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1698 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
1699 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1700 return myCurvesOp->MakePolyline(aListImplP->GetList());
1705 //=============================================================================
1706 // MakeSplineBezier:
1707 //=============================================================================
1708 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints)
1710 MESSAGE("GEOM_Superv_i::MakeSplineBezier");
1711 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1712 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
1713 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1714 return myCurvesOp->MakeSplineBezier(aListImplP->GetList());
1719 //=============================================================================
1720 // MakeSplineInterpolation:
1721 //=============================================================================
1722 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints)
1724 MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
1725 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
1726 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
1727 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1728 return myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
1733 //=============================================================================
1735 //=============================================================================
1736 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand,
1737 GEOM::GEOM_List_ptr theWorkingPlane)
1739 MESSAGE("GEOM_Superv_i::MakeSketcher");
1740 if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP =
1741 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
1742 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1743 return myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
1748 //=============================== LocalOperations =============================
1749 //=============================================================================
1751 //=============================================================================
1752 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
1755 MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
1756 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1757 return myLocalOp->MakeFilletAll(theShape, theR);
1760 //=============================================================================
1762 //=============================================================================
1763 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape,
1765 GEOM::GEOM_List_ptr theEdges)
1767 MESSAGE("GEOM_Superv_i::MakeFilletEdges");
1768 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
1769 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
1770 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1771 return myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
1776 //=============================================================================
1778 //=============================================================================
1779 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape,
1781 GEOM::GEOM_List_ptr theFaces)
1783 MESSAGE("GEOM_Superv_i::MakeFilletFaces");
1784 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
1785 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
1786 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1787 return myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
1792 //=============================================================================
1794 //=============================================================================
1795 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
1797 MESSAGE("GEOM_Superv_i::MakeChamferAll");
1798 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1799 return myLocalOp->MakeChamferAll(theShape, theD);
1802 //=============================================================================
1804 //=============================================================================
1805 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
1806 CORBA::Double theD1, CORBA::Double theD2,
1807 CORBA::Long theFace1, CORBA::Long theFace2)
1809 MESSAGE("GEOM_Superv_i::MakeChamferEdge");
1810 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1811 return myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
1814 //=============================================================================
1815 // MakeChamferFaces:
1816 //=============================================================================
1817 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
1818 CORBA::Double theD1, CORBA::Double theD2,
1819 GEOM::GEOM_List_ptr theFaces)
1821 MESSAGE("GEOM_Superv_i::MakeChamferFaces");
1822 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
1823 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
1824 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1825 return myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
1830 //=============================================================================
1832 //=============================================================================
1833 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
1834 CORBA::Double theWeight,
1835 CORBA::Double theWaterDensity,
1836 CORBA::Double theMeshingDeflection)
1838 MESSAGE("GEOM_Superv_i::MakeArchimede");
1839 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1840 return myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
1843 //=============================================================================
1844 // GetSubShapeIndexMakeFilletAll:
1845 //=============================================================================
1846 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
1847 GEOM::GEOM_Object_ptr theSubShape)
1849 MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
1850 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1851 return myLocalOp->GetSubShapeIndex(theShape, theSubShape);
1854 //=============================== GroupOperations =============================
1855 //=============================================================================
1857 //=============================================================================
1858 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
1859 CORBA::Long theShapeType)
1861 MESSAGE("GEOM_Superv_i::CreateGroup");
1862 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1863 return myGroupOp->CreateGroup(theMainShape, theShapeType);
1866 //=============================================================================
1868 //=============================================================================
1869 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup,
1870 CORBA::Long theSubShapeId)
1872 MESSAGE("GEOM_Superv_i::AddObject");
1873 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1874 myGroupOp->AddObject(theGroup, theSubShapeId);
1877 //=============================================================================
1879 //=============================================================================
1880 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup,
1881 CORBA::Long theSubShapeId)
1883 MESSAGE("GEOM_Superv_i::RemoveObject");
1884 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1885 myGroupOp->RemoveObject(theGroup, theSubShapeId);
1888 //=============================================================================
1890 //=============================================================================
1891 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
1893 MESSAGE("GEOM_Superv_i::GetType");
1894 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1895 return myGroupOp->GetType(theGroup);
1898 //=============================================================================
1900 //=============================================================================
1901 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
1903 MESSAGE("GEOM_Superv_i::GetMainShape");
1904 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1905 return myGroupOp->GetMainShape(theGroup);
1908 //=============================================================================
1910 //=============================================================================
1911 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
1913 MESSAGE("GEOM_Superv_i::GetObjects");
1914 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1916 GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
1917 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
1918 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1919 return aListPtr->_this();
1922 //=====================================================================================
1924 //=====================================================================================
1927 PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
1928 PortableServer::POA_ptr poa,
1929 PortableServer::ObjectId * contId,
1930 const char *instanceName,
1931 const char * interfaceName)
1933 GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
1934 myGEOM_Superv_i->register_name("/myGEOM_Superv");
1935 return myGEOM_Superv_i->getId() ;