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");
73 if (!CORBA::is_nil(myBasicOp))
75 if (!CORBA::is_nil(myBoolOp))
77 if (!CORBA::is_nil(my3DPrimOp))
78 my3DPrimOp->Destroy();
82 //============================================================================
83 // function : register()
84 // purpose : register 'name' in 'name_service'
85 //============================================================================
86 void GEOM_Superv_i::register_name(char * name)
88 GEOM::GEOM_Superv_var g = _this();
89 name_service->Register(g, name);
92 //=============================================================================
94 //=============================================================================
95 void GEOM_Superv_i::setGeomEngine()
97 if ( !CORBA::is_nil(myGeomEngine) )
99 // get GEOM_Gen engine
101 SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
102 Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" );
105 Engines::Container_var cont=GetContainerRef();
106 cont->load_component_Library("GEOM");
107 Engines::Component_var comp=cont->create_component_instance("GEOM",0);
109 myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
112 //=============================================================================
114 //=============================================================================
115 void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
117 // mkr : PAL10770 -->
118 myLastStudyID = myStudyID;
120 CORBA::Object_ptr anObject = name_service->Resolve("/Kernel/Session");
121 if ( !CORBA::is_nil(anObject) ) {
122 SALOME::Session_var aSession = SALOME::Session::_narrow(anObject);
123 if ( !CORBA::is_nil(aSession) ) {
124 int aStudyID = aSession->GetActiveStudyId();
125 if ( theId != aStudyID && aStudyID > 0) { // mkr : IPAL12128
126 MESSAGE("Warning : given study ID theId="<<theId<<" is wrong and will be replaced by the value "<<aStudyID);
127 myStudyID = aStudyID;
130 myStudyID = theId; // mkr : IPAL12128
134 if ( isNewStudy(myLastStudyID,myStudyID) ) {
135 if (CORBA::is_nil(myGeomEngine)) setGeomEngine();
136 string anEngine = _orb->object_to_string( myGeomEngine );
138 CORBA::Object_var anObj = name_service->Resolve("/myStudyManager");
139 if ( !CORBA::is_nil(anObj) ) {
140 SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(anObj);
141 if ( !CORBA::is_nil(aStudyManager) ) {
142 _PTR(Study) aDSStudy = ClientFactory::Study(aStudyManager->GetStudyByID(myStudyID));
144 _PTR(SComponent) aSCO = aDSStudy->FindComponent(myGeomEngine->ComponentDataType());
146 _PTR(StudyBuilder) aBuilder = aDSStudy->NewBuilder();
147 if ( aBuilder ) aBuilder->LoadWith( aSCO, anEngine );
153 // mkr : PAL10770 <--
156 //=============================================================================
158 //=============================================================================
159 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfGO()
161 MESSAGE("GEOM_Superv_i::CreateListOfGO()");
162 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>();
163 return aListPtr->_this();
166 //=============================================================================
167 // AddItemToListOfGO:
168 //=============================================================================
169 void GEOM_Superv_i::AddItemToListOfGO(GEOM::GEOM_List_ptr& theList,
170 GEOM::GEOM_Object_ptr theObject)
172 MESSAGE("GEOM_Superv_i::AddItemToListOfGO(...)");
173 if (GEOM_List_i<GEOM::ListOfGO>* aList =
174 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theList, myPOA).in())) {
175 aList->AddObject(theObject);
176 MESSAGE(" NewLength = "<<aList->GetList().length());
180 //=============================================================================
182 //=============================================================================
183 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfLong()
185 MESSAGE("GEOM_Superv_i::CreateListOfLong()");
186 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>();
187 return aListPtr->_this();
190 //=============================================================================
191 // AddItemToListOfLong:
192 //=============================================================================
193 void GEOM_Superv_i::AddItemToListOfLong(GEOM::GEOM_List_ptr& theList,
194 CORBA::Long theObject)
196 MESSAGE("GEOM_Superv_i::AddItemToListOfLong(...)");
197 if (GEOM_List_i<GEOM::ListOfLong>* aList =
198 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theList, myPOA).in())) {
199 aList->AddObject(theObject);
200 MESSAGE(" NewLength = "<<aList->GetList().length());
204 //=============================================================================
205 // CreateListOfDouble:
206 //=============================================================================
207 GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfDouble()
209 MESSAGE("GEOM_Superv_i::CreateListOfDouble()");
210 GEOM_List_i<GEOM::ListOfDouble>* aListPtr = new GEOM_List_i<GEOM::ListOfDouble>();
211 return aListPtr->_this();
214 //=============================================================================
215 // AddItemToListOfDouble:
216 //=============================================================================
217 void GEOM_Superv_i::AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList,
218 CORBA::Double theObject)
220 MESSAGE("GEOM_Superv_i::AddItemToListOfDouble(...)");
221 if (GEOM_List_i<GEOM::ListOfDouble>* aList =
222 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theList, myPOA).in())) {
223 aList->AddObject(theObject);
224 MESSAGE(" NewLength = "<<aList->GetList().length());
228 //=============================================================================
230 //=============================================================================
231 void GEOM_Superv_i::getBasicOp()
233 if (CORBA::is_nil(myGeomEngine))
235 // get GEOM_IBasicOperations interface
236 if (CORBA::is_nil(myBasicOp) || isNewStudy(myLastStudyID,myStudyID))
237 myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
240 //=============================================================================
242 //=============================================================================
243 void GEOM_Superv_i::get3DPrimOp()
245 if (CORBA::is_nil(myGeomEngine))
247 // get GEOM_I3DPrimOperations interface
248 if (CORBA::is_nil(my3DPrimOp) || isNewStudy(myLastStudyID,myStudyID))
249 my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
252 //=============================================================================
254 //=============================================================================
255 void GEOM_Superv_i::getBoolOp()
257 if (CORBA::is_nil(myGeomEngine))
259 // get GEOM_IBooleanOperations interface
260 if (CORBA::is_nil(myBoolOp) || isNewStudy(myLastStudyID,myStudyID))
261 myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
264 //=============================================================================
266 //=============================================================================
267 void GEOM_Superv_i::getInsOp()
269 if (CORBA::is_nil(myGeomEngine))
271 // get GEOM_IInsertOperations interface
272 if (CORBA::is_nil(myInsOp) || isNewStudy(myLastStudyID,myStudyID))
273 myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
276 //=============================================================================
278 //=============================================================================
279 void GEOM_Superv_i::getTransfOp()
281 if (CORBA::is_nil(myGeomEngine))
283 // get GEOM_ITransformOperations interface
284 if (CORBA::is_nil(myTransfOp) || isNewStudy(myLastStudyID,myStudyID))
285 myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
288 //=============================================================================
290 //=============================================================================
291 void GEOM_Superv_i::getShapesOp()
293 if (CORBA::is_nil(myGeomEngine))
295 // get GEOM_IShapesOperations interface
296 if (CORBA::is_nil(myShapesOp) || isNewStudy(myLastStudyID,myStudyID))
297 myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
300 //=============================================================================
302 //=============================================================================
303 void GEOM_Superv_i::getBlocksOp()
305 if (CORBA::is_nil(myGeomEngine))
307 // get GEOM_IBlocksOperations interface
308 if (CORBA::is_nil(myBlocksOp) || isNewStudy(myLastStudyID,myStudyID))
309 myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
312 //=============================================================================
314 //=============================================================================
315 void GEOM_Superv_i::getCurvesOp()
317 if (CORBA::is_nil(myGeomEngine))
319 // get GEOM_ICurvesOperations interface
320 if (CORBA::is_nil(myCurvesOp) || isNewStudy(myLastStudyID,myStudyID))
321 myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
324 //=============================================================================
326 //=============================================================================
327 void GEOM_Superv_i::getLocalOp()
329 if (CORBA::is_nil(myGeomEngine))
331 // get GEOM_ILocalOperations interface
332 if (CORBA::is_nil(myLocalOp) || isNewStudy(myLastStudyID,myStudyID))
333 myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
336 //=============================================================================
338 //=============================================================================
339 void GEOM_Superv_i::getGroupOp()
341 if (CORBA::is_nil(myGeomEngine))
343 // get GEOM_IGroupOperations interface
344 if (CORBA::is_nil(myGroupOp) || isNewStudy(myLastStudyID,myStudyID))
345 myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
348 //=============================================================================
350 //=============================================================================
351 PortableServer::ServantBase_var GEOM_Superv_i::GetServant(CORBA::Object_ptr theObject,
352 PortableServer::POA_ptr thePOA)
354 if(CORBA::is_nil(theObject)) return NULL;
355 PortableServer::Servant aServant = thePOA->reference_to_servant(theObject);
359 //============================================================================
361 // purpose : save OCAF/Geom document
362 //============================================================================
363 SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
365 CORBA::Boolean isMultiFile)
367 SALOMEDS::TMPFile_var aStreamFile;
368 return aStreamFile._retn();
371 //============================================================================
372 // function : SaveASCII()
374 //============================================================================
375 SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
377 CORBA::Boolean isMultiFile)
379 SALOMEDS::TMPFile_var aStreamFile;
380 return aStreamFile._retn();
383 //============================================================================
386 //============================================================================
387 CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
388 const SALOMEDS::TMPFile& theStream,
390 CORBA::Boolean isMultiFile)
395 //============================================================================
396 // function : LoadASCII()
398 //============================================================================
399 CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
400 const SALOMEDS::TMPFile& theStream,
402 CORBA::Boolean isMultiFile)
407 //============================================================================
408 // function : Close()
410 //============================================================================
411 void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr theComponent)
415 //============================================================================
416 // function : ComponentDataType()
418 //============================================================================
419 char* GEOM_Superv_i::ComponentDataType()
424 //============================================================================
425 // function : IORToLocalPersistentID()
427 //============================================================================
428 char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
429 const char* IORString,
430 CORBA::Boolean isMultiFile,
431 CORBA::Boolean isASCII)
436 //============================================================================
437 // function : LocalPersistentIDToIOR()
438 // purpose : Create/Load CORBA object from a persistent ref (an entry)
439 // : Used when a study is loaded
440 // : The IOR (IORName) of object created is returned
441 //============================================================================
442 char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
443 const char* aLocalPersistentID,
444 CORBA::Boolean isMultiFile,
445 CORBA::Boolean isASCII)
450 //============================================================================
451 // function : CanPublishInStudy
453 //============================================================================
454 CORBA::Boolean GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
456 if (CORBA::is_nil(myGeomEngine))
458 return myGeomEngine->CanPublishInStudy(theIOR);
461 //============================================================================
462 // function : PublishInStudy
464 //============================================================================
465 SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
466 SALOMEDS::SObject_ptr theSObject,
467 CORBA::Object_ptr theObject,
468 const char* theName) throw (SALOME::SALOME_Exception)
470 if (CORBA::is_nil(myGeomEngine))
472 return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
475 //============================================================================
476 // function : CanCopy()
478 //============================================================================
479 CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr theObject)
484 //============================================================================
485 // function : CopyFrom()
487 //============================================================================
488 SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID)
490 SALOMEDS::TMPFile_var aStreamFile;
491 return aStreamFile._retn();
494 //============================================================================
495 // function : CanPaste()
497 //============================================================================
498 CORBA::Boolean GEOM_Superv_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID)
503 //============================================================================
504 // function : PasteInto()
506 //============================================================================
507 SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& theStream,
508 CORBA::Long theObjectID,
509 SALOMEDS::SObject_ptr theObject)
511 SALOMEDS::SObject_var aNewSO;
512 return aNewSO._retn();
515 //================= Primitives Construction : BasicOperations =================
516 //=============================================================================
518 //=============================================================================
519 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointXYZ(CORBA::Double theX,
523 beginService( " GEOM_Superv_i::MakePointXYZ" );
524 MESSAGE("GEOM_Superv_i::MakePointXYZ");
526 // make vertex and return
527 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointXYZ(theX, theY, theZ);
528 endService( " GEOM_Superv_i::MakePointXYZ" );
532 //=============================================================================
533 // MakePointWithReference:
534 //=============================================================================
535 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
540 beginService( " GEOM_Superv_i::MakePointWithReference" );
541 MESSAGE("GEOM_Superv_i::MakePointWithReference");
543 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointWithReference(theReference, theX, theY, theZ);
544 endService( " GEOM_Superv_i::MakePointWithReference" );
548 //=============================================================================
550 //=============================================================================
551 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
552 CORBA::Double theParameter)
554 beginService( " GEOM_Superv_i::MakePointOnCurve" );
555 MESSAGE("GEOM_Superv_i::MakePointOnCurve");
557 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointOnCurve(theRefCurve, theParameter);
558 endService( " GEOM_Superv_i::MakePointOnCurve" );
562 //=============================================================================
563 // MakePointOnLinesIntersection:
564 //=============================================================================
565 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnLinesIntersection (GEOM::GEOM_Object_ptr theRefLine1,
566 GEOM::GEOM_Object_ptr theRefLine2)
568 beginService( " GEOM_Superv_i::MakePointOnLinesIntersection" );
569 MESSAGE("GEOM_Superv_i::MakePointOnLinesIntersection");
571 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointOnLinesIntersection(theRefLine1, theRefLine2);
572 endService( " GEOM_Superv_i::MakePointOnLinesIntersection" );
576 //=============================================================================
577 // MakeTangentOnCurve:
578 //=============================================================================
579 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
580 CORBA::Double theParameter)
582 beginService( " GEOM_Superv_i::MakeTangentOnCurve" );
583 MESSAGE("GEOM_Superv_i::MakeTangentOnCurve");
585 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeTangentOnCurve(theRefCurve, theParameter);
586 endService( " GEOM_Superv_i::MakeTangentOnCurve" );
590 //=============================================================================
592 //=============================================================================
593 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorDXDYDZ (CORBA::Double theDX,
597 beginService( " GEOM_Superv_i::MakeVectorDXDYDZ" );
598 MESSAGE("GEOM_Superv_i::MakeVectorDXDYDZ");
600 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeVectorDXDYDZ(theDX, theDY, theDZ);
601 endService( " GEOM_Superv_i::MakeVectorDXDYDZ" );
605 //=============================================================================
607 //=============================================================================
608 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
609 GEOM::GEOM_Object_ptr thePnt2)
611 beginService( " GEOM_Superv_i::MakeVectorTwoPnt" );
612 MESSAGE("GEOM_Superv_i::MakeVector");
614 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeVectorTwoPnt(thePnt1, thePnt2);
615 endService( " GEOM_Superv_i::MakeVectorTwoPnt" );
619 //=============================================================================
621 //=============================================================================
622 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
623 GEOM::GEOM_Object_ptr thePnt2)
625 beginService( " GEOM_Superv_i::MakeLineTwoPnt");
626 MESSAGE("GEOM_Superv_i::MakeLineTwoPnt");
628 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeLineTwoPnt(thePnt1, thePnt2);
629 endService( " GEOM_Superv_i::MakeLineTwoPnt");
633 //=============================================================================
635 //=============================================================================
636 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoFaces (GEOM::GEOM_Object_ptr theFace1,
637 GEOM::GEOM_Object_ptr theFace2)
639 beginService( " GEOM_Superv_i::MakeLineTwoFaces");
640 MESSAGE("GEOM_Superv_i::MakeLineTwoFaces");
642 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeLineTwoFaces(theFace1, theFace2);
643 endService( " GEOM_Superv_i::MakeLineTwoFaces");
647 //=============================================================================
648 // MakePlaneThreePnt:
649 //=============================================================================
650 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
651 GEOM::GEOM_Object_ptr thePnt2,
652 GEOM::GEOM_Object_ptr thePnt3,
653 CORBA::Double theTrimSize)
655 beginService( " GEOM_Superv_i::MakePlaneThreePnt");
656 MESSAGE("GEOM_Superv_i::MakePlaneThreePnt");
658 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize);
659 endService( " GEOM_Superv_i::MakePlaneThreePnt");
663 //=============================================================================
665 //=============================================================================
666 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
667 GEOM::GEOM_Object_ptr theVec,
668 CORBA::Double theTrimSize)
670 beginService( " GEOM_Superv_i::MakePlanePntVec" );
671 MESSAGE("GEOM_Superv_i::MakePlanePntVec");
673 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlanePntVec(thePnt, theVec, theTrimSize);
674 endService( " GEOM_Superv_i::MakePlanePntVec" );
678 //=============================================================================
680 //=============================================================================
681 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
682 CORBA::Double theTrimSize)
684 beginService( " GEOM_Superv_i::MakePlaneFace" );
685 MESSAGE("GEOM_Superv_i::MakePlaneFace");
687 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePlaneFace(theFace, theTrimSize);
688 endService( " GEOM_Superv_i::MakePlaneFace" );
692 //=============================================================================
694 //=============================================================================
695 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarker
696 (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
697 CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
698 CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
700 beginService( " GEOM_Superv_i::MakeMarker" );
701 MESSAGE("GEOM_Superv_i::MakeMarker");
703 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeMarker(theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ);
704 endService( " GEOM_Superv_i::MakeMarker" );
708 //=============================================================================
709 // MakeTangentPlaneOnFace:
710 //=============================================================================
711 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTangentPlaneOnFace (GEOM::GEOM_Object_ptr theFace,
712 CORBA::Double theParameterU,
713 CORBA::Double theParameterV,
714 CORBA::Double theTrimSize)
716 beginService( " GEOM_Superv_i::MakeTangentPlaneOnFace" );
717 MESSAGE("GEOM_Superv_i::MakeTangentPlaneOnFace");
719 GEOM::GEOM_Object_ptr anObj = myBasicOp->MakeTangentPlaneOnFace(theFace, theParameterU,theParameterV,theTrimSize);
720 endService( " GEOM_Superv_i::MakeTangentPlaneOnFace" );
724 //================= Primitives Construction : 3DPrimOperations ================
725 //=============================================================================
727 //=============================================================================
728 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBox (CORBA::Double theX1,
735 beginService( " GEOM_Superv_i::MakeBox" );
736 MESSAGE("GEOM_Superv_i::MakeBox");
739 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1),
740 myBasicOp->MakePointXYZ(theX2, theY2, theZ2));
741 endService( " GEOM_Superv_i::MakeBox" );
745 //=============================================================================
747 //=============================================================================
748 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxDXDYDZ (CORBA::Double theDX,
752 beginService( " GEOM_Superv_i::MakeBoxDXDYDZ" );
753 MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ");
755 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ);
756 endService( " GEOM_Superv_i::MakeBoxDXDYDZ" );
760 //=============================================================================
762 //=============================================================================
763 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
764 GEOM::GEOM_Object_ptr thePnt2)
766 beginService( " GEOM_Superv_i::MakeBoxTwoPnt" );
767 MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt");
769 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2);
770 endService( " GEOM_Superv_i::MakeBoxTwoPnt" );
774 //=============================================================================
775 // MakeCylinderPntVecRH:
776 //=============================================================================
777 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
778 GEOM::GEOM_Object_ptr theAxis,
779 CORBA::Double theRadius,
780 CORBA::Double theHeight)
782 beginService( " GEOM_Superv_i::MakeCylinderPntVecRH" );
783 MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH");
785 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight);
786 endService( " GEOM_Superv_i::MakeCylinderPntVecRH" );
790 //=============================================================================
792 //=============================================================================
793 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR,
796 beginService( " GEOM_Superv_i::MakeCylinderRH" );
797 MESSAGE("GEOM_Superv_i::MakeCylinderRH");
799 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderRH(theR, theH);
800 endService( " GEOM_Superv_i::MakeCylinderRH" );
804 //=============================================================================
806 //=============================================================================
807 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere (CORBA::Double theX,
810 CORBA::Double theRadius)
812 beginService( " GEOM_Superv_i::MakeSphepe" );
813 MESSAGE("GEOM_Superv_i::MakeSphepe");
816 GEOM::GEOM_Object_var o = myBasicOp->MakePointXYZ(theX, theY, theZ);
817 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(o, theRadius);
819 endService( " GEOM_Superv_i::MakeSphepe" );
823 //=============================================================================
825 //=============================================================================
826 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
828 beginService( " GEOM_Superv_i::MakeSphereR" );
829 MESSAGE("GEOM_Superv_i::MakeSphereR");
831 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSphereR(theR);
832 endService( " GEOM_Superv_i::MakeSphereR" );
836 //=============================================================================
838 //=============================================================================
839 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
842 beginService( " GEOM_Superv_i::MakeSpherePntR" );
843 MESSAGE("GEOM_Superv_i::MakeSpherePntR");
845 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(thePnt, theR);
846 endService( " GEOM_Superv_i::MakeSpherePntR" );
850 //=============================================================================
851 // MakeTorusPntVecRR:
852 //=============================================================================
853 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
854 GEOM::GEOM_Object_ptr theVec,
855 CORBA::Double theRMajor,
856 CORBA::Double theRMinor)
858 beginService( " GEOM_Superv_i::MakeTorusPntVecRR" );
859 MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
861 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
862 endService( " GEOM_Superv_i::MakeTorusPntVecRR" );
866 //=============================================================================
868 //=============================================================================
869 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor,
870 CORBA::Double theRMinor)
872 beginService( " GEOM_Superv_i::MakeTorusRR" );
873 MESSAGE("GEOM_Superv_i::MakeTorusRR");
875 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
876 endService( " GEOM_Superv_i::MakeTorusRR" );
880 //=============================================================================
881 // MakeConePntVecR1R2H:
882 //=============================================================================
883 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
884 GEOM::GEOM_Object_ptr theAxis,
887 CORBA::Double theHeight)
889 beginService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
890 MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
892 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
893 endService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
897 //=============================================================================
899 //=============================================================================
900 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1,
902 CORBA::Double theHeight)
904 beginService( " GEOM_Superv_i::MakeConeR1R2H" );
905 MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
907 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
908 endService( " GEOM_Superv_i::MakeConeR1R2H" );
912 //=============================================================================
914 //=============================================================================
915 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
916 GEOM::GEOM_Object_ptr theVec,
919 beginService( " GEOM_Superv_i::MakePrismVecH" );
920 MESSAGE("GEOM_Superv_i::MakePrismVecH");
922 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
923 endService( " GEOM_Superv_i::MakePrismVecH" );
927 //=============================================================================
928 // MakePrismVecH2Ways:
929 //=============================================================================
930 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
931 GEOM::GEOM_Object_ptr theVec,
934 beginService( " GEOM_Superv_i::MakePrismVecH2Ways" );
935 MESSAGE("GEOM_Superv_i::MakePrismVecH2Ways");
937 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH2Ways(theBase, theVec, theH);
938 endService( " GEOM_Superv_i::MakePrismVecH2Ways" );
942 //=============================================================================
944 //=============================================================================
945 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
946 GEOM::GEOM_Object_ptr thePoint1,
947 GEOM::GEOM_Object_ptr thePoint2)
949 beginService( " GEOM_Superv_i::MakePrismTwoPnt" );
950 MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
952 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
953 endService( " GEOM_Superv_i::MakePrismTwoPnt" );
957 //=============================================================================
958 // MakePrismTwoPnt2Ways:
959 //=============================================================================
960 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
961 GEOM::GEOM_Object_ptr thePoint1,
962 GEOM::GEOM_Object_ptr thePoint2)
964 beginService( " GEOM_Superv_i::MakePrismTwoPnt2Ways" );
965 MESSAGE("GEOM_Superv_i::MakePrismTwoPnt2Ways");
967 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2);
968 endService( " GEOM_Superv_i::MakePrismTwoPnt2Ways" );
972 //=============================================================================
974 //=============================================================================
975 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase,
976 GEOM::GEOM_Object_ptr thePath)
978 beginService( " GEOM_Superv_i::MakePipe" );
979 MESSAGE("GEOM_Superv_i::MakePipe");
981 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipe(theBase, thePath);
982 endService( " GEOM_Superv_i::MakePipe" );
986 //=============================================================================
987 // MakeRevolutionAxisAngle:
988 //=============================================================================
989 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
990 GEOM::GEOM_Object_ptr theAxis,
991 CORBA::Double theAngle)
993 beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
994 MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
996 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
997 endService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
1001 //=============================================================================
1002 // MakeRevolutionAxisAngle:
1003 //=============================================================================
1004 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
1005 GEOM::GEOM_Object_ptr theAxis,
1006 CORBA::Double theAngle)
1008 beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle2Ways" );
1009 MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle2Ways");
1011 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle);
1012 endService( " GEOM_Superv_i::MakeRevolutionAxisAngle2Ways" );
1016 //=============================================================================
1018 //=============================================================================
1019 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
1020 CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
1021 CORBA::Double theTol2D, CORBA::Double theTol3D,
1022 CORBA::Long theNbIter, CORBA::Boolean theApprox)
1024 beginService( " GEOM_Superv_i::MakeFilling" );
1025 MESSAGE("GEOM_Superv_i::MakeFilling");
1027 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theApprox);
1028 endService( " GEOM_Superv_i::MakeFilling" );
1032 //============================= BooleanOperations =============================
1033 //=============================================================================
1035 //=============================================================================
1036 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
1037 GEOM::GEOM_Object_ptr theShape2,
1038 CORBA::Long theOperation)
1040 beginService( " GEOM_Superv_i::MakeBoolean" );
1041 // theOperation indicates the operation to be done:
1042 // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
1043 MESSAGE("GEOM_Superv_i::MakeBoolean");
1045 GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
1046 endService( " GEOM_Superv_i::MakeBoolean" );
1050 //=============================================================================
1051 // MakeThruSections:
1052 //=============================================================================
1053 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeThruSections(const GEOM::ListOfGO& theSeqSections,
1054 CORBA::Boolean theModeSolid,
1055 CORBA::Double thePreci,
1056 CORBA::Boolean theRuled)
1058 beginService( " GEOM_Superv_i::MakeThruSections" );
1059 MESSAGE("GEOM_Superv_i::MakeThruSections");
1061 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeThruSections(theSeqSections, theModeSolid,thePreci,theRuled);
1062 endService( " GEOM_Superv_i::MakeThruSections" );
1066 //=============================================================================
1068 //=============================================================================
1069 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithDifferentSections
1070 (const GEOM::ListOfGO& theBases,
1071 const GEOM::ListOfGO& theLocations,
1072 GEOM::GEOM_Object_ptr thePath,
1073 CORBA::Boolean theWithContact,
1074 CORBA::Boolean theWithCorrections)
1076 beginService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
1077 MESSAGE("GEOM_Superv_i::MakePipeWithDifferentSections");
1079 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipeWithDifferentSections(theBases,theLocations, thePath,theWithContact,theWithCorrections);
1080 endService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
1085 //=============================================================================
1087 //=============================================================================
1088 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithShellSections
1089 (const GEOM::ListOfGO& theBases,
1090 const GEOM::ListOfGO& theSubBases,
1091 const GEOM::ListOfGO& theLocations,
1092 GEOM::GEOM_Object_ptr thePath,
1093 CORBA::Boolean theWithContact,
1094 CORBA::Boolean theWithCorrections)
1096 beginService( " GEOM_Superv_i::MakePipeWithShellSections" );
1097 MESSAGE("GEOM_Superv_i::MakePipeWithShellSections");
1099 GEOM::GEOM_Object_ptr anObj =
1100 my3DPrimOp->MakePipeWithShellSections(theBases, theSubBases,
1101 theLocations, thePath,
1102 theWithContact, theWithCorrections);
1103 endService( " GEOM_Superv_i::MakePipeWithShellSections" );
1108 //=============================================================================
1110 //=============================================================================
1111 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeShellsWithoutPath
1112 (const GEOM::ListOfGO& theBases,
1113 const GEOM::ListOfGO& theLocations)
1115 beginService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1116 MESSAGE("GEOM_Superv_i::MakePipeShellsWithoutPath");
1118 GEOM::GEOM_Object_ptr anObj =
1119 my3DPrimOp->MakePipeShellsWithoutPath(theBases,theLocations);
1120 endService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1125 //=============================================================================
1127 //=============================================================================
1128 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1,
1129 GEOM::GEOM_Object_ptr theShape2)
1131 beginService( " GEOM_Superv_i::MakeFuse" );
1132 MESSAGE("GEOM_Superv_i::MakeFuse");
1134 GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeBoolean(theShape1, theShape2, 3);
1135 endService( " GEOM_Superv_i::MakeFuse" );
1139 //=============================================================================
1141 //=============================================================================
1142 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr theShapes,
1143 GEOM::GEOM_List_ptr theTools,
1144 GEOM::GEOM_List_ptr theKeepInside,
1145 GEOM::GEOM_List_ptr theRemoveInside,
1146 CORBA::Short theLimit,
1147 CORBA::Boolean theRemoveWebs,
1148 GEOM::GEOM_List_ptr theMaterials,
1149 CORBA::Short theKeepNonlimitShapes)
1151 beginService( " GEOM_Superv_i::MakePartition" );
1152 MESSAGE("GEOM_Superv_i::MakePartition");
1153 GEOM_List_i<GEOM::ListOfGO>* aListImplS =
1154 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in());
1155 GEOM_List_i<GEOM::ListOfGO>* aListImplT =
1156 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theTools, myPOA).in());
1157 GEOM_List_i<GEOM::ListOfGO>* aListImplKI =
1158 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theKeepInside, myPOA).in());
1159 GEOM_List_i<GEOM::ListOfGO>* aListImplRI =
1160 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theRemoveInside, myPOA).in());
1161 GEOM_List_i<GEOM::ListOfLong>* aListImplM =
1162 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theMaterials, myPOA).in());
1163 if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
1165 GEOM::GEOM_Object_ptr anObj =
1166 myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(),
1167 aListImplKI->GetList(), aListImplRI->GetList(),
1168 theLimit, theRemoveWebs, aListImplM->GetList(),
1169 theKeepNonlimitShapes);
1170 endService( " GEOM_Superv_i::MakePartition" );
1173 endService( " GEOM_Superv_i::MakePartition" );
1177 //=============================================================================
1178 // MakeHalfPartition:
1179 //=============================================================================
1180 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
1181 GEOM::GEOM_Object_ptr thePlane)
1183 beginService( " GEOM_Superv_i::MakeHalfPartition" );
1184 MESSAGE("GEOM_Superv_i::MakeHalfPartition");
1186 GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeHalfPartition(theShape, thePlane);
1187 endService( " GEOM_Superv_i::MakeHalfPartition" );
1191 //============================== InsertOperations =============================
1192 //=============================================================================
1194 //=============================================================================
1195 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
1197 beginService( " GEOM_Superv_i::MakeCopy" );
1198 MESSAGE("GEOM_Superv_i::MakeCopy");
1200 GEOM::GEOM_Object_ptr anObj = myInsOp->MakeCopy(theOriginal);
1201 endService( " GEOM_Superv_i::MakeCopy" );
1205 //=============================================================================
1207 //=============================================================================
1208 void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject,
1209 const char* theFileName,
1210 const char* theFormatName)
1212 beginService( " GEOM_Superv_i::Export" );
1213 MESSAGE("GEOM_Superv_i::Export");
1215 myInsOp->Export(theObject, theFileName, theFormatName);
1216 endService( " GEOM_Superv_i::Export" );
1219 //=============================================================================
1221 //=============================================================================
1222 GEOM::GEOM_Object_ptr GEOM_Superv_i::Import (const char* theFileName,
1223 const char* theFormatName)
1225 beginService( " GEOM_Superv_i::Import" );
1226 MESSAGE("GEOM_Superv_i::Import");
1228 GEOM::GEOM_Object_ptr anObj = myInsOp->Import(theFileName, theFormatName);
1229 endService( " GEOM_Superv_i::Import" );
1233 //=============================================================================
1234 // ImportTranslators:
1235 //=============================================================================
1236 void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
1237 GEOM::string_array_out thePatterns)
1239 beginService( " GEOM_Superv_i::ImportTranslators" );
1240 MESSAGE("GEOM_Superv_i::ImportTranslators");
1242 myInsOp->ImportTranslators(theFormats, thePatterns);
1243 endService( " GEOM_Superv_i::ImportTranslators" );
1246 //=============================================================================
1247 // ExportTranslators:
1248 //=============================================================================
1249 void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
1250 GEOM::string_array_out thePatterns)
1252 beginService( " GEOM_Superv_i::ExportTranslators" );
1253 MESSAGE("GEOM_Superv_i::ExportTranslators");
1255 myInsOp->ExportTranslators(theFormats, thePatterns);
1256 endService( " GEOM_Superv_i::ExportTranslators" );
1259 //============================= TransformOperations ===========================
1260 //=============================================================================
1261 // TranslateTwoPoints:
1262 //=============================================================================
1263 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
1264 GEOM::GEOM_Object_ptr thePoint1,
1265 GEOM::GEOM_Object_ptr thePoint2)
1267 beginService( " GEOM_Superv_i::TranslateTwoPoints" );
1268 MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
1270 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
1271 endService( " GEOM_Superv_i::TranslateTwoPoints" );
1275 //=============================================================================
1276 // TranslateTwoPointsCopy:
1277 //=============================================================================
1278 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
1279 GEOM::GEOM_Object_ptr thePoint1,
1280 GEOM::GEOM_Object_ptr thePoint2)
1282 beginService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1283 MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
1285 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
1286 endService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1290 //=============================================================================
1292 //=============================================================================
1293 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
1294 CORBA::Double theDX,
1295 CORBA::Double theDY,
1296 CORBA::Double theDZ)
1298 beginService( " GEOM_Superv_i::TranslateDXDYDZ" );
1299 MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
1301 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
1302 endService( " GEOM_Superv_i::TranslateDXDYDZ" );
1306 //=============================================================================
1307 // TranslateDXDYDZCopy:
1308 //=============================================================================
1309 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
1310 CORBA::Double theDX,
1311 CORBA::Double theDY,
1312 CORBA::Double theDZ)
1314 beginService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1315 MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
1317 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
1318 endService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1322 //=============================================================================
1324 //=============================================================================
1325 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject,
1326 GEOM::GEOM_Object_ptr theVector)
1328 beginService( " GEOM_Superv_i::TranslateVector" );
1329 MESSAGE("GEOM_Superv_i::TranslateVector");
1331 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVector(theObject, theVector);
1332 endService( " GEOM_Superv_i::TranslateVector" );
1336 //=============================================================================
1337 // TranslateVectorCopy:
1338 //=============================================================================
1339 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
1340 GEOM::GEOM_Object_ptr theVector)
1342 beginService( " GEOM_Superv_i::TranslateVectorCopy" );
1343 MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
1345 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorCopy(theObject, theVector);
1346 endService( " GEOM_Superv_i::TranslateVectorCopy" );
1350 //=============================================================================
1351 // MultiTranslate1D:
1352 //=============================================================================
1353 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
1354 GEOM::GEOM_Object_ptr theVector,
1355 CORBA::Double theStep,
1356 CORBA::Long theNbTimes)
1358 beginService( " GEOM_Superv_i::MultiTranslate1D" );
1359 MESSAGE("GEOM_Superv_i::MultiTranslate1D");
1361 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
1362 endService( " GEOM_Superv_i::MultiTranslate1D" );
1366 //=============================================================================
1367 // MultiTranslate2D:
1368 //=============================================================================
1369 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
1370 GEOM::GEOM_Object_ptr theVector1,
1371 CORBA::Double theStep1,
1372 CORBA::Long theNbTimes1,
1373 GEOM::GEOM_Object_ptr theVector2,
1374 CORBA::Double theStep2,
1375 CORBA::Long theNbTimes2)
1377 beginService( " GEOM_Superv_i::MultiTranslate2D" );
1378 MESSAGE("GEOM_Superv_i::MultiTranslate2D");
1380 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
1381 theVector2, theStep2, theNbTimes2);
1382 endService( " GEOM_Superv_i::MultiTranslate2D" );
1386 //=============================================================================
1388 //=============================================================================
1389 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
1390 GEOM::GEOM_Object_ptr theAxis,
1391 CORBA::Double theAngle)
1393 beginService( " GEOM_Superv_i::Rotate" );
1394 MESSAGE("GEOM_Superv_i::Rotate");
1396 GEOM::GEOM_Object_ptr anObj = myTransfOp->Rotate(theObject, theAxis, theAngle);
1397 endService( " GEOM_Superv_i::Rotate" );
1401 //=============================================================================
1403 //=============================================================================
1404 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
1405 GEOM::GEOM_Object_ptr theAxis,
1406 CORBA::Double theAngle)
1408 beginService( " GEOM_Superv_i::RotateCopy" );
1409 MESSAGE("GEOM_Superv_i::RotateCopy");
1411 GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateCopy(theObject, theAxis, theAngle);
1412 endService( " GEOM_Superv_i::RotateCopy" );
1415 //=============================================================================
1416 // RotateThreePoints:
1417 //=============================================================================
1418 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePoints (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::RotateThreePoints" );
1424 MESSAGE("GEOM_Superv_i::RotateThreePoints");
1426 GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2);
1427 endService( " GEOM_Superv_i::RotateThreePoints" );
1431 //=============================================================================
1432 // RotateThreePointsCopy:
1433 //=============================================================================
1434 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
1435 GEOM::GEOM_Object_ptr theCentPoint,
1436 GEOM::GEOM_Object_ptr thePoint1,
1437 GEOM::GEOM_Object_ptr thePoint2)
1439 beginService( " GEOM_Superv_i::RotateThreePointsCopy" );
1440 MESSAGE("GEOM_Superv_i::RotateThreePointsCopy");
1442 GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2);
1443 endService( " GEOM_Superv_i::RotateThreePointsCopy" );
1447 //=============================================================================
1449 //=============================================================================
1450 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1451 GEOM::GEOM_Object_ptr theAxis,
1452 CORBA::Long theNbTimes)
1454 beginService( " GEOM_Superv_i::MultiRotate1D" );
1455 MESSAGE("GEOM_Superv_i::MultiRotate1D");
1457 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
1458 endService( " GEOM_Superv_i::MultiRotate1D" );
1462 //=============================================================================
1464 //=============================================================================
1465 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1466 GEOM::GEOM_Object_ptr theAxis,
1467 CORBA::Double theAngle,
1468 CORBA::Long theNbTimes1,
1469 CORBA::Double theStep,
1470 CORBA::Long theNbTimes2)
1472 beginService( " GEOM_Superv_i::MultiRotate2D" );
1473 MESSAGE("GEOM_Superv_i::MultiRotate2D");
1475 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
1476 endService( " GEOM_Superv_i::MultiRotate2D" );
1480 //=============================================================================
1482 //=============================================================================
1483 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject,
1484 GEOM::GEOM_Object_ptr thePlane)
1486 beginService( " GEOM_Superv_i::MirrorPlane" );
1487 MESSAGE("GEOM_Superv_i::MirrorPlane");
1489 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlane(theObject, thePlane);
1490 endService( " GEOM_Superv_i::MirrorPlane" );
1494 //=============================================================================
1496 //=============================================================================
1497 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
1498 GEOM::GEOM_Object_ptr thePlane)
1500 beginService( " GEOM_Superv_i::MirrorPlaneCopy" );
1501 MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
1503 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlaneCopy(theObject, thePlane);
1504 endService( " GEOM_Superv_i::MirrorPlaneCopy" );
1508 //=============================================================================
1510 //=============================================================================
1511 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject,
1512 GEOM::GEOM_Object_ptr theAxis)
1514 beginService( " GEOM_Superv_i::MirrorAxis" );
1515 MESSAGE("GEOM_Superv_i::MirrorAxis");
1517 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxis(theObject, theAxis);
1518 endService( " GEOM_Superv_i::MirrorAxis" );
1522 //=============================================================================
1524 //=============================================================================
1525 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
1526 GEOM::GEOM_Object_ptr theAxis)
1528 beginService( " GEOM_Superv_i::MirrorAxisCopy" );
1529 MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
1531 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxisCopy(theObject, theAxis);
1532 endService( " GEOM_Superv_i::MirrorAxisCopy" );
1536 //=============================================================================
1538 //=============================================================================
1539 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject,
1540 GEOM::GEOM_Object_ptr thePoint)
1542 beginService( " GEOM_Superv_i::MirrorPoint" );
1543 MESSAGE("GEOM_Superv_i::MirrorPoint");
1545 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPoint(theObject, thePoint);
1546 endService( " GEOM_Superv_i::MirrorPoint" );
1550 //=============================================================================
1552 //=============================================================================
1553 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
1554 GEOM::GEOM_Object_ptr thePoint)
1556 beginService( " GEOM_Superv_i::MirrorPoint" );
1557 MESSAGE("GEOM_Superv_i::MirrorPointCopy");
1559 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPointCopy(theObject, thePoint);
1560 endService( " GEOM_Superv_i::MirrorPoint" );
1564 //=============================================================================
1566 //=============================================================================
1567 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject,
1568 CORBA::Double theOffset)
1570 beginService( " GEOM_Superv_i::OffsetShape" );
1571 MESSAGE("GEOM_Superv_i::OffsetShape");
1573 GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset);
1574 endService( " GEOM_Superv_i::OffsetShape" );
1578 //=============================================================================
1580 //=============================================================================
1581 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
1582 CORBA::Double theOffset)
1584 beginService( " GEOM_Superv_i::OffsetShapeCopy" );
1585 MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1587 GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset);
1588 endService( " GEOM_Superv_i::OffsetShapeCopy" );
1592 //=============================================================================
1594 //=============================================================================
1595 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject,
1596 GEOM::GEOM_Object_ptr thePoint,
1597 CORBA::Double theFactor)
1599 beginService( " GEOM_Superv_i::ScaleShape" );
1600 MESSAGE("GEOM_Superv_i::ScaleShape");
1602 GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShape(theObject, thePoint, theFactor);
1603 endService( " GEOM_Superv_i::ScaleShape" );
1607 //=============================================================================
1609 //=============================================================================
1610 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
1611 GEOM::GEOM_Object_ptr thePoint,
1612 CORBA::Double theFactor)
1614 beginService( " GEOM_Superv_i::ScaleShapeCopy" );
1615 MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
1617 GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
1618 endService( " GEOM_Superv_i::ScaleShapeCopy" );
1622 //=============================================================================
1624 //=============================================================================
1625 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
1626 GEOM::GEOM_Object_ptr theStartLCS,
1627 GEOM::GEOM_Object_ptr theEndLCS)
1629 beginService( " GEOM_Superv_i::PositionShape" );
1630 MESSAGE("GEOM_Superv_i::PositionShape");
1632 GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
1633 endService( " GEOM_Superv_i::PositionShape" );
1637 //=============================================================================
1638 // PositionShapeCopy:
1639 //=============================================================================
1640 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
1641 GEOM::GEOM_Object_ptr theStartLCS,
1642 GEOM::GEOM_Object_ptr theEndLCS)
1644 beginService( " GEOM_Superv_i::PositionShapeCopy" );
1645 MESSAGE("GEOM_Superv_i::PositionShapeCopy");
1647 GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
1648 endService( " GEOM_Superv_i::PositionShapeCopy" );
1652 //=============================== ShapesOperations ============================
1653 //=============================================================================
1655 //=============================================================================
1656 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
1657 GEOM::GEOM_Object_ptr thePnt2)
1659 beginService( " GEOM_Superv_i::MakeEdge" );
1660 MESSAGE("GEOM_Superv_i::MakeEdge");
1662 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeEdge(thePnt1, thePnt2);
1663 endService( " GEOM_Superv_i::MakeEdge" );
1667 //=============================================================================
1669 //=============================================================================
1670 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires)
1672 beginService( " GEOM_Superv_i::MakeWire" );
1673 MESSAGE("GEOM_Superv_i::MakeWire");
1674 if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW =
1675 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
1677 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeWire(aListImplEW->GetList());
1678 endService( " GEOM_Superv_i::MakeWire" );
1681 endService( " GEOM_Superv_i::MakeWire" );
1685 //=============================================================================
1687 //=============================================================================
1688 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
1689 CORBA::Boolean isPlanarWanted)
1691 beginService( " GEOM_Superv_i::MakeFace" );
1692 MESSAGE("GEOM_Superv_i::MakeFace");
1694 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFace(theWire, isPlanarWanted);
1695 endService( " GEOM_Superv_i::MakeFace" );
1699 //=============================================================================
1701 //=============================================================================
1702 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires,
1703 CORBA::Boolean isPlanarWanted)
1705 beginService( " GEOM_Superv_i::MakeFaceWires" );
1706 MESSAGE("GEOM_Superv_i::MakeFaceWires");
1707 if (GEOM_List_i<GEOM::ListOfGO>* aListImplW =
1708 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
1710 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
1711 endService( " GEOM_Superv_i::MakeFaceWires" );
1714 endService( " GEOM_Superv_i::MakeFaceWires" );
1718 //=============================================================================
1720 //=============================================================================
1721 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells)
1723 beginService( " GEOM_Superv_i::MakeShell" );
1724 MESSAGE("GEOM_Superv_i::MakeShell");
1725 if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS =
1726 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
1728 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeShell(aListImplFS->GetList());
1729 endService( " GEOM_Superv_i::MakeShell" );
1732 endService( " GEOM_Superv_i::MakeShell" );
1736 //=============================================================================
1738 //=============================================================================
1739 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
1741 beginService( " GEOM_Superv_i::MakeSolidShell" );
1742 MESSAGE("GEOM_Superv_i::MakeSolidShell");
1744 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShell(theShell);
1745 endService( " GEOM_Superv_i::MakeSolidShell" );
1749 //=============================================================================
1751 //=============================================================================
1752 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells)
1754 beginService( " GEOM_Superv_i::MakeSolidShells" );
1755 MESSAGE("GEOM_Superv_i::MakeSolidShells");
1756 if (GEOM_List_i<GEOM::ListOfGO>* aListImplS =
1757 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
1759 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShells(aListImplS->GetList());
1760 endService( " GEOM_Superv_i::MakeSolidShells" );
1763 endService( " GEOM_Superv_i::MakeSolidShells" );
1767 //=============================================================================
1769 //=============================================================================
1770 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes)
1772 beginService( " GEOM_Superv_i::MakeCompound" );
1773 MESSAGE("GEOM_Superv_i::MakeCompound");
1774 if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
1775 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
1777 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeCompound(aListImpl->GetList());
1778 endService( " GEOM_Superv_i::MakeCompound" );
1781 endService( " GEOM_Superv_i::MakeCompound" );
1785 //=============================================================================
1787 //=============================================================================
1788 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
1789 CORBA::Double theTolerance,
1790 CORBA::Boolean doKeepNonSolids)
1792 beginService( " GEOM_Superv_i::MakeGlueFaces" );
1793 MESSAGE("GEOM_Superv_i::MakeGlueFaces");
1795 GEOM::GEOM_Object_ptr anObj =
1796 myShapesOp->MakeGlueFaces(theShape, theTolerance, doKeepNonSolids);
1797 endService( " GEOM_Superv_i::MakeGlueFaces" );
1801 //=============================================================================
1803 //=============================================================================
1804 GEOM::GEOM_List_ptr GEOM_Superv_i::GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
1805 CORBA::Double theTolerance)
1807 beginService( " GEOM_Superv_i::GetGlueFaces" );
1808 MESSAGE("GEOM_Superv_i::GetGlueFaces");
1810 GEOM::ListOfGO* aList = myShapesOp->GetGlueFaces(theShape, theTolerance);
1811 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1812 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1813 endService( " GEOM_Superv_i::GetGlueFaces" );
1814 return aListPtr->_this();
1817 //=============================================================================
1818 // MakeGlueFacesByList:
1819 //=============================================================================
1820 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
1821 CORBA::Double theTolerance,
1822 const GEOM::ListOfGO& theFaces,
1823 CORBA::Boolean doKeepNonSolids)
1825 beginService( " GEOM_Superv_i::MakeGlueFacesByList" );
1826 MESSAGE("GEOM_Superv_i::MakeGlueFacesByList");
1828 GEOM::GEOM_Object_ptr anObj =
1829 myShapesOp->MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids);
1830 endService( " GEOM_Superv_i::MakeGlueFacesByList" );
1834 //=============================================================================
1836 //=============================================================================
1837 GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
1838 CORBA::Long theShapeType,
1839 CORBA::Boolean isSorted)
1841 beginService( " GEOM_Superv_i::MakeExplode" );
1842 MESSAGE("GEOM_Superv_i::MakeExplode");
1845 GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
1846 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1847 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1848 endService( " GEOM_Superv_i::MakeExplode" );
1849 return aListPtr->_this();
1852 //=============================================================================
1854 //=============================================================================
1855 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
1857 beginService( " GEOM_Superv_i::NumberOfFaces" );
1858 MESSAGE("GEOM_Superv_i::NumberOfFaces");
1860 CORBA::Long aRes = myShapesOp->NumberOfFaces(theShape);
1861 endService( " GEOM_Superv_i::NumberOfFaces" );
1865 //=============================================================================
1867 //=============================================================================
1868 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
1870 beginService( " GEOM_Superv_i::NumberOfEdges" );
1871 MESSAGE("GEOM_Superv_i::NumberOfEdges");
1873 CORBA::Long aRes = myShapesOp->NumberOfEdges(theShape);
1874 endService( " GEOM_Superv_i::NumberOfEdges" );
1878 //=============================================================================
1879 // ChangeOrientation:
1880 //=============================================================================
1881 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
1883 beginService( " GEOM_Superv_i::ChangeOrientation" );
1884 MESSAGE("GEOM_Superv_i::ChangeOrientation");
1886 GEOM::GEOM_Object_ptr anObj = myShapesOp->ChangeOrientation(theShape);
1887 endService( " GEOM_Superv_i::ChangeOrientation" );
1892 //=============================== BlocksOperations ============================
1893 //=============================================================================
1894 // MakeQuad4Vertices:
1895 //=============================================================================
1896 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
1897 GEOM::GEOM_Object_ptr thePnt2,
1898 GEOM::GEOM_Object_ptr thePnt3,
1899 GEOM::GEOM_Object_ptr thePnt4)
1901 beginService( " GEOM_Superv_i::MakeQuad4Vertices" );
1902 MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
1904 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
1905 endService( " GEOM_Superv_i::MakeQuad4Vertices" );
1909 //=============================================================================
1911 //=============================================================================
1912 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
1913 GEOM::GEOM_Object_ptr theEdge2,
1914 GEOM::GEOM_Object_ptr theEdge3,
1915 GEOM::GEOM_Object_ptr theEdge4)
1917 beginService( " GEOM_Superv_i::MakeQuad" );
1918 MESSAGE("GEOM_Superv_i::MakeQuad");
1920 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
1921 endService( " GEOM_Superv_i::MakeQuad" );
1925 //=============================================================================
1927 //=============================================================================
1928 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
1929 GEOM::GEOM_Object_ptr theEdge2)
1931 beginService( " GEOM_Superv_i::MakeQuad2Edges" );
1932 MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
1934 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
1935 endService( " GEOM_Superv_i::MakeQuad2Edges" );
1939 //=============================================================================
1941 //=============================================================================
1942 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
1943 GEOM::GEOM_Object_ptr theFace2,
1944 GEOM::GEOM_Object_ptr theFace3,
1945 GEOM::GEOM_Object_ptr theFace4,
1946 GEOM::GEOM_Object_ptr theFace5,
1947 GEOM::GEOM_Object_ptr theFace6)
1949 beginService( " GEOM_Superv_i::MakeHexa" );
1950 MESSAGE("GEOM_Superv_i::MakeHexa");
1952 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
1953 endService( " GEOM_Superv_i::MakeHexa" );
1957 //=============================================================================
1959 //=============================================================================
1960 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
1961 GEOM::GEOM_Object_ptr theFace2)
1963 beginService( " GEOM_Superv_i::MakeHexa2Faces" );
1964 MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
1966 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
1967 endService( " GEOM_Superv_i::MakeHexa2Faces" );
1971 //=============================================================================
1973 //=============================================================================
1974 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
1978 CORBA::Double theEpsilon)
1980 beginService( " GEOM_Superv_i::GetPoint" );
1981 MESSAGE("GEOM_Superv_i::GetPoint");
1983 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
1984 endService( " GEOM_Superv_i::GetPoint" );
1988 //=============================================================================
1990 //=============================================================================
1991 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
1992 GEOM::GEOM_Object_ptr thePoint1,
1993 GEOM::GEOM_Object_ptr thePoint2)
1995 beginService( " GEOM_Superv_i::GetEdge" );
1996 MESSAGE("GEOM_Superv_i::GetEdge");
1998 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
1999 endService( " GEOM_Superv_i::GetEdge" );
2003 //=============================================================================
2004 // GetEdgeNearPoint:
2005 //=============================================================================
2006 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
2007 GEOM::GEOM_Object_ptr thePoint)
2009 beginService( " GEOM_Superv_i::GetEdgeNearPoint" );
2010 MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
2012 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
2013 endService( " GEOM_Superv_i::GetEdgeNearPoint" );
2017 //=============================================================================
2019 //=============================================================================
2020 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
2021 GEOM::GEOM_Object_ptr thePoint1,
2022 GEOM::GEOM_Object_ptr thePoint2,
2023 GEOM::GEOM_Object_ptr thePoint3,
2024 GEOM::GEOM_Object_ptr thePoint4)
2026 beginService( " GEOM_Superv_i::GetFaceByPoints" );
2027 MESSAGE("GEOM_Superv_i::GetFaceByPoints");
2029 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
2030 endService( " GEOM_Superv_i::GetFaceByPoints" );
2034 //=============================================================================
2036 //=============================================================================
2037 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
2038 GEOM::GEOM_Object_ptr theEdge1,
2039 GEOM::GEOM_Object_ptr theEdge2)
2041 beginService( " GEOM_Superv_i::GetFaceByEdges" );
2042 MESSAGE("GEOM_Superv_i::GetFaceByEdges");
2044 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
2045 endService( " GEOM_Superv_i::GetFaceByEdges" );
2049 //=============================================================================
2051 //=============================================================================
2052 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
2053 GEOM::GEOM_Object_ptr theFace)
2055 beginService( " GEOM_Superv_i::GetOppositeFace" );
2056 MESSAGE("GEOM_Superv_i::GetOppositeFace");
2058 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetOppositeFace(theBlock, theFace);
2059 endService( " GEOM_Superv_i::GetOppositeFace" );
2063 //=============================================================================
2064 // GetFaceNearPoint:
2065 //=============================================================================
2066 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
2067 GEOM::GEOM_Object_ptr thePoint)
2069 beginService( " GEOM_Superv_i::GetFaceNearPoint" );
2070 MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
2072 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceNearPoint(theShape, thePoint);
2073 endService( " GEOM_Superv_i::GetFaceNearPoint" );
2077 //=============================================================================
2078 // GetFaceByNormale:
2079 //=============================================================================
2080 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
2081 GEOM::GEOM_Object_ptr theVector)
2083 beginService( " GEOM_Superv_i::GetFaceByNormale" );
2084 MESSAGE("GEOM_Superv_i::GetFaceByNormale");
2086 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByNormale(theBlock, theVector);
2087 endService( " GEOM_Superv_i::GetFaceByNormale" );
2091 //=============================================================================
2092 // IsCompoundOfBlocks:
2093 //=============================================================================
2094 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2095 CORBA::Long theMinNbFaces,
2096 CORBA::Long theMaxNbFaces,
2097 CORBA::Long& theNbBlocks)
2099 beginService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2100 MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
2102 CORBA::Boolean aRes = myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
2103 endService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2107 //=============================================================================
2108 // CheckCompoundOfBlocks:
2109 //=============================================================================
2110 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks
2111 (GEOM::GEOM_Object_ptr theCompound,
2112 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
2114 beginService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2115 MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
2117 CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
2118 endService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2122 //=============================================================================
2124 //=============================================================================
2125 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
2126 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
2128 beginService( " GEOM_Superv_i::PrintBCErrors" );
2129 MESSAGE("GEOM_Superv_i::PrintBCErrors");
2131 char* anErrors = myBlocksOp->PrintBCErrors(theCompound, theErrors);
2132 endService( " GEOM_Superv_i::PrintBCErrors" );
2136 //=============================================================================
2137 // ExplodeCompoundOfBlocks:
2138 //=============================================================================
2139 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2140 CORBA::Long theMinNbFaces,
2141 CORBA::Long theMaxNbFaces)
2143 beginService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2144 MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
2146 GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
2147 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2148 endService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2149 return aListPtr->_this();
2152 //=============================================================================
2153 // GetBlockNearPoint:
2154 //=============================================================================
2155 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
2156 GEOM::GEOM_Object_ptr thePoint)
2158 beginService( " GEOM_Superv_i::GetBlockNearPoint" );
2159 MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
2161 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
2162 endService( " GEOM_Superv_i::GetBlockNearPoint" );
2166 //=============================================================================
2168 //=============================================================================
2169 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
2170 GEOM::GEOM_List_ptr theParts)
2172 beginService( " GEOM_Superv_i::GetBlockByParts" );
2173 MESSAGE("GEOM_Superv_i::GetBlockByParts");
2174 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2175 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2177 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
2178 endService( " GEOM_Superv_i::GetBlockByParts" );
2181 endService( " GEOM_Superv_i::GetBlockByParts" );
2185 //=============================================================================
2186 // GetBlocksByParts:
2187 //=============================================================================
2188 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
2189 GEOM::GEOM_List_ptr theParts)
2191 beginService( " GEOM_Superv_i::GetBlocksByParts" );
2192 MESSAGE("GEOM_Superv_i::GetBlocksByParts");
2193 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2194 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2197 GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
2198 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2199 endService( " GEOM_Superv_i::GetBlocksByParts" );
2200 return aListPtr->_this();
2202 endService( " GEOM_Superv_i::GetBlocksByParts" );
2206 //=============================================================================
2207 // MakeMultiTransformation1D:
2208 //=============================================================================
2209 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
2210 CORBA::Long theDirFace1,
2211 CORBA::Long theDirFace2,
2212 CORBA::Long theNbTimes)
2214 beginService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2215 MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
2217 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
2218 endService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2222 //=============================================================================
2223 // MakeMultiTransformation2D:
2224 //=============================================================================
2225 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D
2226 (GEOM::GEOM_Object_ptr theBlock,
2227 CORBA::Long theDirFace1U,
2228 CORBA::Long theDirFace2U,
2229 CORBA::Long theNbTimesU,
2230 CORBA::Long theDirFace1V,
2231 CORBA::Long theDirFace2V,
2232 CORBA::Long theNbTimesV)
2234 beginService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2235 MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
2237 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation2D(theBlock,
2238 theDirFace1U, theDirFace2U, theNbTimesU,
2239 theDirFace1V, theDirFace2V, theNbTimesV);
2240 endService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2244 //=============================== CurvesOperations ============================
2245 //=============================================================================
2246 // MakeCirclePntVecR:
2247 //=============================================================================
2248 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
2249 GEOM::GEOM_Object_ptr theVector,
2252 beginService( " GEOM_Superv_i::MakeCirclePntVecR" );
2253 MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
2255 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
2256 endService( " GEOM_Superv_i::MakeCirclePntVecR" );
2260 //=============================================================================
2261 // MakeCircleThreePnt:
2262 //=============================================================================
2263 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
2264 GEOM::GEOM_Object_ptr thePnt2,
2265 GEOM::GEOM_Object_ptr thePnt3)
2267 beginService( " GEOM_Superv_i::MakeCircleThreePnt" );
2268 MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
2270 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
2271 endService( " GEOM_Superv_i::MakeCircleThreePnt" );
2274 //=============================================================================
2275 // MakeCircleCenter2Pnt:
2276 //=============================================================================
2277 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
2278 GEOM::GEOM_Object_ptr thePnt2,
2279 GEOM::GEOM_Object_ptr thePnt3)
2281 beginService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2282 MESSAGE("GEOM_Superv_i::MakeCircleCenter2Pnt");
2284 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3);
2285 endService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2289 //=============================================================================
2291 //=============================================================================
2292 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
2293 GEOM::GEOM_Object_ptr theVector,
2294 CORBA::Double theRMajor,
2295 CORBA::Double theRMinor)
2297 beginService( " GEOM_Superv_i::MakeEllipse" );
2298 MESSAGE("GEOM_Superv_i::MakeEllipse");
2300 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
2301 endService( " GEOM_Superv_i::MakeEllipse" );
2305 //=============================================================================
2307 //=============================================================================
2308 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
2309 GEOM::GEOM_Object_ptr thePnt2,
2310 GEOM::GEOM_Object_ptr thePnt3)
2312 beginService( " GEOM_Superv_i::MakeArc" );
2313 MESSAGE("GEOM_Superv_i::MakeArc");
2315 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
2316 endService( " GEOM_Superv_i::MakeArc" );
2320 //=============================================================================
2322 //=============================================================================
2323 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
2324 GEOM::GEOM_Object_ptr thePnt1,
2325 GEOM::GEOM_Object_ptr thePnt2,
2326 CORBA::Boolean theSense)
2328 beginService( " GEOM_Superv_i::MakeArcCenter" );
2329 MESSAGE("GEOM_Superv_i::MakeArcCenter");
2331 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArcCenter(theCenter, thePnt1, thePnt2,theSense);
2332 endService( " GEOM_Superv_i::MakeArcCenter" );
2336 //=============================================================================
2338 //=============================================================================
2339 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints)
2341 beginService( " GEOM_Superv_i::MakePolyline" );
2342 MESSAGE("GEOM_Superv_i::MakePolyline");
2343 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2344 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2346 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakePolyline(aListImplP->GetList());
2347 endService( " GEOM_Superv_i::MakePolyline" );
2350 endService( " GEOM_Superv_i::MakePolyline" );
2354 //=============================================================================
2355 // MakeSplineBezier:
2356 //=============================================================================
2357 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints)
2359 beginService( " GEOM_Superv_i::MakeSplineBezier" );
2360 MESSAGE("GEOM_Superv_i::MakeSplineBezier");
2361 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2362 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2364 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineBezier(aListImplP->GetList());
2365 endService( " GEOM_Superv_i::MakeSplineBezier" );
2368 endService( " GEOM_Superv_i::MakeSplineBezier" );
2372 //=============================================================================
2373 // MakeSplineInterpolation:
2374 //=============================================================================
2375 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints)
2377 beginService( " GEOM_Superv_i::MakeSplineInterpolation" );
2378 MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
2379 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2380 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2382 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
2383 endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2386 endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2390 //=============================================================================
2392 //=============================================================================
2393 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand,
2394 GEOM::GEOM_List_ptr theWorkingPlane)
2396 beginService( " GEOM_Superv_i::MakeSketcher" );
2397 MESSAGE("GEOM_Superv_i::MakeSketcher");
2398 if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP =
2399 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
2401 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
2402 endService( " GEOM_Superv_i::MakeSketcher" );
2405 endService( " GEOM_Superv_i::MakeSketcher" );
2409 //=============================== LocalOperations =============================
2410 //=============================================================================
2412 //=============================================================================
2413 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
2416 beginService( " GEOM_Superv_i::MakeFilletAll" );
2417 MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
2419 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletAll(theShape, theR);
2420 endService( " GEOM_Superv_i::MakeFilletAll" );
2424 //=============================================================================
2426 //=============================================================================
2427 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape,
2429 GEOM::GEOM_List_ptr theEdges)
2431 beginService( " GEOM_Superv_i::MakeFilletEdges" );
2432 MESSAGE("GEOM_Superv_i::MakeFilletEdges");
2433 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
2434 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2436 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
2437 endService( " GEOM_Superv_i::MakeFilletEdges" );
2440 endService( " GEOM_Superv_i::MakeFilletEdges" );
2444 //=============================================================================
2445 // MakeFilletEdges R1 R2:
2446 //=============================================================================
2447 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape,
2448 CORBA::Double theR1,
2449 CORBA::Double theR2,
2450 GEOM::GEOM_List_ptr theEdges)
2452 beginService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2453 MESSAGE("GEOM_Superv_i::MakeFilletEdgesR1R2");
2454 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
2455 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2457 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdgesR1R2(theShape, theR1,
2458 theR2, aListImplE->GetList());
2459 endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2462 endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2466 //=============================================================================
2468 //=============================================================================
2469 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape,
2471 GEOM::GEOM_List_ptr theFaces)
2473 beginService( " GEOM_Superv_i::MakeFilletFaces" );
2474 MESSAGE("GEOM_Superv_i::MakeFilletFaces");
2475 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2476 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2478 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
2479 endService( " GEOM_Superv_i::MakeFilletFaces" );
2482 endService( " GEOM_Superv_i::MakeFilletFaces" );
2486 //=============================================================================
2487 // MakeFilletFaces R1 R2:
2488 //=============================================================================
2489 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape,
2490 CORBA::Double theR1,
2491 CORBA::Double theR2,
2492 GEOM::GEOM_List_ptr theFaces)
2494 beginService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2495 MESSAGE("GEOM_Superv_i::MakeFilletFacesR1R2");
2496 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2497 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2499 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFacesR1R2(theShape, theR1, theR2,
2500 aListImplF->GetList());
2501 endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2504 endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2508 //=============================================================================
2510 //=============================================================================
2511 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
2513 beginService( " GEOM_Superv_i::MakeChamferAll" );
2514 MESSAGE("GEOM_Superv_i::MakeChamferAll");
2516 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferAll(theShape, theD);
2517 endService( " GEOM_Superv_i::MakeChamferAll" );
2521 //=============================================================================
2523 //=============================================================================
2524 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
2525 CORBA::Double theD1, CORBA::Double theD2,
2526 CORBA::Long theFace1, CORBA::Long theFace2)
2528 beginService( " GEOM_Superv_i::MakeChamferEdge" );
2529 MESSAGE("GEOM_Superv_i::MakeChamferEdge");
2531 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
2532 endService( " GEOM_Superv_i::MakeChamferEdge" );
2536 //=============================================================================
2537 // MakeChamferEdgeAD:
2538 //=============================================================================
2539 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
2540 CORBA::Double theD, CORBA::Double theAngle,
2541 CORBA::Long theFace1, CORBA::Long theFace2)
2543 beginService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2544 MESSAGE("GEOM_Superv_i::MakeChamferEdgeAD");
2546 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2);
2547 endService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2551 //=============================================================================
2552 // MakeChamferFaces:
2553 //=============================================================================
2554 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
2555 CORBA::Double theD1, CORBA::Double theD2,
2556 GEOM::GEOM_List_ptr theFaces)
2558 beginService( " GEOM_Superv_i::MakeChamferFaces" );
2559 MESSAGE("GEOM_Superv_i::MakeChamferFaces");
2560 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2561 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2563 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
2564 endService( " GEOM_Superv_i::MakeChamferFaces" );
2567 endService( " GEOM_Superv_i::MakeChamferFaces" );
2571 //=============================================================================
2572 // MakeChamferFacesAD:
2573 //=============================================================================
2574 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
2575 CORBA::Double theD, CORBA::Double theAngle,
2576 GEOM::GEOM_List_ptr theFaces)
2578 beginService( " GEOM_Superv_i::MakeChamferFacesAD" );
2579 MESSAGE("GEOM_Superv_i::MakeChamferFacesAD");
2580 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2581 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2583 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFacesAD(theShape, theD, theAngle, aListImplF->GetList());
2584 endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2587 endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2591 //=============================================================================
2592 // MakeChamferEdges:
2593 //=============================================================================
2594 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
2595 CORBA::Double theD1, CORBA::Double theD2,
2596 GEOM::GEOM_List_ptr theEdges)
2598 beginService( " GEOM_Superv_i::MakeChamferEdges" );
2599 MESSAGE("GEOM_Superv_i::MakeChamferEdges");
2600 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2601 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2603 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdges(theShape, theD1, theD2, aListImplF->GetList());
2604 endService( " GEOM_Superv_i::MakeChamferEdges" );
2607 endService( " GEOM_Superv_i::MakeChamferEdges" );
2611 //=============================================================================
2612 // MakeChamferEdgesAD:
2613 //=============================================================================
2614 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
2615 CORBA::Double theD, CORBA::Double theAngle,
2616 GEOM::GEOM_List_ptr theEdges)
2618 beginService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2619 MESSAGE("GEOM_Superv_i::MakeChamferEdgesAD");
2620 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2621 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2623 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgesAD(theShape, theD, theAngle, aListImplF->GetList());
2624 endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2627 endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2631 //=============================================================================
2633 //=============================================================================
2634 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
2635 CORBA::Double theWeight,
2636 CORBA::Double theWaterDensity,
2637 CORBA::Double theMeshingDeflection)
2639 beginService( " GEOM_Superv_i::MakeArchimede" );
2640 MESSAGE("GEOM_Superv_i::MakeArchimede");
2642 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
2643 endService( " GEOM_Superv_i::MakeArchimede" );
2647 //=============================================================================
2648 // GetSubShapeIndexMakeFilletAll:
2649 //=============================================================================
2650 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
2651 GEOM::GEOM_Object_ptr theSubShape)
2653 beginService( " GEOM_Superv_i::GetSubShapeIndex" );
2654 MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
2656 CORBA::Long aRes = myLocalOp->GetSubShapeIndex(theShape, theSubShape);
2657 endService( " GEOM_Superv_i::GetSubShapeIndex" );
2661 //=============================== GroupOperations =============================
2662 //=============================================================================
2664 //=============================================================================
2665 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
2666 CORBA::Long theShapeType)
2668 beginService( " GEOM_Superv_i::CreateGroup" );
2669 MESSAGE("GEOM_Superv_i::CreateGroup");
2671 GEOM::GEOM_Object_ptr anObj = myGroupOp->CreateGroup(theMainShape, theShapeType);
2672 endService( " GEOM_Superv_i::CreateGroup" );
2676 //=============================================================================
2678 //=============================================================================
2679 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup,
2680 CORBA::Long theSubShapeId)
2682 beginService( " GEOM_Superv_i::AddObject" );
2683 MESSAGE("GEOM_Superv_i::AddObject");
2685 myGroupOp->AddObject(theGroup, theSubShapeId);
2686 endService( " GEOM_Superv_i::AddObject" );
2689 //=============================================================================
2691 //=============================================================================
2692 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup,
2693 CORBA::Long theSubShapeId)
2695 beginService( " GEOM_Superv_i::RemoveObject" );
2696 MESSAGE("GEOM_Superv_i::RemoveObject");
2698 myGroupOp->RemoveObject(theGroup, theSubShapeId);
2699 endService( " GEOM_Superv_i::RemoveObject" );
2702 //=============================================================================
2704 //=============================================================================
2705 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
2707 beginService( " GEOM_Superv_i::GetType" );
2708 MESSAGE("GEOM_Superv_i::GetType");
2710 CORBA::Long aResult = myGroupOp->GetType(theGroup);
2711 endService( " GEOM_Superv_i::GetType" );
2715 //=============================================================================
2717 //=============================================================================
2718 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
2720 beginService( " GEOM_Superv_i::GetMainShape" );
2721 MESSAGE("GEOM_Superv_i::GetMainShape");
2723 GEOM::GEOM_Object_ptr anObj = myGroupOp->GetMainShape(theGroup);
2724 endService( " GEOM_Superv_i::GetMainShape" );
2728 //=============================================================================
2730 //=============================================================================
2731 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
2733 beginService( " GEOM_Superv_i::GetObjects" );
2734 MESSAGE("GEOM_Superv_i::GetObjects");
2737 GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
2738 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
2739 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2740 endService( " GEOM_Superv_i::GetObjects" );
2741 return aListPtr->_this();
2744 //=====================================================================================
2746 //=====================================================================================
2749 PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
2750 PortableServer::POA_ptr poa,
2751 PortableServer::ObjectId * contId,
2752 const char *instanceName,
2753 const char * interfaceName)
2755 GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
2756 //Don't understand the reason why this component is registered ???
2757 // myGEOM_Superv_i->register_name("/myGEOM_Superv");
2758 return myGEOM_Superv_i->getId() ;