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/ or email : webmaster.salome@opencascade.com
21 #include "GEOM_Superv_i.hh"
22 #include "SALOME_LifeCycleCORBA.hxx"
24 #include CORBA_SERVER_HEADER(SALOME_Session)
25 #include "SALOMEDSClient_ClientFactory.hxx"
27 #define isNewStudy(a,b) (a > 0 && a != b)
30 //=============================================================================
32 //=============================================================================
33 GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
34 PortableServer::POA_ptr poa,
35 PortableServer::ObjectId * contId,
36 const char *instanceName,
37 const char *interfaceName) :
38 Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
40 MESSAGE("GEOM_Superv_i::GEOM_Superv_i");
43 _id = _poa->activate_object(_thisObj);
44 name_service = new SALOME_NamingService(_orb);
45 //get RootPOA (the default)
46 //myPOA = PortableServer::RefCountServantBase::_default_POA();
47 CORBA::Object_var anObj = _orb->resolve_initial_references("RootPOA");
48 myPOA = PortableServer::POA::_narrow(anObj);
55 myBasicOp = GEOM::GEOM_IBasicOperations::_nil();
56 my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil();
57 myBoolOp = GEOM::GEOM_IBooleanOperations::_nil();
58 myInsOp = GEOM::GEOM_IInsertOperations::_nil();
59 myTransfOp = GEOM::GEOM_ITransformOperations::_nil();
60 myShapesOp = GEOM::GEOM_IShapesOperations::_nil();
61 myBlocksOp = GEOM::GEOM_IBlocksOperations::_nil();
62 myCurvesOp = GEOM::GEOM_ICurvesOperations::_nil();
63 myLocalOp = GEOM::GEOM_ILocalOperations::_nil();
64 myGroupOp = GEOM::GEOM_IGroupOperations::_nil();
67 //=============================================================================
69 //=============================================================================
70 GEOM_Superv_i::~GEOM_Superv_i()
72 MESSAGE("GEOM_Superv_i::~GEOM_Superv_i");
76 //============================================================================
77 // function : register()
78 // purpose : register 'name' in 'name_service'
79 //============================================================================
80 void GEOM_Superv_i::register_name(char * name)
82 GEOM::GEOM_Superv_ptr g = GEOM::GEOM_Superv::_narrow(POA_GEOM::GEOM_Superv::_this());
83 name_service->Register(g, strdup(name));
86 //=============================================================================
88 //=============================================================================
89 void GEOM_Superv_i::setGeomEngine()
91 // get GEOM_Gen engine
92 SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
93 Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" );
95 myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
98 //=============================================================================
100 //=============================================================================
101 void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
103 // mkr : PAL10770 -->
104 myLastStudyID = myStudyID;
106 CORBA::Object_ptr anObject = name_service->Resolve("/Kernel/Session");
107 if ( !CORBA::is_nil(anObject) ) {
108 SALOME::Session_var aSession = SALOME::Session::_narrow(anObject);
109 if ( !CORBA::is_nil(aSession) ) {
110 int aStudyID = aSession->GetActiveStudyId();
111 if ( theId != aStudyID && aStudyID > 0) { // mkr : IPAL12128
112 MESSAGE("Warning : given study ID theId="<<theId<<" is wrong and will be replaced by the value "<<aStudyID);
113 myStudyID = aStudyID;
116 myStudyID = theId; // mkr : IPAL12128
120 if ( isNewStudy(myLastStudyID,myStudyID) ) {
121 if (CORBA::is_nil(myGeomEngine)) setGeomEngine();
122 string anEngine = _orb->object_to_string( myGeomEngine );
124 CORBA::Object_var anObj = name_service->Resolve("/myStudyManager");
125 if ( !CORBA::is_nil(anObj) ) {
126 SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(anObj);
127 if ( !CORBA::is_nil(aStudyManager) ) {
128 _PTR(Study) aDSStudy = ClientFactory::Study(aStudyManager->GetStudyByID(myStudyID));
130 _PTR(SComponent) aSCO = aDSStudy->FindComponent(myGeomEngine->ComponentDataType());
132 _PTR(StudyBuilder) aBuilder = aDSStudy->NewBuilder();
133 if ( aBuilder ) aBuilder->LoadWith( aSCO, anEngine );
139 // mkr : PAL10770 <--
142 //=============================================================================
144 //=============================================================================
145 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfGO()
147 MESSAGE("GEOM_Superv_i::CreateListOfGO()");
148 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>();
149 return aListPtr->_this();
152 //=============================================================================
153 // AddItemToListOfGO:
154 //=============================================================================
155 void GEOM_Superv_i::AddItemToListOfGO(GEOM::GEOM_List_ptr& theList,
156 GEOM::GEOM_Object_ptr theObject)
158 MESSAGE("GEOM_Superv_i::AddItemToListOfGO(...)");
159 if (GEOM_List_i<GEOM::ListOfGO>* aList =
160 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theList, myPOA).in())) {
161 aList->AddObject(theObject);
162 MESSAGE(" NewLength = "<<aList->GetList().length());
166 //=============================================================================
168 //=============================================================================
169 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfLong()
171 MESSAGE("GEOM_Superv_i::CreateListOfLong()");
172 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>();
173 return aListPtr->_this();
176 //=============================================================================
177 // AddItemToListOfLong:
178 //=============================================================================
179 void GEOM_Superv_i::AddItemToListOfLong(GEOM::GEOM_List_ptr& theList,
180 CORBA::Long theObject)
182 MESSAGE("GEOM_Superv_i::AddItemToListOfLong(...)");
183 if (GEOM_List_i<GEOM::ListOfLong>* aList =
184 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theList, myPOA).in())) {
185 aList->AddObject(theObject);
186 MESSAGE(" NewLength = "<<aList->GetList().length());
190 //=============================================================================
191 // CreateListOfDouble:
192 //=============================================================================
193 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfDouble()
195 MESSAGE("GEOM_Superv_i::CreateListOfDouble()");
196 GEOM_List_i<GEOM::ListOfDouble>* aListPtr = new GEOM_List_i<GEOM::ListOfDouble>();
197 return aListPtr->_this();
200 //=============================================================================
201 // AddItemToListOfDouble:
202 //=============================================================================
203 void GEOM_Superv_i::AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList,
204 CORBA::Double theObject)
206 MESSAGE("GEOM_Superv_i::AddItemToListOfDouble(...)");
207 if (GEOM_List_i<GEOM::ListOfDouble>* aList =
208 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theList, myPOA).in())) {
209 aList->AddObject(theObject);
210 MESSAGE(" NewLength = "<<aList->GetList().length());
214 //=============================================================================
216 //=============================================================================
217 void GEOM_Superv_i::getBasicOp()
219 if (CORBA::is_nil(myGeomEngine))
221 // get GEOM_IBasicOperations interface
222 if (CORBA::is_nil(myBasicOp) || isNewStudy(myLastStudyID,myStudyID))
223 myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
226 //=============================================================================
228 //=============================================================================
229 void GEOM_Superv_i::get3DPrimOp()
231 if (CORBA::is_nil(myGeomEngine))
233 // get GEOM_I3DPrimOperations interface
234 if (CORBA::is_nil(my3DPrimOp) || isNewStudy(myLastStudyID,myStudyID))
235 my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
238 //=============================================================================
240 //=============================================================================
241 void GEOM_Superv_i::getBoolOp()
243 if (CORBA::is_nil(myGeomEngine))
245 // get GEOM_IBooleanOperations interface
246 if (CORBA::is_nil(myBoolOp) || isNewStudy(myLastStudyID,myStudyID))
247 myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
250 //=============================================================================
252 //=============================================================================
253 void GEOM_Superv_i::getInsOp()
255 if (CORBA::is_nil(myGeomEngine))
257 // get GEOM_IInsertOperations interface
258 if (CORBA::is_nil(myInsOp) || isNewStudy(myLastStudyID,myStudyID))
259 myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
262 //=============================================================================
264 //=============================================================================
265 void GEOM_Superv_i::getTransfOp()
267 if (CORBA::is_nil(myGeomEngine))
269 // get GEOM_ITransformOperations interface
270 if (CORBA::is_nil(myTransfOp) || isNewStudy(myLastStudyID,myStudyID))
271 myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
274 //=============================================================================
276 //=============================================================================
277 void GEOM_Superv_i::getShapesOp()
279 if (CORBA::is_nil(myGeomEngine))
281 // get GEOM_IShapesOperations interface
282 if (CORBA::is_nil(myShapesOp) || isNewStudy(myLastStudyID,myStudyID))
283 myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
286 //=============================================================================
288 //=============================================================================
289 void GEOM_Superv_i::getBlocksOp()
291 if (CORBA::is_nil(myGeomEngine))
293 // get GEOM_IBlocksOperations interface
294 if (CORBA::is_nil(myBlocksOp) || isNewStudy(myLastStudyID,myStudyID))
295 myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
298 //=============================================================================
300 //=============================================================================
301 void GEOM_Superv_i::getCurvesOp()
303 if (CORBA::is_nil(myGeomEngine))
305 // get GEOM_ICurvesOperations interface
306 if (CORBA::is_nil(myCurvesOp) || isNewStudy(myLastStudyID,myStudyID))
307 myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
310 //=============================================================================
312 //=============================================================================
313 void GEOM_Superv_i::getLocalOp()
315 if (CORBA::is_nil(myGeomEngine))
317 // get GEOM_ILocalOperations interface
318 if (CORBA::is_nil(myLocalOp) || isNewStudy(myLastStudyID,myStudyID))
319 myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
322 //=============================================================================
324 //=============================================================================
325 void GEOM_Superv_i::getGroupOp()
327 if (CORBA::is_nil(myGeomEngine))
329 // get GEOM_IGroupOperations interface
330 if (CORBA::is_nil(myGroupOp) || isNewStudy(myLastStudyID,myStudyID))
331 myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
334 //=============================================================================
336 //=============================================================================
337 PortableServer::ServantBase_var GEOM_Superv_i::GetServant(CORBA::Object_ptr theObject,
338 PortableServer::POA_ptr thePOA)
340 if(CORBA::is_nil(theObject)) return NULL;
341 PortableServer::Servant aServant = thePOA->reference_to_servant(theObject);
345 //============================================================================
347 // purpose : save OCAF/Geom document
348 //============================================================================
349 SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
351 CORBA::Boolean isMultiFile)
353 SALOMEDS::TMPFile_var aStreamFile;
354 return aStreamFile._retn();
357 //============================================================================
358 // function : SaveASCII()
360 //============================================================================
361 SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
363 CORBA::Boolean isMultiFile)
365 SALOMEDS::TMPFile_var aStreamFile;
366 return aStreamFile._retn();
369 //============================================================================
372 //============================================================================
373 CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
374 const SALOMEDS::TMPFile& theStream,
376 CORBA::Boolean isMultiFile)
381 //============================================================================
382 // function : LoadASCII()
384 //============================================================================
385 CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
386 const SALOMEDS::TMPFile& theStream,
388 CORBA::Boolean isMultiFile)
393 //============================================================================
394 // function : Close()
396 //============================================================================
397 void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr theComponent)
401 //============================================================================
402 // function : ComponentDataType()
404 //============================================================================
405 char* GEOM_Superv_i::ComponentDataType()
410 //============================================================================
411 // function : IORToLocalPersistentID()
413 //============================================================================
414 char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
415 const char* IORString,
416 CORBA::Boolean isMultiFile,
417 CORBA::Boolean isASCII)
422 //============================================================================
423 // function : LocalPersistentIDToIOR()
424 // purpose : Create/Load CORBA object from a persistent ref (an entry)
425 // : Used when a study is loaded
426 // : The IOR (IORName) of object created is returned
427 //============================================================================
428 char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
429 const char* aLocalPersistentID,
430 CORBA::Boolean isMultiFile,
431 CORBA::Boolean isASCII)
436 //============================================================================
437 // function : CanPublishInStudy
439 //============================================================================
440 CORBA::Boolean GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
442 if (CORBA::is_nil(myGeomEngine))
444 return myGeomEngine->CanPublishInStudy(theIOR);
447 //============================================================================
448 // function : PublishInStudy
450 //============================================================================
451 SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
452 SALOMEDS::SObject_ptr theSObject,
453 CORBA::Object_ptr theObject,
454 const char* theName) throw (SALOME::SALOME_Exception)
456 if (CORBA::is_nil(myGeomEngine))
458 return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
461 //============================================================================
462 // function : CanCopy()
464 //============================================================================
465 CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr theObject)
470 //============================================================================
471 // function : CopyFrom()
473 //============================================================================
474 SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID)
476 SALOMEDS::TMPFile_var aStreamFile;
477 return aStreamFile._retn();
480 //============================================================================
481 // function : CanPaste()
483 //============================================================================
484 CORBA::Boolean GEOM_Superv_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID)
489 //============================================================================
490 // function : PasteInto()
492 //============================================================================
493 SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& theStream,
494 CORBA::Long theObjectID,
495 SALOMEDS::SObject_ptr theObject)
497 SALOMEDS::SObject_var aNewSO;
498 return aNewSO._retn();
501 //================= Primitives Construction : BasicOperations =================
502 //=============================================================================
504 //=============================================================================
505 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointXYZ(CORBA::Double theX,
509 beginService( " GEOM_Superv_i::MakePointXYZ" );
510 MESSAGE("GEOM_Superv_i::MakePointXYZ");
512 // make vertex and return
513 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointXYZ(theX, theY, theZ);
514 endService( " GEOM_Superv_i::MakePointXYZ" );
518 //=============================================================================
519 // MakePointWithReference:
520 //=============================================================================
521 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
526 beginService( " GEOM_Superv_i::MakePointWithReference" );
527 MESSAGE("GEOM_Superv_i::MakePointWithReference");
529 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointWithReference(theReference, theX, theY, theZ);
530 endService( " GEOM_Superv_i::MakePointWithReference" );
534 //=============================================================================
536 //=============================================================================
537 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
538 CORBA::Double theParameter)
540 beginService( " GEOM_Superv_i::MakePointOnCurve" );
541 MESSAGE("GEOM_Superv_i::MakePointOnCurve");
543 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointOnCurve(theRefCurve, theParameter);
544 endService( " GEOM_Superv_i::MakePointOnCurve" );
548 //=============================================================================
549 // MakePointOnLinesIntersection:
550 //=============================================================================
551 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnLinesIntersection (GEOM::GEOM_Object_ptr theRefLine1,
552 GEOM::GEOM_Object_ptr theRefLine2)
554 beginService( " GEOM_Superv_i::MakePointOnLinesIntersection" );
555 MESSAGE("GEOM_Superv_i::MakePointOnLinesIntersection");
557 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointOnLinesIntersection(theRefLine1, theRefLine2);
558 endService( " GEOM_Superv_i::MakePointOnLinesIntersection" );
562 //=============================================================================
563 // MakeTangentOnCurve:
564 //=============================================================================
565 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
566 CORBA::Double theParameter)
568 beginService( " GEOM_Superv_i::MakeTangentOnCurve" );
569 MESSAGE("GEOM_Superv_i::MakeTangentOnCurve");
571 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeTangentOnCurve(theRefCurve, theParameter);
572 endService( " GEOM_Superv_i::MakeTangentOnCurve" );
576 //=============================================================================
578 //=============================================================================
579 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorDXDYDZ (CORBA::Double theDX,
583 beginService( " GEOM_Superv_i::MakeVectorDXDYDZ" );
584 MESSAGE("GEOM_Superv_i::MakeVectorDXDYDZ");
586 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeVectorDXDYDZ(theDX, theDY, theDZ);
587 endService( " GEOM_Superv_i::MakeVectorDXDYDZ" );
591 //=============================================================================
593 //=============================================================================
594 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
595 GEOM::GEOM_Object_ptr thePnt2)
597 beginService( " GEOM_Superv_i::MakeVectorTwoPnt" );
598 MESSAGE("GEOM_Superv_i::MakeVector");
600 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeVectorTwoPnt(thePnt1, thePnt2);
601 endService( " GEOM_Superv_i::MakeVectorTwoPnt" );
605 //=============================================================================
607 //=============================================================================
608 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
609 GEOM::GEOM_Object_ptr thePnt2)
611 beginService( " GEOM_Superv_i::MakeLineTwoPnt");
612 MESSAGE("GEOM_Superv_i::MakeLineTwoPnt");
614 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeLineTwoPnt(thePnt1, thePnt2);
615 endService( " GEOM_Superv_i::MakeLineTwoPnt");
619 //=============================================================================
621 //=============================================================================
622 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoFaces (GEOM::GEOM_Object_ptr theFace1,
623 GEOM::GEOM_Object_ptr theFace2)
625 beginService( " GEOM_Superv_i::MakeLineTwoFaces");
626 MESSAGE("GEOM_Superv_i::MakeLineTwoFaces");
628 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeLineTwoFaces(theFace1, theFace2);
629 endService( " GEOM_Superv_i::MakeLineTwoFaces");
633 //=============================================================================
634 // MakePlaneThreePnt:
635 //=============================================================================
636 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
637 GEOM::GEOM_Object_ptr thePnt2,
638 GEOM::GEOM_Object_ptr thePnt3,
639 CORBA::Double theTrimSize)
641 beginService( " GEOM_Superv_i::MakePlaneThreePnt");
642 MESSAGE("GEOM_Superv_i::MakePlaneThreePnt");
644 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize);
645 endService( " GEOM_Superv_i::MakePlaneThreePnt");
649 //=============================================================================
651 //=============================================================================
652 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
653 GEOM::GEOM_Object_ptr theVec,
654 CORBA::Double theTrimSize)
656 beginService( " GEOM_Superv_i::MakePlanePntVec" );
657 MESSAGE("GEOM_Superv_i::MakePlanePntVec");
659 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlanePntVec(thePnt, theVec, theTrimSize);
660 endService( " GEOM_Superv_i::MakePlanePntVec" );
664 //=============================================================================
666 //=============================================================================
667 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
668 CORBA::Double theTrimSize)
670 beginService( " GEOM_Superv_i::MakePlaneFace" );
671 MESSAGE("GEOM_Superv_i::MakePlaneFace");
673 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlaneFace(theFace, theTrimSize);
674 endService( " GEOM_Superv_i::MakePlaneFace" );
678 //=============================================================================
680 //=============================================================================
681 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarker
682 (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
683 CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
684 CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
686 beginService( " GEOM_Superv_i::MakeMarker" );
687 MESSAGE("GEOM_Superv_i::MakeMarker");
689 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeMarker(theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ);
690 endService( " GEOM_Superv_i::MakeMarker" );
694 //=============================================================================
695 // MakeTangentPlaneOnFace:
696 //=============================================================================
697 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTangentPlaneOnFace (GEOM::GEOM_Object_ptr theFace,
698 CORBA::Double theParameterU,
699 CORBA::Double theParameterV,
700 CORBA::Double theTrimSize)
702 beginService( " GEOM_Superv_i::MakeTangentPlaneOnFace" );
703 MESSAGE("GEOM_Superv_i::MakeTangentPlaneOnFace");
705 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeTangentPlaneOnFace(theFace, theParameterU,theParameterV,theTrimSize);
706 endService( " GEOM_Superv_i::MakeTangentPlaneOnFace" );
710 //================= Primitives Construction : 3DPrimOperations ================
711 //=============================================================================
713 //=============================================================================
714 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBox (CORBA::Double theX1,
721 beginService( " GEOM_Superv_i::MakeBox" );
722 MESSAGE("GEOM_Superv_i::MakeBox");
725 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1),
726 myBasicOp->MakePointXYZ(theX2, theY2, theZ2));
727 endService( " GEOM_Superv_i::MakeBox" );
731 //=============================================================================
733 //=============================================================================
734 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxDXDYDZ (CORBA::Double theDX,
738 beginService( " GEOM_Superv_i::MakeBoxDXDYDZ" );
739 MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ");
741 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ);
742 endService( " GEOM_Superv_i::MakeBoxDXDYDZ" );
746 //=============================================================================
748 //=============================================================================
749 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
750 GEOM::GEOM_Object_ptr thePnt2)
752 beginService( " GEOM_Superv_i::MakeBoxTwoPnt" );
753 MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt");
755 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2);
756 endService( " GEOM_Superv_i::MakeBoxTwoPnt" );
760 //=============================================================================
761 // MakeCylinderPntVecRH:
762 //=============================================================================
763 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
764 GEOM::GEOM_Object_ptr theAxis,
765 CORBA::Double theRadius,
766 CORBA::Double theHeight)
768 beginService( " GEOM_Superv_i::MakeCylinderPntVecRH" );
769 MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH");
771 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight);
772 endService( " GEOM_Superv_i::MakeCylinderPntVecRH" );
776 //=============================================================================
778 //=============================================================================
779 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR,
782 beginService( " GEOM_Superv_i::MakeCylinderRH" );
783 MESSAGE("GEOM_Superv_i::MakeCylinderRH");
785 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderRH(theR, theH);
786 endService( " GEOM_Superv_i::MakeCylinderRH" );
790 //=============================================================================
792 //=============================================================================
793 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere (CORBA::Double theX,
796 CORBA::Double theRadius)
798 beginService( " GEOM_Superv_i::MakeSphepe" );
799 MESSAGE("GEOM_Superv_i::MakeSphepe");
802 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
803 endService( " GEOM_Superv_i::MakeSphepe" );
807 //=============================================================================
809 //=============================================================================
810 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
812 beginService( " GEOM_Superv_i::MakeSphereR" );
813 MESSAGE("GEOM_Superv_i::MakeSphereR");
815 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSphereR(theR);
816 endService( " GEOM_Superv_i::MakeSphereR" );
820 //=============================================================================
822 //=============================================================================
823 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
826 beginService( " GEOM_Superv_i::MakeSpherePntR" );
827 MESSAGE("GEOM_Superv_i::MakeSpherePntR");
829 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(thePnt, theR);
830 endService( " GEOM_Superv_i::MakeSpherePntR" );
834 //=============================================================================
835 // MakeTorusPntVecRR:
836 //=============================================================================
837 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
838 GEOM::GEOM_Object_ptr theVec,
839 CORBA::Double theRMajor,
840 CORBA::Double theRMinor)
842 beginService( " GEOM_Superv_i::MakeTorusPntVecRR" );
843 MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
845 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
846 endService( " GEOM_Superv_i::MakeTorusPntVecRR" );
850 //=============================================================================
852 //=============================================================================
853 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor,
854 CORBA::Double theRMinor)
856 beginService( " GEOM_Superv_i::MakeTorusRR" );
857 MESSAGE("GEOM_Superv_i::MakeTorusRR");
859 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
860 endService( " GEOM_Superv_i::MakeTorusRR" );
864 //=============================================================================
865 // MakeConePntVecR1R2H:
866 //=============================================================================
867 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
868 GEOM::GEOM_Object_ptr theAxis,
871 CORBA::Double theHeight)
873 beginService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
874 MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
876 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
877 endService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
881 //=============================================================================
883 //=============================================================================
884 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1,
886 CORBA::Double theHeight)
888 beginService( " GEOM_Superv_i::MakeConeR1R2H" );
889 MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
891 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
892 endService( " GEOM_Superv_i::MakeConeR1R2H" );
896 //=============================================================================
898 //=============================================================================
899 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
900 GEOM::GEOM_Object_ptr theVec,
903 beginService( " GEOM_Superv_i::MakePrismVecH" );
904 MESSAGE("GEOM_Superv_i::MakePrismVecH");
906 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
907 endService( " GEOM_Superv_i::MakePrismVecH" );
911 //=============================================================================
912 // MakePrismVecH2Ways:
913 //=============================================================================
914 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
915 GEOM::GEOM_Object_ptr theVec,
918 beginService( " GEOM_Superv_i::MakePrismVecH2Ways" );
919 MESSAGE("GEOM_Superv_i::MakePrismVecH2Ways");
921 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH2Ways(theBase, theVec, theH);
922 endService( " GEOM_Superv_i::MakePrismVecH2Ways" );
926 //=============================================================================
928 //=============================================================================
929 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
930 GEOM::GEOM_Object_ptr thePoint1,
931 GEOM::GEOM_Object_ptr thePoint2)
933 beginService( " GEOM_Superv_i::MakePrismTwoPnt" );
934 MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
936 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
937 endService( " GEOM_Superv_i::MakePrismTwoPnt" );
941 //=============================================================================
942 // MakePrismTwoPnt2Ways:
943 //=============================================================================
944 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
945 GEOM::GEOM_Object_ptr thePoint1,
946 GEOM::GEOM_Object_ptr thePoint2)
948 beginService( " GEOM_Superv_i::MakePrismTwoPnt2Ways" );
949 MESSAGE("GEOM_Superv_i::MakePrismTwoPnt2Ways");
951 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2);
952 endService( " GEOM_Superv_i::MakePrismTwoPnt2Ways" );
956 //=============================================================================
958 //=============================================================================
959 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase,
960 GEOM::GEOM_Object_ptr thePath)
962 beginService( " GEOM_Superv_i::MakePipe" );
963 MESSAGE("GEOM_Superv_i::MakePipe");
965 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipe(theBase, thePath);
966 endService( " GEOM_Superv_i::MakePipe" );
970 //=============================================================================
971 // MakeRevolutionAxisAngle:
972 //=============================================================================
973 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
974 GEOM::GEOM_Object_ptr theAxis,
975 CORBA::Double theAngle)
977 beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
978 MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
980 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
981 endService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
985 //=============================================================================
986 // MakeRevolutionAxisAngle:
987 //=============================================================================
988 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
989 GEOM::GEOM_Object_ptr theAxis,
990 CORBA::Double theAngle)
992 beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle2Ways" );
993 MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle2Ways");
995 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle);
996 endService( " GEOM_Superv_i::MakeRevolutionAxisAngle2Ways" );
1000 //=============================================================================
1002 //=============================================================================
1003 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
1004 CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
1005 CORBA::Double theTol2D, CORBA::Double theTol3D,
1006 CORBA::Long theNbIter)
1008 beginService( " GEOM_Superv_i::MakeFilling" );
1009 MESSAGE("GEOM_Superv_i::MakeFilling");
1011 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter);
1012 endService( " GEOM_Superv_i::MakeFilling" );
1016 //============================= BooleanOperations =============================
1017 //=============================================================================
1019 //=============================================================================
1020 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
1021 GEOM::GEOM_Object_ptr theShape2,
1022 CORBA::Long theOperation)
1024 beginService( " GEOM_Superv_i::MakeBoolean" );
1025 // theOperation indicates the operation to be done:
1026 // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
1027 MESSAGE("GEOM_Superv_i::MakeBoolean");
1029 GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
1030 endService( " GEOM_Superv_i::MakeBoolean" );
1034 //=============================================================================
1035 // MakeThruSections:
1036 //=============================================================================
1037 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeThruSections(const GEOM::ListOfGO& theSeqSections,
1038 CORBA::Boolean theModeSolid,
1039 CORBA::Double thePreci,
1040 CORBA::Boolean theRuled)
1042 beginService( " GEOM_Superv_i::MakeThruSections" );
1043 MESSAGE("GEOM_Superv_i::MakeThruSections");
1045 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeThruSections(theSeqSections, theModeSolid,thePreci,theRuled);
1046 endService( " GEOM_Superv_i::MakeThruSections" );
1050 //=============================================================================
1052 //=============================================================================
1053 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithDifferentSections
1054 (const GEOM::ListOfGO& theBases,
1055 const GEOM::ListOfGO& theLocations,
1056 GEOM::GEOM_Object_ptr thePath,
1057 CORBA::Boolean theWithContact,
1058 CORBA::Boolean theWithCorrections)
1060 beginService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
1061 MESSAGE("GEOM_Superv_i::MakePipeWithDifferentSections");
1063 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipeWithDifferentSections(theBases,theLocations, thePath,theWithContact,theWithCorrections);
1064 endService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
1069 //=============================================================================
1071 //=============================================================================
1072 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithShellSections
1073 (const GEOM::ListOfGO& theBases,
1074 const GEOM::ListOfGO& theSubBases,
1075 const GEOM::ListOfGO& theLocations,
1076 GEOM::GEOM_Object_ptr thePath,
1077 CORBA::Boolean theWithContact,
1078 CORBA::Boolean theWithCorrections)
1080 beginService( " GEOM_Superv_i::MakePipeWithShellSections" );
1081 MESSAGE("GEOM_Superv_i::MakePipeWithShellSections");
1083 GEOM::GEOM_Object_ptr anObj =
1084 my3DPrimOp->MakePipeWithShellSections(theBases, theSubBases,
1085 theLocations, thePath,
1086 theWithContact, theWithCorrections);
1087 endService( " GEOM_Superv_i::MakePipeWithShellSections" );
1092 //=============================================================================
1094 //=============================================================================
1095 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeShellsWithoutPath
1096 (const GEOM::ListOfGO& theBases,
1097 const GEOM::ListOfGO& theLocations)
1099 beginService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1100 MESSAGE("GEOM_Superv_i::MakePipeShellsWithoutPath");
1102 GEOM::GEOM_Object_ptr anObj =
1103 my3DPrimOp->MakePipeShellsWithoutPath(theBases,theLocations);
1104 endService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1109 //=============================================================================
1111 //=============================================================================
1112 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1,
1113 GEOM::GEOM_Object_ptr theShape2)
1115 beginService( " GEOM_Superv_i::MakeFuse" );
1116 MESSAGE("GEOM_Superv_i::MakeFuse");
1118 GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeBoolean(theShape1, theShape2, 3);
1119 endService( " GEOM_Superv_i::MakeFuse" );
1123 //=============================================================================
1125 //=============================================================================
1126 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr theShapes,
1127 GEOM::GEOM_List_ptr theTools,
1128 GEOM::GEOM_List_ptr theKeepInside,
1129 GEOM::GEOM_List_ptr theRemoveInside,
1130 CORBA::Short theLimit,
1131 CORBA::Boolean theRemoveWebs,
1132 GEOM::GEOM_List_ptr theMaterials,
1133 CORBA::Short theKeepNonlimitShapes)
1135 beginService( " GEOM_Superv_i::MakePartition" );
1136 MESSAGE("GEOM_Superv_i::MakePartition");
1137 GEOM_List_i<GEOM::ListOfGO>* aListImplS =
1138 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in());
1139 GEOM_List_i<GEOM::ListOfGO>* aListImplT =
1140 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theTools, myPOA).in());
1141 GEOM_List_i<GEOM::ListOfGO>* aListImplKI =
1142 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theKeepInside, myPOA).in());
1143 GEOM_List_i<GEOM::ListOfGO>* aListImplRI =
1144 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theRemoveInside, myPOA).in());
1145 GEOM_List_i<GEOM::ListOfLong>* aListImplM =
1146 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theMaterials, myPOA).in());
1147 if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
1149 GEOM::GEOM_Object_ptr anObj =
1150 myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(),
1151 aListImplKI->GetList(), aListImplRI->GetList(),
1152 theLimit, theRemoveWebs, aListImplM->GetList(),
1153 theKeepNonlimitShapes);
1154 endService( " GEOM_Superv_i::MakePartition" );
1157 endService( " GEOM_Superv_i::MakePartition" );
1161 //=============================================================================
1162 // MakeHalfPartition:
1163 //=============================================================================
1164 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
1165 GEOM::GEOM_Object_ptr thePlane)
1167 beginService( " GEOM_Superv_i::MakeHalfPartition" );
1168 MESSAGE("GEOM_Superv_i::MakeHalfPartition");
1170 GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeHalfPartition(theShape, thePlane);
1171 endService( " GEOM_Superv_i::MakeHalfPartition" );
1175 //============================== InsertOperations =============================
1176 //=============================================================================
1178 //=============================================================================
1179 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
1181 beginService( " GEOM_Superv_i::MakeCopy" );
1182 MESSAGE("GEOM_Superv_i::MakeCopy");
1184 GEOM::GEOM_Object_ptr anObj = myInsOp->MakeCopy(theOriginal);
1185 endService( " GEOM_Superv_i::MakeCopy" );
1189 //=============================================================================
1191 //=============================================================================
1192 void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject,
1193 const char* theFileName,
1194 const char* theFormatName)
1196 beginService( " GEOM_Superv_i::Export" );
1197 MESSAGE("GEOM_Superv_i::Export");
1199 myInsOp->Export(theObject, theFileName, theFormatName);
1200 endService( " GEOM_Superv_i::Export" );
1203 //=============================================================================
1205 //=============================================================================
1206 GEOM::GEOM_Object_ptr GEOM_Superv_i::Import (const char* theFileName,
1207 const char* theFormatName)
1209 beginService( " GEOM_Superv_i::Import" );
1210 MESSAGE("GEOM_Superv_i::Import");
1212 GEOM::GEOM_Object_ptr anObj = myInsOp->Import(theFileName, theFormatName);
1213 endService( " GEOM_Superv_i::Import" );
1217 //=============================================================================
1218 // ImportTranslators:
1219 //=============================================================================
1220 void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
1221 GEOM::string_array_out thePatterns)
1223 beginService( " GEOM_Superv_i::ImportTranslators" );
1224 MESSAGE("GEOM_Superv_i::ImportTranslators");
1226 myInsOp->ImportTranslators(theFormats, thePatterns);
1227 endService( " GEOM_Superv_i::ImportTranslators" );
1230 //=============================================================================
1231 // ExportTranslators:
1232 //=============================================================================
1233 void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
1234 GEOM::string_array_out thePatterns)
1236 beginService( " GEOM_Superv_i::ExportTranslators" );
1237 MESSAGE("GEOM_Superv_i::ExportTranslators");
1239 myInsOp->ExportTranslators(theFormats, thePatterns);
1240 endService( " GEOM_Superv_i::ExportTranslators" );
1243 //============================= TransformOperations ===========================
1244 //=============================================================================
1245 // TranslateTwoPoints:
1246 //=============================================================================
1247 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
1248 GEOM::GEOM_Object_ptr thePoint1,
1249 GEOM::GEOM_Object_ptr thePoint2)
1251 beginService( " GEOM_Superv_i::TranslateTwoPoints" );
1252 MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
1254 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
1255 endService( " GEOM_Superv_i::TranslateTwoPoints" );
1259 //=============================================================================
1260 // TranslateTwoPointsCopy:
1261 //=============================================================================
1262 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
1263 GEOM::GEOM_Object_ptr thePoint1,
1264 GEOM::GEOM_Object_ptr thePoint2)
1266 beginService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1267 MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
1269 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
1270 endService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1274 //=============================================================================
1276 //=============================================================================
1277 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
1278 CORBA::Double theDX,
1279 CORBA::Double theDY,
1280 CORBA::Double theDZ)
1282 beginService( " GEOM_Superv_i::TranslateDXDYDZ" );
1283 MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
1285 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
1286 endService( " GEOM_Superv_i::TranslateDXDYDZ" );
1290 //=============================================================================
1291 // TranslateDXDYDZCopy:
1292 //=============================================================================
1293 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
1294 CORBA::Double theDX,
1295 CORBA::Double theDY,
1296 CORBA::Double theDZ)
1298 beginService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1299 MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
1301 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
1302 endService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1306 //=============================================================================
1308 //=============================================================================
1309 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject,
1310 GEOM::GEOM_Object_ptr theVector)
1312 beginService( " GEOM_Superv_i::TranslateVector" );
1313 MESSAGE("GEOM_Superv_i::TranslateVector");
1315 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVector(theObject, theVector);
1316 endService( " GEOM_Superv_i::TranslateVector" );
1320 //=============================================================================
1321 // TranslateVectorCopy:
1322 //=============================================================================
1323 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
1324 GEOM::GEOM_Object_ptr theVector)
1326 beginService( " GEOM_Superv_i::TranslateVectorCopy" );
1327 MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
1329 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorCopy(theObject, theVector);
1330 endService( " GEOM_Superv_i::TranslateVectorCopy" );
1334 //=============================================================================
1335 // MultiTranslate1D:
1336 //=============================================================================
1337 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
1338 GEOM::GEOM_Object_ptr theVector,
1339 CORBA::Double theStep,
1340 CORBA::Long theNbTimes)
1342 beginService( " GEOM_Superv_i::MultiTranslate1D" );
1343 MESSAGE("GEOM_Superv_i::MultiTranslate1D");
1345 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
1346 endService( " GEOM_Superv_i::MultiTranslate1D" );
1350 //=============================================================================
1351 // MultiTranslate2D:
1352 //=============================================================================
1353 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
1354 GEOM::GEOM_Object_ptr theVector1,
1355 CORBA::Double theStep1,
1356 CORBA::Long theNbTimes1,
1357 GEOM::GEOM_Object_ptr theVector2,
1358 CORBA::Double theStep2,
1359 CORBA::Long theNbTimes2)
1361 beginService( " GEOM_Superv_i::MultiTranslate2D" );
1362 MESSAGE("GEOM_Superv_i::MultiTranslate2D");
1364 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
1365 theVector2, theStep2, theNbTimes2);
1366 endService( " GEOM_Superv_i::MultiTranslate2D" );
1370 //=============================================================================
1372 //=============================================================================
1373 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
1374 GEOM::GEOM_Object_ptr theAxis,
1375 CORBA::Double theAngle)
1377 beginService( " GEOM_Superv_i::Rotate" );
1378 MESSAGE("GEOM_Superv_i::Rotate");
1380 GEOM::GEOM_Object_ptr anObj = myTransfOp->Rotate(theObject, theAxis, theAngle);
1381 endService( " GEOM_Superv_i::Rotate" );
1385 //=============================================================================
1387 //=============================================================================
1388 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
1389 GEOM::GEOM_Object_ptr theAxis,
1390 CORBA::Double theAngle)
1392 beginService( " GEOM_Superv_i::RotateCopy" );
1393 MESSAGE("GEOM_Superv_i::RotateCopy");
1395 GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateCopy(theObject, theAxis, theAngle);
1396 endService( " GEOM_Superv_i::RotateCopy" );
1399 //=============================================================================
1400 // RotateThreePoints:
1401 //=============================================================================
1402 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
1403 GEOM::GEOM_Object_ptr theCentPoint,
1404 GEOM::GEOM_Object_ptr thePoint1,
1405 GEOM::GEOM_Object_ptr thePoint2)
1407 beginService( " GEOM_Superv_i::RotateThreePoints" );
1408 MESSAGE("GEOM_Superv_i::RotateThreePoints");
1410 GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2);
1411 endService( " GEOM_Superv_i::RotateThreePoints" );
1415 //=============================================================================
1416 // RotateThreePointsCopy:
1417 //=============================================================================
1418 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
1419 GEOM::GEOM_Object_ptr theCentPoint,
1420 GEOM::GEOM_Object_ptr thePoint1,
1421 GEOM::GEOM_Object_ptr thePoint2)
1423 beginService( " GEOM_Superv_i::RotateThreePointsCopy" );
1424 MESSAGE("GEOM_Superv_i::RotateThreePointsCopy");
1426 GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2);
1427 endService( " GEOM_Superv_i::RotateThreePointsCopy" );
1431 //=============================================================================
1433 //=============================================================================
1434 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1435 GEOM::GEOM_Object_ptr theAxis,
1436 CORBA::Long theNbTimes)
1438 beginService( " GEOM_Superv_i::MultiRotate1D" );
1439 MESSAGE("GEOM_Superv_i::MultiRotate1D");
1441 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
1442 endService( " GEOM_Superv_i::MultiRotate1D" );
1446 //=============================================================================
1448 //=============================================================================
1449 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1450 GEOM::GEOM_Object_ptr theAxis,
1451 CORBA::Double theAngle,
1452 CORBA::Long theNbTimes1,
1453 CORBA::Double theStep,
1454 CORBA::Long theNbTimes2)
1456 beginService( " GEOM_Superv_i::MultiRotate2D" );
1457 MESSAGE("GEOM_Superv_i::MultiRotate2D");
1459 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
1460 endService( " GEOM_Superv_i::MultiRotate2D" );
1464 //=============================================================================
1466 //=============================================================================
1467 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject,
1468 GEOM::GEOM_Object_ptr thePlane)
1470 beginService( " GEOM_Superv_i::MirrorPlane" );
1471 MESSAGE("GEOM_Superv_i::MirrorPlane");
1473 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlane(theObject, thePlane);
1474 endService( " GEOM_Superv_i::MirrorPlane" );
1478 //=============================================================================
1480 //=============================================================================
1481 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
1482 GEOM::GEOM_Object_ptr thePlane)
1484 beginService( " GEOM_Superv_i::MirrorPlaneCopy" );
1485 MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
1487 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlaneCopy(theObject, thePlane);
1488 endService( " GEOM_Superv_i::MirrorPlaneCopy" );
1492 //=============================================================================
1494 //=============================================================================
1495 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject,
1496 GEOM::GEOM_Object_ptr theAxis)
1498 beginService( " GEOM_Superv_i::MirrorAxis" );
1499 MESSAGE("GEOM_Superv_i::MirrorAxis");
1501 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxis(theObject, theAxis);
1502 endService( " GEOM_Superv_i::MirrorAxis" );
1506 //=============================================================================
1508 //=============================================================================
1509 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
1510 GEOM::GEOM_Object_ptr theAxis)
1512 beginService( " GEOM_Superv_i::MirrorAxisCopy" );
1513 MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
1515 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxisCopy(theObject, theAxis);
1516 endService( " GEOM_Superv_i::MirrorAxisCopy" );
1520 //=============================================================================
1522 //=============================================================================
1523 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject,
1524 GEOM::GEOM_Object_ptr thePoint)
1526 beginService( " GEOM_Superv_i::MirrorPoint" );
1527 MESSAGE("GEOM_Superv_i::MirrorPoint");
1529 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPoint(theObject, thePoint);
1530 endService( " GEOM_Superv_i::MirrorPoint" );
1534 //=============================================================================
1536 //=============================================================================
1537 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
1538 GEOM::GEOM_Object_ptr thePoint)
1540 beginService( " GEOM_Superv_i::MirrorPoint" );
1541 MESSAGE("GEOM_Superv_i::MirrorPointCopy");
1543 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPointCopy(theObject, thePoint);
1544 endService( " GEOM_Superv_i::MirrorPoint" );
1548 //=============================================================================
1550 //=============================================================================
1551 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject,
1552 CORBA::Double theOffset)
1554 beginService( " GEOM_Superv_i::OffsetShape" );
1555 MESSAGE("GEOM_Superv_i::OffsetShape");
1557 GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset);
1558 endService( " GEOM_Superv_i::OffsetShape" );
1562 //=============================================================================
1564 //=============================================================================
1565 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
1566 CORBA::Double theOffset)
1568 beginService( " GEOM_Superv_i::OffsetShapeCopy" );
1569 MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1571 GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset);
1572 endService( " GEOM_Superv_i::OffsetShapeCopy" );
1576 //=============================================================================
1578 //=============================================================================
1579 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject,
1580 GEOM::GEOM_Object_ptr thePoint,
1581 CORBA::Double theFactor)
1583 beginService( " GEOM_Superv_i::ScaleShape" );
1584 MESSAGE("GEOM_Superv_i::ScaleShape");
1586 GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShape(theObject, thePoint, theFactor);
1587 endService( " GEOM_Superv_i::ScaleShape" );
1591 //=============================================================================
1593 //=============================================================================
1594 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
1595 GEOM::GEOM_Object_ptr thePoint,
1596 CORBA::Double theFactor)
1598 beginService( " GEOM_Superv_i::ScaleShapeCopy" );
1599 MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
1601 GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
1602 endService( " GEOM_Superv_i::ScaleShapeCopy" );
1606 //=============================================================================
1608 //=============================================================================
1609 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
1610 GEOM::GEOM_Object_ptr theStartLCS,
1611 GEOM::GEOM_Object_ptr theEndLCS)
1613 beginService( " GEOM_Superv_i::PositionShape" );
1614 MESSAGE("GEOM_Superv_i::PositionShape");
1616 GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
1617 endService( " GEOM_Superv_i::PositionShape" );
1621 //=============================================================================
1622 // PositionShapeCopy:
1623 //=============================================================================
1624 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
1625 GEOM::GEOM_Object_ptr theStartLCS,
1626 GEOM::GEOM_Object_ptr theEndLCS)
1628 beginService( " GEOM_Superv_i::PositionShapeCopy" );
1629 MESSAGE("GEOM_Superv_i::PositionShapeCopy");
1631 GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
1632 endService( " GEOM_Superv_i::PositionShapeCopy" );
1636 //=============================== ShapesOperations ============================
1637 //=============================================================================
1639 //=============================================================================
1640 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
1641 GEOM::GEOM_Object_ptr thePnt2)
1643 beginService( " GEOM_Superv_i::MakeEdge" );
1644 MESSAGE("GEOM_Superv_i::MakeEdge");
1646 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeEdge(thePnt1, thePnt2);
1647 endService( " GEOM_Superv_i::MakeEdge" );
1651 //=============================================================================
1653 //=============================================================================
1654 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires)
1656 beginService( " GEOM_Superv_i::MakeWire" );
1657 MESSAGE("GEOM_Superv_i::MakeWire");
1658 if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW =
1659 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
1661 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeWire(aListImplEW->GetList());
1662 endService( " GEOM_Superv_i::MakeWire" );
1665 endService( " GEOM_Superv_i::MakeWire" );
1669 //=============================================================================
1671 //=============================================================================
1672 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
1673 CORBA::Boolean isPlanarWanted)
1675 beginService( " GEOM_Superv_i::MakeFace" );
1676 MESSAGE("GEOM_Superv_i::MakeFace");
1678 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFace(theWire, isPlanarWanted);
1679 endService( " GEOM_Superv_i::MakeFace" );
1683 //=============================================================================
1685 //=============================================================================
1686 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires,
1687 CORBA::Boolean isPlanarWanted)
1689 beginService( " GEOM_Superv_i::MakeFaceWires" );
1690 MESSAGE("GEOM_Superv_i::MakeFaceWires");
1691 if (GEOM_List_i<GEOM::ListOfGO>* aListImplW =
1692 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
1694 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
1695 endService( " GEOM_Superv_i::MakeFaceWires" );
1698 endService( " GEOM_Superv_i::MakeFaceWires" );
1702 //=============================================================================
1704 //=============================================================================
1705 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells)
1707 beginService( " GEOM_Superv_i::MakeShell" );
1708 MESSAGE("GEOM_Superv_i::MakeShell");
1709 if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS =
1710 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
1712 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeShell(aListImplFS->GetList());
1713 endService( " GEOM_Superv_i::MakeShell" );
1716 endService( " GEOM_Superv_i::MakeShell" );
1720 //=============================================================================
1722 //=============================================================================
1723 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
1725 beginService( " GEOM_Superv_i::MakeSolidShell" );
1726 MESSAGE("GEOM_Superv_i::MakeSolidShell");
1728 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShell(theShell);
1729 endService( " GEOM_Superv_i::MakeSolidShell" );
1733 //=============================================================================
1735 //=============================================================================
1736 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells)
1738 beginService( " GEOM_Superv_i::MakeSolidShells" );
1739 MESSAGE("GEOM_Superv_i::MakeSolidShells");
1740 if (GEOM_List_i<GEOM::ListOfGO>* aListImplS =
1741 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
1743 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShells(aListImplS->GetList());
1744 endService( " GEOM_Superv_i::MakeSolidShells" );
1747 endService( " GEOM_Superv_i::MakeSolidShells" );
1751 //=============================================================================
1753 //=============================================================================
1754 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes)
1756 beginService( " GEOM_Superv_i::MakeCompound" );
1757 MESSAGE("GEOM_Superv_i::MakeCompound");
1758 if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
1759 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
1761 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeCompound(aListImpl->GetList());
1762 endService( " GEOM_Superv_i::MakeCompound" );
1765 endService( " GEOM_Superv_i::MakeCompound" );
1769 //=============================================================================
1771 //=============================================================================
1772 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
1773 CORBA::Double theTolerance,
1774 CORBA::Boolean doKeepNonSolids)
1776 beginService( " GEOM_Superv_i::MakeGlueFaces" );
1777 MESSAGE("GEOM_Superv_i::MakeGlueFaces");
1779 GEOM::GEOM_Object_ptr anObj =
1780 myShapesOp->MakeGlueFaces(theShape, theTolerance, doKeepNonSolids);
1781 endService( " GEOM_Superv_i::MakeGlueFaces" );
1785 //=============================================================================
1787 //=============================================================================
1788 GEOM::GEOM_List_ptr GEOM_Superv_i::GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
1789 CORBA::Double theTolerance)
1791 beginService( " GEOM_Superv_i::GetGlueFaces" );
1792 MESSAGE("GEOM_Superv_i::GetGlueFaces");
1794 GEOM::ListOfGO* aList = myShapesOp->GetGlueFaces(theShape, theTolerance);
1795 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1796 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1797 endService( " GEOM_Superv_i::GetGlueFaces" );
1798 return aListPtr->_this();
1801 //=============================================================================
1802 // MakeGlueFacesByList:
1803 //=============================================================================
1804 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
1805 CORBA::Double theTolerance,
1806 const GEOM::ListOfGO& theFaces,
1807 CORBA::Boolean doKeepNonSolids)
1809 beginService( " GEOM_Superv_i::MakeGlueFacesByList" );
1810 MESSAGE("GEOM_Superv_i::MakeGlueFacesByList");
1812 GEOM::GEOM_Object_ptr anObj =
1813 myShapesOp->MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids);
1814 endService( " GEOM_Superv_i::MakeGlueFacesByList" );
1818 //=============================================================================
1820 //=============================================================================
1821 GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
1822 CORBA::Long theShapeType,
1823 CORBA::Boolean isSorted)
1825 beginService( " GEOM_Superv_i::MakeExplode" );
1826 MESSAGE("GEOM_Superv_i::MakeExplode");
1829 GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
1830 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1831 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1832 endService( " GEOM_Superv_i::MakeExplode" );
1833 return aListPtr->_this();
1836 //=============================================================================
1838 //=============================================================================
1839 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
1841 beginService( " GEOM_Superv_i::NumberOfFaces" );
1842 MESSAGE("GEOM_Superv_i::NumberOfFaces");
1844 CORBA::Long aRes = myShapesOp->NumberOfFaces(theShape);
1845 endService( " GEOM_Superv_i::NumberOfFaces" );
1849 //=============================================================================
1851 //=============================================================================
1852 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
1854 beginService( " GEOM_Superv_i::NumberOfEdges" );
1855 MESSAGE("GEOM_Superv_i::NumberOfEdges");
1857 CORBA::Long aRes = myShapesOp->NumberOfEdges(theShape);
1858 endService( " GEOM_Superv_i::NumberOfEdges" );
1862 //=============================================================================
1863 // ChangeOrientation:
1864 //=============================================================================
1865 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
1867 beginService( " GEOM_Superv_i::ChangeOrientation" );
1868 MESSAGE("GEOM_Superv_i::ChangeOrientation");
1870 GEOM::GEOM_Object_ptr anObj = myShapesOp->ChangeOrientation(theShape);
1871 endService( " GEOM_Superv_i::ChangeOrientation" );
1876 //=============================== BlocksOperations ============================
1877 //=============================================================================
1878 // MakeQuad4Vertices:
1879 //=============================================================================
1880 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
1881 GEOM::GEOM_Object_ptr thePnt2,
1882 GEOM::GEOM_Object_ptr thePnt3,
1883 GEOM::GEOM_Object_ptr thePnt4)
1885 beginService( " GEOM_Superv_i::MakeQuad4Vertices" );
1886 MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
1888 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
1889 endService( " GEOM_Superv_i::MakeQuad4Vertices" );
1893 //=============================================================================
1895 //=============================================================================
1896 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
1897 GEOM::GEOM_Object_ptr theEdge2,
1898 GEOM::GEOM_Object_ptr theEdge3,
1899 GEOM::GEOM_Object_ptr theEdge4)
1901 beginService( " GEOM_Superv_i::MakeQuad" );
1902 MESSAGE("GEOM_Superv_i::MakeQuad");
1904 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
1905 endService( " GEOM_Superv_i::MakeQuad" );
1909 //=============================================================================
1911 //=============================================================================
1912 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
1913 GEOM::GEOM_Object_ptr theEdge2)
1915 beginService( " GEOM_Superv_i::MakeQuad2Edges" );
1916 MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
1918 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
1919 endService( " GEOM_Superv_i::MakeQuad2Edges" );
1923 //=============================================================================
1925 //=============================================================================
1926 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
1927 GEOM::GEOM_Object_ptr theFace2,
1928 GEOM::GEOM_Object_ptr theFace3,
1929 GEOM::GEOM_Object_ptr theFace4,
1930 GEOM::GEOM_Object_ptr theFace5,
1931 GEOM::GEOM_Object_ptr theFace6)
1933 beginService( " GEOM_Superv_i::MakeHexa" );
1934 MESSAGE("GEOM_Superv_i::MakeHexa");
1936 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
1937 endService( " GEOM_Superv_i::MakeHexa" );
1941 //=============================================================================
1943 //=============================================================================
1944 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
1945 GEOM::GEOM_Object_ptr theFace2)
1947 beginService( " GEOM_Superv_i::MakeHexa2Faces" );
1948 MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
1950 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
1951 endService( " GEOM_Superv_i::MakeHexa2Faces" );
1955 //=============================================================================
1957 //=============================================================================
1958 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
1962 CORBA::Double theEpsilon)
1964 beginService( " GEOM_Superv_i::GetPoint" );
1965 MESSAGE("GEOM_Superv_i::GetPoint");
1967 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
1968 endService( " GEOM_Superv_i::GetPoint" );
1972 //=============================================================================
1974 //=============================================================================
1975 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
1976 GEOM::GEOM_Object_ptr thePoint1,
1977 GEOM::GEOM_Object_ptr thePoint2)
1979 beginService( " GEOM_Superv_i::GetEdge" );
1980 MESSAGE("GEOM_Superv_i::GetEdge");
1982 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
1983 endService( " GEOM_Superv_i::GetEdge" );
1987 //=============================================================================
1988 // GetEdgeNearPoint:
1989 //=============================================================================
1990 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
1991 GEOM::GEOM_Object_ptr thePoint)
1993 beginService( " GEOM_Superv_i::GetEdgeNearPoint" );
1994 MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
1996 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
1997 endService( " GEOM_Superv_i::GetEdgeNearPoint" );
2001 //=============================================================================
2003 //=============================================================================
2004 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
2005 GEOM::GEOM_Object_ptr thePoint1,
2006 GEOM::GEOM_Object_ptr thePoint2,
2007 GEOM::GEOM_Object_ptr thePoint3,
2008 GEOM::GEOM_Object_ptr thePoint4)
2010 beginService( " GEOM_Superv_i::GetFaceByPoints" );
2011 MESSAGE("GEOM_Superv_i::GetFaceByPoints");
2013 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
2014 endService( " GEOM_Superv_i::GetFaceByPoints" );
2018 //=============================================================================
2020 //=============================================================================
2021 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
2022 GEOM::GEOM_Object_ptr theEdge1,
2023 GEOM::GEOM_Object_ptr theEdge2)
2025 beginService( " GEOM_Superv_i::GetFaceByEdges" );
2026 MESSAGE("GEOM_Superv_i::GetFaceByEdges");
2028 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
2029 endService( " GEOM_Superv_i::GetFaceByEdges" );
2033 //=============================================================================
2035 //=============================================================================
2036 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
2037 GEOM::GEOM_Object_ptr theFace)
2039 beginService( " GEOM_Superv_i::GetOppositeFace" );
2040 MESSAGE("GEOM_Superv_i::GetOppositeFace");
2042 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetOppositeFace(theBlock, theFace);
2043 endService( " GEOM_Superv_i::GetOppositeFace" );
2047 //=============================================================================
2048 // GetFaceNearPoint:
2049 //=============================================================================
2050 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
2051 GEOM::GEOM_Object_ptr thePoint)
2053 beginService( " GEOM_Superv_i::GetFaceNearPoint" );
2054 MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
2056 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceNearPoint(theShape, thePoint);
2057 endService( " GEOM_Superv_i::GetFaceNearPoint" );
2061 //=============================================================================
2062 // GetFaceByNormale:
2063 //=============================================================================
2064 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
2065 GEOM::GEOM_Object_ptr theVector)
2067 beginService( " GEOM_Superv_i::GetFaceByNormale" );
2068 MESSAGE("GEOM_Superv_i::GetFaceByNormale");
2070 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByNormale(theBlock, theVector);
2071 endService( " GEOM_Superv_i::GetFaceByNormale" );
2075 //=============================================================================
2076 // IsCompoundOfBlocks:
2077 //=============================================================================
2078 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2079 CORBA::Long theMinNbFaces,
2080 CORBA::Long theMaxNbFaces,
2081 CORBA::Long& theNbBlocks)
2083 beginService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2084 MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
2086 CORBA::Boolean aRes = myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
2087 endService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2091 //=============================================================================
2092 // CheckCompoundOfBlocks:
2093 //=============================================================================
2094 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks
2095 (GEOM::GEOM_Object_ptr theCompound,
2096 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
2098 beginService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2099 MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
2101 CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
2102 endService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2106 //=============================================================================
2108 //=============================================================================
2109 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
2110 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
2112 beginService( " GEOM_Superv_i::PrintBCErrors" );
2113 MESSAGE("GEOM_Superv_i::PrintBCErrors");
2115 char* anErrors = myBlocksOp->PrintBCErrors(theCompound, theErrors);
2116 endService( " GEOM_Superv_i::PrintBCErrors" );
2120 //=============================================================================
2121 // ExplodeCompoundOfBlocks:
2122 //=============================================================================
2123 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2124 CORBA::Long theMinNbFaces,
2125 CORBA::Long theMaxNbFaces)
2127 beginService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2128 MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
2130 GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
2131 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2132 endService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2133 return aListPtr->_this();
2136 //=============================================================================
2137 // GetBlockNearPoint:
2138 //=============================================================================
2139 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
2140 GEOM::GEOM_Object_ptr thePoint)
2142 beginService( " GEOM_Superv_i::GetBlockNearPoint" );
2143 MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
2145 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
2146 endService( " GEOM_Superv_i::GetBlockNearPoint" );
2150 //=============================================================================
2152 //=============================================================================
2153 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
2154 GEOM::GEOM_List_ptr theParts)
2156 beginService( " GEOM_Superv_i::GetBlockByParts" );
2157 MESSAGE("GEOM_Superv_i::GetBlockByParts");
2158 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2159 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2161 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
2162 endService( " GEOM_Superv_i::GetBlockByParts" );
2165 endService( " GEOM_Superv_i::GetBlockByParts" );
2169 //=============================================================================
2170 // GetBlocksByParts:
2171 //=============================================================================
2172 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
2173 GEOM::GEOM_List_ptr theParts)
2175 beginService( " GEOM_Superv_i::GetBlocksByParts" );
2176 MESSAGE("GEOM_Superv_i::GetBlocksByParts");
2177 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2178 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2181 GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
2182 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2183 endService( " GEOM_Superv_i::GetBlocksByParts" );
2184 return aListPtr->_this();
2186 endService( " GEOM_Superv_i::GetBlocksByParts" );
2190 //=============================================================================
2191 // MakeMultiTransformation1D:
2192 //=============================================================================
2193 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
2194 CORBA::Long theDirFace1,
2195 CORBA::Long theDirFace2,
2196 CORBA::Long theNbTimes)
2198 beginService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2199 MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
2201 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
2202 endService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2206 //=============================================================================
2207 // MakeMultiTransformation2D:
2208 //=============================================================================
2209 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D
2210 (GEOM::GEOM_Object_ptr theBlock,
2211 CORBA::Long theDirFace1U,
2212 CORBA::Long theDirFace2U,
2213 CORBA::Long theNbTimesU,
2214 CORBA::Long theDirFace1V,
2215 CORBA::Long theDirFace2V,
2216 CORBA::Long theNbTimesV)
2218 beginService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2219 MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
2221 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation2D(theBlock,
2222 theDirFace1U, theDirFace2U, theNbTimesU,
2223 theDirFace1V, theDirFace2V, theNbTimesV);
2224 endService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2228 //=============================== CurvesOperations ============================
2229 //=============================================================================
2230 // MakeCirclePntVecR:
2231 //=============================================================================
2232 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
2233 GEOM::GEOM_Object_ptr theVector,
2236 beginService( " GEOM_Superv_i::MakeCirclePntVecR" );
2237 MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
2239 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
2240 endService( " GEOM_Superv_i::MakeCirclePntVecR" );
2244 //=============================================================================
2245 // MakeCircleThreePnt:
2246 //=============================================================================
2247 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
2248 GEOM::GEOM_Object_ptr thePnt2,
2249 GEOM::GEOM_Object_ptr thePnt3)
2251 beginService( " GEOM_Superv_i::MakeCircleThreePnt" );
2252 MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
2254 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
2255 endService( " GEOM_Superv_i::MakeCircleThreePnt" );
2258 //=============================================================================
2259 // MakeCircleCenter2Pnt:
2260 //=============================================================================
2261 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
2262 GEOM::GEOM_Object_ptr thePnt2,
2263 GEOM::GEOM_Object_ptr thePnt3)
2265 beginService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2266 MESSAGE("GEOM_Superv_i::MakeCircleCenter2Pnt");
2268 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3);
2269 endService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2273 //=============================================================================
2275 //=============================================================================
2276 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
2277 GEOM::GEOM_Object_ptr theVector,
2278 CORBA::Double theRMajor,
2279 CORBA::Double theRMinor)
2281 beginService( " GEOM_Superv_i::MakeEllipse" );
2282 MESSAGE("GEOM_Superv_i::MakeEllipse");
2284 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
2285 endService( " GEOM_Superv_i::MakeEllipse" );
2289 //=============================================================================
2291 //=============================================================================
2292 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
2293 GEOM::GEOM_Object_ptr thePnt2,
2294 GEOM::GEOM_Object_ptr thePnt3)
2296 beginService( " GEOM_Superv_i::MakeArc" );
2297 MESSAGE("GEOM_Superv_i::MakeArc");
2299 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
2300 endService( " GEOM_Superv_i::MakeArc" );
2304 //=============================================================================
2306 //=============================================================================
2307 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
2308 GEOM::GEOM_Object_ptr thePnt1,
2309 GEOM::GEOM_Object_ptr thePnt2,
2310 CORBA::Boolean theSense)
2312 beginService( " GEOM_Superv_i::MakeArcCenter" );
2313 MESSAGE("GEOM_Superv_i::MakeArcCenter");
2315 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArcCenter(theCenter, thePnt1, thePnt2,theSense);
2316 endService( " GEOM_Superv_i::MakeArcCenter" );
2320 //=============================================================================
2322 //=============================================================================
2323 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints)
2325 beginService( " GEOM_Superv_i::MakePolyline" );
2326 MESSAGE("GEOM_Superv_i::MakePolyline");
2327 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2328 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2330 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakePolyline(aListImplP->GetList());
2331 endService( " GEOM_Superv_i::MakePolyline" );
2334 endService( " GEOM_Superv_i::MakePolyline" );
2338 //=============================================================================
2339 // MakeSplineBezier:
2340 //=============================================================================
2341 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints)
2343 beginService( " GEOM_Superv_i::MakeSplineBezier" );
2344 MESSAGE("GEOM_Superv_i::MakeSplineBezier");
2345 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2346 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2348 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineBezier(aListImplP->GetList());
2349 endService( " GEOM_Superv_i::MakeSplineBezier" );
2352 endService( " GEOM_Superv_i::MakeSplineBezier" );
2356 //=============================================================================
2357 // MakeSplineInterpolation:
2358 //=============================================================================
2359 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints)
2361 beginService( " GEOM_Superv_i::MakeSplineInterpolation" );
2362 MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
2363 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2364 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2366 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
2367 endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2370 endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2374 //=============================================================================
2376 //=============================================================================
2377 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand,
2378 GEOM::GEOM_List_ptr theWorkingPlane)
2380 beginService( " GEOM_Superv_i::MakeSketcher" );
2381 MESSAGE("GEOM_Superv_i::MakeSketcher");
2382 if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP =
2383 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
2385 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
2386 endService( " GEOM_Superv_i::MakeSketcher" );
2389 endService( " GEOM_Superv_i::MakeSketcher" );
2393 //=============================== LocalOperations =============================
2394 //=============================================================================
2396 //=============================================================================
2397 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
2400 beginService( " GEOM_Superv_i::MakeFilletAll" );
2401 MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
2403 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletAll(theShape, theR);
2404 endService( " GEOM_Superv_i::MakeFilletAll" );
2408 //=============================================================================
2410 //=============================================================================
2411 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape,
2413 GEOM::GEOM_List_ptr theEdges)
2415 beginService( " GEOM_Superv_i::MakeFilletEdges" );
2416 MESSAGE("GEOM_Superv_i::MakeFilletEdges");
2417 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
2418 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2420 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
2421 endService( " GEOM_Superv_i::MakeFilletEdges" );
2424 endService( " GEOM_Superv_i::MakeFilletEdges" );
2428 //=============================================================================
2429 // MakeFilletEdges R1 R2:
2430 //=============================================================================
2431 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape,
2432 CORBA::Double theR1,
2433 CORBA::Double theR2,
2434 GEOM::GEOM_List_ptr theEdges)
2436 beginService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2437 MESSAGE("GEOM_Superv_i::MakeFilletEdgesR1R2");
2438 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
2439 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2441 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdgesR1R2(theShape, theR1,
2442 theR2, aListImplE->GetList());
2443 endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2446 endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2450 //=============================================================================
2452 //=============================================================================
2453 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape,
2455 GEOM::GEOM_List_ptr theFaces)
2457 beginService( " GEOM_Superv_i::MakeFilletFaces" );
2458 MESSAGE("GEOM_Superv_i::MakeFilletFaces");
2459 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2460 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2462 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
2463 endService( " GEOM_Superv_i::MakeFilletFaces" );
2466 endService( " GEOM_Superv_i::MakeFilletFaces" );
2470 //=============================================================================
2471 // MakeFilletFaces R1 R2:
2472 //=============================================================================
2473 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape,
2474 CORBA::Double theR1,
2475 CORBA::Double theR2,
2476 GEOM::GEOM_List_ptr theFaces)
2478 beginService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2479 MESSAGE("GEOM_Superv_i::MakeFilletFacesR1R2");
2480 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2481 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2483 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFacesR1R2(theShape, theR1, theR2,
2484 aListImplF->GetList());
2485 endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2488 endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2492 //=============================================================================
2494 //=============================================================================
2495 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
2497 beginService( " GEOM_Superv_i::MakeChamferAll" );
2498 MESSAGE("GEOM_Superv_i::MakeChamferAll");
2500 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferAll(theShape, theD);
2501 endService( " GEOM_Superv_i::MakeChamferAll" );
2505 //=============================================================================
2507 //=============================================================================
2508 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
2509 CORBA::Double theD1, CORBA::Double theD2,
2510 CORBA::Long theFace1, CORBA::Long theFace2)
2512 beginService( " GEOM_Superv_i::MakeChamferEdge" );
2513 MESSAGE("GEOM_Superv_i::MakeChamferEdge");
2515 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
2516 endService( " GEOM_Superv_i::MakeChamferEdge" );
2520 //=============================================================================
2521 // MakeChamferEdgeAD:
2522 //=============================================================================
2523 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
2524 CORBA::Double theD, CORBA::Double theAngle,
2525 CORBA::Long theFace1, CORBA::Long theFace2)
2527 beginService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2528 MESSAGE("GEOM_Superv_i::MakeChamferEdgeAD");
2530 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2);
2531 endService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2535 //=============================================================================
2536 // MakeChamferFaces:
2537 //=============================================================================
2538 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
2539 CORBA::Double theD1, CORBA::Double theD2,
2540 GEOM::GEOM_List_ptr theFaces)
2542 beginService( " GEOM_Superv_i::MakeChamferFaces" );
2543 MESSAGE("GEOM_Superv_i::MakeChamferFaces");
2544 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2545 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2547 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
2548 endService( " GEOM_Superv_i::MakeChamferFaces" );
2551 endService( " GEOM_Superv_i::MakeChamferFaces" );
2555 //=============================================================================
2556 // MakeChamferFacesAD:
2557 //=============================================================================
2558 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
2559 CORBA::Double theD, CORBA::Double theAngle,
2560 GEOM::GEOM_List_ptr theFaces)
2562 beginService( " GEOM_Superv_i::MakeChamferFacesAD" );
2563 MESSAGE("GEOM_Superv_i::MakeChamferFacesAD");
2564 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2565 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2567 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFacesAD(theShape, theD, theAngle, aListImplF->GetList());
2568 endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2571 endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2575 //=============================================================================
2576 // MakeChamferEdges:
2577 //=============================================================================
2578 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
2579 CORBA::Double theD1, CORBA::Double theD2,
2580 GEOM::GEOM_List_ptr theEdges)
2582 beginService( " GEOM_Superv_i::MakeChamferEdges" );
2583 MESSAGE("GEOM_Superv_i::MakeChamferEdges");
2584 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2585 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2587 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdges(theShape, theD1, theD2, aListImplF->GetList());
2588 endService( " GEOM_Superv_i::MakeChamferEdges" );
2591 endService( " GEOM_Superv_i::MakeChamferEdges" );
2595 //=============================================================================
2596 // MakeChamferEdgesAD:
2597 //=============================================================================
2598 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
2599 CORBA::Double theD, CORBA::Double theAngle,
2600 GEOM::GEOM_List_ptr theEdges)
2602 beginService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2603 MESSAGE("GEOM_Superv_i::MakeChamferEdgesAD");
2604 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2605 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2607 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgesAD(theShape, theD, theAngle, aListImplF->GetList());
2608 endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2611 endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2615 //=============================================================================
2617 //=============================================================================
2618 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
2619 CORBA::Double theWeight,
2620 CORBA::Double theWaterDensity,
2621 CORBA::Double theMeshingDeflection)
2623 beginService( " GEOM_Superv_i::MakeArchimede" );
2624 MESSAGE("GEOM_Superv_i::MakeArchimede");
2626 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
2627 endService( " GEOM_Superv_i::MakeArchimede" );
2631 //=============================================================================
2632 // GetSubShapeIndexMakeFilletAll:
2633 //=============================================================================
2634 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
2635 GEOM::GEOM_Object_ptr theSubShape)
2637 beginService( " GEOM_Superv_i::GetSubShapeIndex" );
2638 MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
2640 CORBA::Long aRes = myLocalOp->GetSubShapeIndex(theShape, theSubShape);
2641 endService( " GEOM_Superv_i::GetSubShapeIndex" );
2645 //=============================== GroupOperations =============================
2646 //=============================================================================
2648 //=============================================================================
2649 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
2650 CORBA::Long theShapeType)
2652 beginService( " GEOM_Superv_i::CreateGroup" );
2653 MESSAGE("GEOM_Superv_i::CreateGroup");
2655 GEOM::GEOM_Object_ptr anObj = myGroupOp->CreateGroup(theMainShape, theShapeType);
2656 endService( " GEOM_Superv_i::CreateGroup" );
2660 //=============================================================================
2662 //=============================================================================
2663 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup,
2664 CORBA::Long theSubShapeId)
2666 beginService( " GEOM_Superv_i::AddObject" );
2667 MESSAGE("GEOM_Superv_i::AddObject");
2669 myGroupOp->AddObject(theGroup, theSubShapeId);
2670 endService( " GEOM_Superv_i::AddObject" );
2673 //=============================================================================
2675 //=============================================================================
2676 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup,
2677 CORBA::Long theSubShapeId)
2679 beginService( " GEOM_Superv_i::RemoveObject" );
2680 MESSAGE("GEOM_Superv_i::RemoveObject");
2682 myGroupOp->RemoveObject(theGroup, theSubShapeId);
2683 endService( " GEOM_Superv_i::RemoveObject" );
2686 //=============================================================================
2688 //=============================================================================
2689 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
2691 beginService( " GEOM_Superv_i::GetType" );
2692 MESSAGE("GEOM_Superv_i::GetType");
2694 CORBA::Long aResult = myGroupOp->GetType(theGroup);
2695 endService( " GEOM_Superv_i::GetType" );
2699 //=============================================================================
2701 //=============================================================================
2702 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
2704 beginService( " GEOM_Superv_i::GetMainShape" );
2705 MESSAGE("GEOM_Superv_i::GetMainShape");
2707 GEOM::GEOM_Object_ptr anObj = myGroupOp->GetMainShape(theGroup);
2708 endService( " GEOM_Superv_i::GetMainShape" );
2712 //=============================================================================
2714 //=============================================================================
2715 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
2717 beginService( " GEOM_Superv_i::GetObjects" );
2718 MESSAGE("GEOM_Superv_i::GetObjects");
2721 GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
2722 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
2723 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2724 endService( " GEOM_Superv_i::GetObjects" );
2725 return aListPtr->_this();
2728 //=====================================================================================
2730 //=====================================================================================
2733 PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
2734 PortableServer::POA_ptr poa,
2735 PortableServer::ObjectId * contId,
2736 const char *instanceName,
2737 const char * interfaceName)
2739 GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
2740 myGEOM_Superv_i->register_name("/myGEOM_Superv");
2741 return myGEOM_Superv_i->getId() ;