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) )
100 // get GEOM_Gen engine
101 Engines::Container_var cont=GetContainerRef();
102 CORBA::String_var container_name=cont->name();
103 std::string shortName=container_name.in();
104 shortName=shortName.substr(12); // substract "/Containers/"
105 SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
106 Engines::Component_var comp = lcc->FindOrLoad_Component( shortName.c_str(), "GEOM" );
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 // TranslateVectorDistance:
1352 //=============================================================================
1353 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
1354 GEOM::GEOM_Object_ptr theVector,
1355 CORBA::Double theDistance,
1356 CORBA::Boolean theCopy)
1358 beginService( " GEOM_Superv_i::TranslateVectorDistance" );
1359 MESSAGE("GEOM_Superv_i::TranslateVectorDistance");
1361 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorDistance(theObject,
1362 theVector, theDistance, theCopy);
1363 endService( " GEOM_Superv_i::TranslateVectorDistance" );
1367 //=============================================================================
1368 // MultiTranslate1D:
1369 //=============================================================================
1370 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
1371 GEOM::GEOM_Object_ptr theVector,
1372 CORBA::Double theStep,
1373 CORBA::Long theNbTimes)
1375 beginService( " GEOM_Superv_i::MultiTranslate1D" );
1376 MESSAGE("GEOM_Superv_i::MultiTranslate1D");
1378 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
1379 endService( " GEOM_Superv_i::MultiTranslate1D" );
1383 //=============================================================================
1384 // MultiTranslate2D:
1385 //=============================================================================
1386 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
1387 GEOM::GEOM_Object_ptr theVector1,
1388 CORBA::Double theStep1,
1389 CORBA::Long theNbTimes1,
1390 GEOM::GEOM_Object_ptr theVector2,
1391 CORBA::Double theStep2,
1392 CORBA::Long theNbTimes2)
1394 beginService( " GEOM_Superv_i::MultiTranslate2D" );
1395 MESSAGE("GEOM_Superv_i::MultiTranslate2D");
1397 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
1398 theVector2, theStep2, theNbTimes2);
1399 endService( " GEOM_Superv_i::MultiTranslate2D" );
1403 //=============================================================================
1405 //=============================================================================
1406 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
1407 GEOM::GEOM_Object_ptr theAxis,
1408 CORBA::Double theAngle)
1410 beginService( " GEOM_Superv_i::Rotate" );
1411 MESSAGE("GEOM_Superv_i::Rotate");
1413 GEOM::GEOM_Object_ptr anObj = myTransfOp->Rotate(theObject, theAxis, theAngle);
1414 endService( " GEOM_Superv_i::Rotate" );
1418 //=============================================================================
1420 //=============================================================================
1421 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
1422 GEOM::GEOM_Object_ptr theAxis,
1423 CORBA::Double theAngle)
1425 beginService( " GEOM_Superv_i::RotateCopy" );
1426 MESSAGE("GEOM_Superv_i::RotateCopy");
1428 GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateCopy(theObject, theAxis, theAngle);
1429 endService( " GEOM_Superv_i::RotateCopy" );
1432 //=============================================================================
1433 // RotateThreePoints:
1434 //=============================================================================
1435 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
1436 GEOM::GEOM_Object_ptr theCentPoint,
1437 GEOM::GEOM_Object_ptr thePoint1,
1438 GEOM::GEOM_Object_ptr thePoint2)
1440 beginService( " GEOM_Superv_i::RotateThreePoints" );
1441 MESSAGE("GEOM_Superv_i::RotateThreePoints");
1443 GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2);
1444 endService( " GEOM_Superv_i::RotateThreePoints" );
1448 //=============================================================================
1449 // RotateThreePointsCopy:
1450 //=============================================================================
1451 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
1452 GEOM::GEOM_Object_ptr theCentPoint,
1453 GEOM::GEOM_Object_ptr thePoint1,
1454 GEOM::GEOM_Object_ptr thePoint2)
1456 beginService( " GEOM_Superv_i::RotateThreePointsCopy" );
1457 MESSAGE("GEOM_Superv_i::RotateThreePointsCopy");
1459 GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2);
1460 endService( " GEOM_Superv_i::RotateThreePointsCopy" );
1464 //=============================================================================
1466 //=============================================================================
1467 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1468 GEOM::GEOM_Object_ptr theAxis,
1469 CORBA::Long theNbTimes)
1471 beginService( " GEOM_Superv_i::MultiRotate1D" );
1472 MESSAGE("GEOM_Superv_i::MultiRotate1D");
1474 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
1475 endService( " GEOM_Superv_i::MultiRotate1D" );
1479 //=============================================================================
1481 //=============================================================================
1482 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1483 GEOM::GEOM_Object_ptr theAxis,
1484 CORBA::Double theAngle,
1485 CORBA::Long theNbTimes1,
1486 CORBA::Double theStep,
1487 CORBA::Long theNbTimes2)
1489 beginService( " GEOM_Superv_i::MultiRotate2D" );
1490 MESSAGE("GEOM_Superv_i::MultiRotate2D");
1492 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
1493 endService( " GEOM_Superv_i::MultiRotate2D" );
1497 //=============================================================================
1499 //=============================================================================
1500 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject,
1501 GEOM::GEOM_Object_ptr thePlane)
1503 beginService( " GEOM_Superv_i::MirrorPlane" );
1504 MESSAGE("GEOM_Superv_i::MirrorPlane");
1506 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlane(theObject, thePlane);
1507 endService( " GEOM_Superv_i::MirrorPlane" );
1511 //=============================================================================
1513 //=============================================================================
1514 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
1515 GEOM::GEOM_Object_ptr thePlane)
1517 beginService( " GEOM_Superv_i::MirrorPlaneCopy" );
1518 MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
1520 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlaneCopy(theObject, thePlane);
1521 endService( " GEOM_Superv_i::MirrorPlaneCopy" );
1525 //=============================================================================
1527 //=============================================================================
1528 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject,
1529 GEOM::GEOM_Object_ptr theAxis)
1531 beginService( " GEOM_Superv_i::MirrorAxis" );
1532 MESSAGE("GEOM_Superv_i::MirrorAxis");
1534 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxis(theObject, theAxis);
1535 endService( " GEOM_Superv_i::MirrorAxis" );
1539 //=============================================================================
1541 //=============================================================================
1542 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
1543 GEOM::GEOM_Object_ptr theAxis)
1545 beginService( " GEOM_Superv_i::MirrorAxisCopy" );
1546 MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
1548 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxisCopy(theObject, theAxis);
1549 endService( " GEOM_Superv_i::MirrorAxisCopy" );
1553 //=============================================================================
1555 //=============================================================================
1556 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject,
1557 GEOM::GEOM_Object_ptr thePoint)
1559 beginService( " GEOM_Superv_i::MirrorPoint" );
1560 MESSAGE("GEOM_Superv_i::MirrorPoint");
1562 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPoint(theObject, thePoint);
1563 endService( " GEOM_Superv_i::MirrorPoint" );
1567 //=============================================================================
1569 //=============================================================================
1570 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
1571 GEOM::GEOM_Object_ptr thePoint)
1573 beginService( " GEOM_Superv_i::MirrorPoint" );
1574 MESSAGE("GEOM_Superv_i::MirrorPointCopy");
1576 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPointCopy(theObject, thePoint);
1577 endService( " GEOM_Superv_i::MirrorPoint" );
1581 //=============================================================================
1583 //=============================================================================
1584 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject,
1585 CORBA::Double theOffset)
1587 beginService( " GEOM_Superv_i::OffsetShape" );
1588 MESSAGE("GEOM_Superv_i::OffsetShape");
1590 GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset);
1591 endService( " GEOM_Superv_i::OffsetShape" );
1595 //=============================================================================
1597 //=============================================================================
1598 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
1599 CORBA::Double theOffset)
1601 beginService( " GEOM_Superv_i::OffsetShapeCopy" );
1602 MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1604 GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset);
1605 endService( " GEOM_Superv_i::OffsetShapeCopy" );
1609 //=============================================================================
1611 //=============================================================================
1612 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject,
1613 GEOM::GEOM_Object_ptr thePoint,
1614 CORBA::Double theFactor)
1616 beginService( " GEOM_Superv_i::ScaleShape" );
1617 MESSAGE("GEOM_Superv_i::ScaleShape");
1619 GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShape(theObject, thePoint, theFactor);
1620 endService( " GEOM_Superv_i::ScaleShape" );
1624 //=============================================================================
1626 //=============================================================================
1627 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
1628 GEOM::GEOM_Object_ptr thePoint,
1629 CORBA::Double theFactor)
1631 beginService( " GEOM_Superv_i::ScaleShapeCopy" );
1632 MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
1634 GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
1635 endService( " GEOM_Superv_i::ScaleShapeCopy" );
1639 //=============================================================================
1641 //=============================================================================
1642 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
1643 GEOM::GEOM_Object_ptr theStartLCS,
1644 GEOM::GEOM_Object_ptr theEndLCS)
1646 beginService( " GEOM_Superv_i::PositionShape" );
1647 MESSAGE("GEOM_Superv_i::PositionShape");
1649 GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
1650 endService( " GEOM_Superv_i::PositionShape" );
1654 //=============================================================================
1655 // PositionShapeCopy:
1656 //=============================================================================
1657 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
1658 GEOM::GEOM_Object_ptr theStartLCS,
1659 GEOM::GEOM_Object_ptr theEndLCS)
1661 beginService( " GEOM_Superv_i::PositionShapeCopy" );
1662 MESSAGE("GEOM_Superv_i::PositionShapeCopy");
1664 GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
1665 endService( " GEOM_Superv_i::PositionShapeCopy" );
1669 //=============================== ShapesOperations ============================
1670 //=============================================================================
1672 //=============================================================================
1673 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
1674 GEOM::GEOM_Object_ptr thePnt2)
1676 beginService( " GEOM_Superv_i::MakeEdge" );
1677 MESSAGE("GEOM_Superv_i::MakeEdge");
1679 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeEdge(thePnt1, thePnt2);
1680 endService( " GEOM_Superv_i::MakeEdge" );
1684 //=============================================================================
1686 //=============================================================================
1687 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires)
1689 beginService( " GEOM_Superv_i::MakeWire" );
1690 MESSAGE("GEOM_Superv_i::MakeWire");
1691 if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW =
1692 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
1694 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeWire(aListImplEW->GetList());
1695 endService( " GEOM_Superv_i::MakeWire" );
1698 endService( " GEOM_Superv_i::MakeWire" );
1702 //=============================================================================
1704 //=============================================================================
1705 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
1706 CORBA::Boolean isPlanarWanted)
1708 beginService( " GEOM_Superv_i::MakeFace" );
1709 MESSAGE("GEOM_Superv_i::MakeFace");
1711 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFace(theWire, isPlanarWanted);
1712 endService( " GEOM_Superv_i::MakeFace" );
1716 //=============================================================================
1718 //=============================================================================
1719 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires,
1720 CORBA::Boolean isPlanarWanted)
1722 beginService( " GEOM_Superv_i::MakeFaceWires" );
1723 MESSAGE("GEOM_Superv_i::MakeFaceWires");
1724 if (GEOM_List_i<GEOM::ListOfGO>* aListImplW =
1725 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
1727 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
1728 endService( " GEOM_Superv_i::MakeFaceWires" );
1731 endService( " GEOM_Superv_i::MakeFaceWires" );
1735 //=============================================================================
1737 //=============================================================================
1738 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells)
1740 beginService( " GEOM_Superv_i::MakeShell" );
1741 MESSAGE("GEOM_Superv_i::MakeShell");
1742 if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS =
1743 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
1745 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeShell(aListImplFS->GetList());
1746 endService( " GEOM_Superv_i::MakeShell" );
1749 endService( " GEOM_Superv_i::MakeShell" );
1753 //=============================================================================
1755 //=============================================================================
1756 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
1758 beginService( " GEOM_Superv_i::MakeSolidShell" );
1759 MESSAGE("GEOM_Superv_i::MakeSolidShell");
1761 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShell(theShell);
1762 endService( " GEOM_Superv_i::MakeSolidShell" );
1766 //=============================================================================
1768 //=============================================================================
1769 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells)
1771 beginService( " GEOM_Superv_i::MakeSolidShells" );
1772 MESSAGE("GEOM_Superv_i::MakeSolidShells");
1773 if (GEOM_List_i<GEOM::ListOfGO>* aListImplS =
1774 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
1776 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShells(aListImplS->GetList());
1777 endService( " GEOM_Superv_i::MakeSolidShells" );
1780 endService( " GEOM_Superv_i::MakeSolidShells" );
1784 //=============================================================================
1786 //=============================================================================
1787 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes)
1789 beginService( " GEOM_Superv_i::MakeCompound" );
1790 MESSAGE("GEOM_Superv_i::MakeCompound");
1791 if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
1792 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
1794 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeCompound(aListImpl->GetList());
1795 endService( " GEOM_Superv_i::MakeCompound" );
1798 endService( " GEOM_Superv_i::MakeCompound" );
1802 //=============================================================================
1804 //=============================================================================
1805 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
1806 CORBA::Double theTolerance,
1807 CORBA::Boolean doKeepNonSolids)
1809 beginService( " GEOM_Superv_i::MakeGlueFaces" );
1810 MESSAGE("GEOM_Superv_i::MakeGlueFaces");
1812 GEOM::GEOM_Object_ptr anObj =
1813 myShapesOp->MakeGlueFaces(theShape, theTolerance, doKeepNonSolids);
1814 endService( " GEOM_Superv_i::MakeGlueFaces" );
1818 //=============================================================================
1820 //=============================================================================
1821 GEOM::GEOM_List_ptr GEOM_Superv_i::GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
1822 CORBA::Double theTolerance)
1824 beginService( " GEOM_Superv_i::GetGlueFaces" );
1825 MESSAGE("GEOM_Superv_i::GetGlueFaces");
1827 GEOM::ListOfGO* aList = myShapesOp->GetGlueFaces(theShape, theTolerance);
1828 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1829 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1830 endService( " GEOM_Superv_i::GetGlueFaces" );
1831 return aListPtr->_this();
1834 //=============================================================================
1835 // MakeGlueFacesByList:
1836 //=============================================================================
1837 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
1838 CORBA::Double theTolerance,
1839 const GEOM::ListOfGO& theFaces,
1840 CORBA::Boolean doKeepNonSolids)
1842 beginService( " GEOM_Superv_i::MakeGlueFacesByList" );
1843 MESSAGE("GEOM_Superv_i::MakeGlueFacesByList");
1845 GEOM::GEOM_Object_ptr anObj =
1846 myShapesOp->MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids);
1847 endService( " GEOM_Superv_i::MakeGlueFacesByList" );
1851 //=============================================================================
1853 //=============================================================================
1854 GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
1855 CORBA::Long theShapeType,
1856 CORBA::Boolean isSorted)
1858 beginService( " GEOM_Superv_i::MakeExplode" );
1859 MESSAGE("GEOM_Superv_i::MakeExplode");
1862 GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
1863 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1864 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1865 endService( " GEOM_Superv_i::MakeExplode" );
1866 return aListPtr->_this();
1869 //=============================================================================
1871 //=============================================================================
1872 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
1874 beginService( " GEOM_Superv_i::NumberOfFaces" );
1875 MESSAGE("GEOM_Superv_i::NumberOfFaces");
1877 CORBA::Long aRes = myShapesOp->NumberOfFaces(theShape);
1878 endService( " GEOM_Superv_i::NumberOfFaces" );
1882 //=============================================================================
1884 //=============================================================================
1885 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
1887 beginService( " GEOM_Superv_i::NumberOfEdges" );
1888 MESSAGE("GEOM_Superv_i::NumberOfEdges");
1890 CORBA::Long aRes = myShapesOp->NumberOfEdges(theShape);
1891 endService( " GEOM_Superv_i::NumberOfEdges" );
1895 //=============================================================================
1896 // ChangeOrientation:
1897 //=============================================================================
1898 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
1900 beginService( " GEOM_Superv_i::ChangeOrientation" );
1901 MESSAGE("GEOM_Superv_i::ChangeOrientation");
1903 GEOM::GEOM_Object_ptr anObj = myShapesOp->ChangeOrientation(theShape);
1904 endService( " GEOM_Superv_i::ChangeOrientation" );
1909 //=============================== BlocksOperations ============================
1910 //=============================================================================
1911 // MakeQuad4Vertices:
1912 //=============================================================================
1913 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
1914 GEOM::GEOM_Object_ptr thePnt2,
1915 GEOM::GEOM_Object_ptr thePnt3,
1916 GEOM::GEOM_Object_ptr thePnt4)
1918 beginService( " GEOM_Superv_i::MakeQuad4Vertices" );
1919 MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
1921 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
1922 endService( " GEOM_Superv_i::MakeQuad4Vertices" );
1926 //=============================================================================
1928 //=============================================================================
1929 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
1930 GEOM::GEOM_Object_ptr theEdge2,
1931 GEOM::GEOM_Object_ptr theEdge3,
1932 GEOM::GEOM_Object_ptr theEdge4)
1934 beginService( " GEOM_Superv_i::MakeQuad" );
1935 MESSAGE("GEOM_Superv_i::MakeQuad");
1937 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
1938 endService( " GEOM_Superv_i::MakeQuad" );
1942 //=============================================================================
1944 //=============================================================================
1945 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
1946 GEOM::GEOM_Object_ptr theEdge2)
1948 beginService( " GEOM_Superv_i::MakeQuad2Edges" );
1949 MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
1951 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
1952 endService( " GEOM_Superv_i::MakeQuad2Edges" );
1956 //=============================================================================
1958 //=============================================================================
1959 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
1960 GEOM::GEOM_Object_ptr theFace2,
1961 GEOM::GEOM_Object_ptr theFace3,
1962 GEOM::GEOM_Object_ptr theFace4,
1963 GEOM::GEOM_Object_ptr theFace5,
1964 GEOM::GEOM_Object_ptr theFace6)
1966 beginService( " GEOM_Superv_i::MakeHexa" );
1967 MESSAGE("GEOM_Superv_i::MakeHexa");
1969 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
1970 endService( " GEOM_Superv_i::MakeHexa" );
1974 //=============================================================================
1976 //=============================================================================
1977 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
1978 GEOM::GEOM_Object_ptr theFace2)
1980 beginService( " GEOM_Superv_i::MakeHexa2Faces" );
1981 MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
1983 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
1984 endService( " GEOM_Superv_i::MakeHexa2Faces" );
1988 //=============================================================================
1990 //=============================================================================
1991 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
1995 CORBA::Double theEpsilon)
1997 beginService( " GEOM_Superv_i::GetPoint" );
1998 MESSAGE("GEOM_Superv_i::GetPoint");
2000 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
2001 endService( " GEOM_Superv_i::GetPoint" );
2005 //=============================================================================
2007 //=============================================================================
2008 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
2009 GEOM::GEOM_Object_ptr thePoint1,
2010 GEOM::GEOM_Object_ptr thePoint2)
2012 beginService( " GEOM_Superv_i::GetEdge" );
2013 MESSAGE("GEOM_Superv_i::GetEdge");
2015 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
2016 endService( " GEOM_Superv_i::GetEdge" );
2020 //=============================================================================
2021 // GetEdgeNearPoint:
2022 //=============================================================================
2023 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
2024 GEOM::GEOM_Object_ptr thePoint)
2026 beginService( " GEOM_Superv_i::GetEdgeNearPoint" );
2027 MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
2029 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
2030 endService( " GEOM_Superv_i::GetEdgeNearPoint" );
2034 //=============================================================================
2036 //=============================================================================
2037 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
2038 GEOM::GEOM_Object_ptr thePoint1,
2039 GEOM::GEOM_Object_ptr thePoint2,
2040 GEOM::GEOM_Object_ptr thePoint3,
2041 GEOM::GEOM_Object_ptr thePoint4)
2043 beginService( " GEOM_Superv_i::GetFaceByPoints" );
2044 MESSAGE("GEOM_Superv_i::GetFaceByPoints");
2046 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
2047 endService( " GEOM_Superv_i::GetFaceByPoints" );
2051 //=============================================================================
2053 //=============================================================================
2054 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
2055 GEOM::GEOM_Object_ptr theEdge1,
2056 GEOM::GEOM_Object_ptr theEdge2)
2058 beginService( " GEOM_Superv_i::GetFaceByEdges" );
2059 MESSAGE("GEOM_Superv_i::GetFaceByEdges");
2061 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
2062 endService( " GEOM_Superv_i::GetFaceByEdges" );
2066 //=============================================================================
2068 //=============================================================================
2069 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
2070 GEOM::GEOM_Object_ptr theFace)
2072 beginService( " GEOM_Superv_i::GetOppositeFace" );
2073 MESSAGE("GEOM_Superv_i::GetOppositeFace");
2075 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetOppositeFace(theBlock, theFace);
2076 endService( " GEOM_Superv_i::GetOppositeFace" );
2080 //=============================================================================
2081 // GetFaceNearPoint:
2082 //=============================================================================
2083 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
2084 GEOM::GEOM_Object_ptr thePoint)
2086 beginService( " GEOM_Superv_i::GetFaceNearPoint" );
2087 MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
2089 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceNearPoint(theShape, thePoint);
2090 endService( " GEOM_Superv_i::GetFaceNearPoint" );
2094 //=============================================================================
2095 // GetFaceByNormale:
2096 //=============================================================================
2097 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
2098 GEOM::GEOM_Object_ptr theVector)
2100 beginService( " GEOM_Superv_i::GetFaceByNormale" );
2101 MESSAGE("GEOM_Superv_i::GetFaceByNormale");
2103 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByNormale(theBlock, theVector);
2104 endService( " GEOM_Superv_i::GetFaceByNormale" );
2108 //=============================================================================
2109 // IsCompoundOfBlocks:
2110 //=============================================================================
2111 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2112 CORBA::Long theMinNbFaces,
2113 CORBA::Long theMaxNbFaces,
2114 CORBA::Long& theNbBlocks)
2116 beginService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2117 MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
2119 CORBA::Boolean aRes = myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
2120 endService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2124 //=============================================================================
2125 // CheckCompoundOfBlocks:
2126 //=============================================================================
2127 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks
2128 (GEOM::GEOM_Object_ptr theCompound,
2129 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
2131 beginService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2132 MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
2134 CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
2135 endService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2139 //=============================================================================
2141 //=============================================================================
2142 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
2143 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
2145 beginService( " GEOM_Superv_i::PrintBCErrors" );
2146 MESSAGE("GEOM_Superv_i::PrintBCErrors");
2148 char* anErrors = myBlocksOp->PrintBCErrors(theCompound, theErrors);
2149 endService( " GEOM_Superv_i::PrintBCErrors" );
2153 //=============================================================================
2154 // ExplodeCompoundOfBlocks:
2155 //=============================================================================
2156 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2157 CORBA::Long theMinNbFaces,
2158 CORBA::Long theMaxNbFaces)
2160 beginService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2161 MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
2163 GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
2164 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2165 endService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2166 return aListPtr->_this();
2169 //=============================================================================
2170 // GetBlockNearPoint:
2171 //=============================================================================
2172 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
2173 GEOM::GEOM_Object_ptr thePoint)
2175 beginService( " GEOM_Superv_i::GetBlockNearPoint" );
2176 MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
2178 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
2179 endService( " GEOM_Superv_i::GetBlockNearPoint" );
2183 //=============================================================================
2185 //=============================================================================
2186 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
2187 GEOM::GEOM_List_ptr theParts)
2189 beginService( " GEOM_Superv_i::GetBlockByParts" );
2190 MESSAGE("GEOM_Superv_i::GetBlockByParts");
2191 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2192 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2194 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
2195 endService( " GEOM_Superv_i::GetBlockByParts" );
2198 endService( " GEOM_Superv_i::GetBlockByParts" );
2202 //=============================================================================
2203 // GetBlocksByParts:
2204 //=============================================================================
2205 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
2206 GEOM::GEOM_List_ptr theParts)
2208 beginService( " GEOM_Superv_i::GetBlocksByParts" );
2209 MESSAGE("GEOM_Superv_i::GetBlocksByParts");
2210 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2211 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2214 GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
2215 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2216 endService( " GEOM_Superv_i::GetBlocksByParts" );
2217 return aListPtr->_this();
2219 endService( " GEOM_Superv_i::GetBlocksByParts" );
2223 //=============================================================================
2224 // MakeMultiTransformation1D:
2225 //=============================================================================
2226 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
2227 CORBA::Long theDirFace1,
2228 CORBA::Long theDirFace2,
2229 CORBA::Long theNbTimes)
2231 beginService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2232 MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
2234 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
2235 endService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2239 //=============================================================================
2240 // MakeMultiTransformation2D:
2241 //=============================================================================
2242 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D
2243 (GEOM::GEOM_Object_ptr theBlock,
2244 CORBA::Long theDirFace1U,
2245 CORBA::Long theDirFace2U,
2246 CORBA::Long theNbTimesU,
2247 CORBA::Long theDirFace1V,
2248 CORBA::Long theDirFace2V,
2249 CORBA::Long theNbTimesV)
2251 beginService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2252 MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
2254 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation2D(theBlock,
2255 theDirFace1U, theDirFace2U, theNbTimesU,
2256 theDirFace1V, theDirFace2V, theNbTimesV);
2257 endService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2261 //=============================== CurvesOperations ============================
2262 //=============================================================================
2263 // MakeCirclePntVecR:
2264 //=============================================================================
2265 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
2266 GEOM::GEOM_Object_ptr theVector,
2269 beginService( " GEOM_Superv_i::MakeCirclePntVecR" );
2270 MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
2272 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
2273 endService( " GEOM_Superv_i::MakeCirclePntVecR" );
2277 //=============================================================================
2278 // MakeCircleThreePnt:
2279 //=============================================================================
2280 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
2281 GEOM::GEOM_Object_ptr thePnt2,
2282 GEOM::GEOM_Object_ptr thePnt3)
2284 beginService( " GEOM_Superv_i::MakeCircleThreePnt" );
2285 MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
2287 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
2288 endService( " GEOM_Superv_i::MakeCircleThreePnt" );
2291 //=============================================================================
2292 // MakeCircleCenter2Pnt:
2293 //=============================================================================
2294 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
2295 GEOM::GEOM_Object_ptr thePnt2,
2296 GEOM::GEOM_Object_ptr thePnt3)
2298 beginService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2299 MESSAGE("GEOM_Superv_i::MakeCircleCenter2Pnt");
2301 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3);
2302 endService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2306 //=============================================================================
2308 //=============================================================================
2309 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
2310 GEOM::GEOM_Object_ptr theVector,
2311 CORBA::Double theRMajor,
2312 CORBA::Double theRMinor)
2314 beginService( " GEOM_Superv_i::MakeEllipse" );
2315 MESSAGE("GEOM_Superv_i::MakeEllipse");
2317 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
2318 endService( " GEOM_Superv_i::MakeEllipse" );
2322 //=============================================================================
2324 //=============================================================================
2325 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
2326 GEOM::GEOM_Object_ptr thePnt2,
2327 GEOM::GEOM_Object_ptr thePnt3)
2329 beginService( " GEOM_Superv_i::MakeArc" );
2330 MESSAGE("GEOM_Superv_i::MakeArc");
2332 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
2333 endService( " GEOM_Superv_i::MakeArc" );
2337 //=============================================================================
2339 //=============================================================================
2340 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
2341 GEOM::GEOM_Object_ptr thePnt1,
2342 GEOM::GEOM_Object_ptr thePnt2,
2343 CORBA::Boolean theSense)
2345 beginService( " GEOM_Superv_i::MakeArcCenter" );
2346 MESSAGE("GEOM_Superv_i::MakeArcCenter");
2348 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArcCenter(theCenter, thePnt1, thePnt2,theSense);
2349 endService( " GEOM_Superv_i::MakeArcCenter" );
2353 //=============================================================================
2355 //=============================================================================
2356 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints)
2358 beginService( " GEOM_Superv_i::MakePolyline" );
2359 MESSAGE("GEOM_Superv_i::MakePolyline");
2360 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2361 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2363 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakePolyline(aListImplP->GetList());
2364 endService( " GEOM_Superv_i::MakePolyline" );
2367 endService( " GEOM_Superv_i::MakePolyline" );
2371 //=============================================================================
2372 // MakeSplineBezier:
2373 //=============================================================================
2374 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints)
2376 beginService( " GEOM_Superv_i::MakeSplineBezier" );
2377 MESSAGE("GEOM_Superv_i::MakeSplineBezier");
2378 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2379 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2381 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineBezier(aListImplP->GetList());
2382 endService( " GEOM_Superv_i::MakeSplineBezier" );
2385 endService( " GEOM_Superv_i::MakeSplineBezier" );
2389 //=============================================================================
2390 // MakeSplineInterpolation:
2391 //=============================================================================
2392 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints)
2394 beginService( " GEOM_Superv_i::MakeSplineInterpolation" );
2395 MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
2396 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2397 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2399 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
2400 endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2403 endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2407 //=============================================================================
2409 //=============================================================================
2410 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand,
2411 GEOM::GEOM_List_ptr theWorkingPlane)
2413 beginService( " GEOM_Superv_i::MakeSketcher" );
2414 MESSAGE("GEOM_Superv_i::MakeSketcher");
2415 if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP =
2416 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
2418 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
2419 endService( " GEOM_Superv_i::MakeSketcher" );
2422 endService( " GEOM_Superv_i::MakeSketcher" );
2426 //=============================== LocalOperations =============================
2427 //=============================================================================
2429 //=============================================================================
2430 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
2433 beginService( " GEOM_Superv_i::MakeFilletAll" );
2434 MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
2436 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletAll(theShape, theR);
2437 endService( " GEOM_Superv_i::MakeFilletAll" );
2441 //=============================================================================
2443 //=============================================================================
2444 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape,
2446 GEOM::GEOM_List_ptr theEdges)
2448 beginService( " GEOM_Superv_i::MakeFilletEdges" );
2449 MESSAGE("GEOM_Superv_i::MakeFilletEdges");
2450 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
2451 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2453 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
2454 endService( " GEOM_Superv_i::MakeFilletEdges" );
2457 endService( " GEOM_Superv_i::MakeFilletEdges" );
2461 //=============================================================================
2462 // MakeFilletEdges R1 R2:
2463 //=============================================================================
2464 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape,
2465 CORBA::Double theR1,
2466 CORBA::Double theR2,
2467 GEOM::GEOM_List_ptr theEdges)
2469 beginService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2470 MESSAGE("GEOM_Superv_i::MakeFilletEdgesR1R2");
2471 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
2472 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2474 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdgesR1R2(theShape, theR1,
2475 theR2, aListImplE->GetList());
2476 endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2479 endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2483 //=============================================================================
2485 //=============================================================================
2486 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape,
2488 GEOM::GEOM_List_ptr theFaces)
2490 beginService( " GEOM_Superv_i::MakeFilletFaces" );
2491 MESSAGE("GEOM_Superv_i::MakeFilletFaces");
2492 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2493 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2495 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
2496 endService( " GEOM_Superv_i::MakeFilletFaces" );
2499 endService( " GEOM_Superv_i::MakeFilletFaces" );
2503 //=============================================================================
2504 // MakeFilletFaces R1 R2:
2505 //=============================================================================
2506 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape,
2507 CORBA::Double theR1,
2508 CORBA::Double theR2,
2509 GEOM::GEOM_List_ptr theFaces)
2511 beginService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2512 MESSAGE("GEOM_Superv_i::MakeFilletFacesR1R2");
2513 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2514 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2516 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFacesR1R2(theShape, theR1, theR2,
2517 aListImplF->GetList());
2518 endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2521 endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2525 //=============================================================================
2527 //=============================================================================
2528 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
2530 beginService( " GEOM_Superv_i::MakeChamferAll" );
2531 MESSAGE("GEOM_Superv_i::MakeChamferAll");
2533 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferAll(theShape, theD);
2534 endService( " GEOM_Superv_i::MakeChamferAll" );
2538 //=============================================================================
2540 //=============================================================================
2541 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
2542 CORBA::Double theD1, CORBA::Double theD2,
2543 CORBA::Long theFace1, CORBA::Long theFace2)
2545 beginService( " GEOM_Superv_i::MakeChamferEdge" );
2546 MESSAGE("GEOM_Superv_i::MakeChamferEdge");
2548 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
2549 endService( " GEOM_Superv_i::MakeChamferEdge" );
2553 //=============================================================================
2554 // MakeChamferEdgeAD:
2555 //=============================================================================
2556 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
2557 CORBA::Double theD, CORBA::Double theAngle,
2558 CORBA::Long theFace1, CORBA::Long theFace2)
2560 beginService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2561 MESSAGE("GEOM_Superv_i::MakeChamferEdgeAD");
2563 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2);
2564 endService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2568 //=============================================================================
2569 // MakeChamferFaces:
2570 //=============================================================================
2571 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
2572 CORBA::Double theD1, CORBA::Double theD2,
2573 GEOM::GEOM_List_ptr theFaces)
2575 beginService( " GEOM_Superv_i::MakeChamferFaces" );
2576 MESSAGE("GEOM_Superv_i::MakeChamferFaces");
2577 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2578 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2580 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
2581 endService( " GEOM_Superv_i::MakeChamferFaces" );
2584 endService( " GEOM_Superv_i::MakeChamferFaces" );
2588 //=============================================================================
2589 // MakeChamferFacesAD:
2590 //=============================================================================
2591 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
2592 CORBA::Double theD, CORBA::Double theAngle,
2593 GEOM::GEOM_List_ptr theFaces)
2595 beginService( " GEOM_Superv_i::MakeChamferFacesAD" );
2596 MESSAGE("GEOM_Superv_i::MakeChamferFacesAD");
2597 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2598 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2600 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFacesAD(theShape, theD, theAngle, aListImplF->GetList());
2601 endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2604 endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2608 //=============================================================================
2609 // MakeChamferEdges:
2610 //=============================================================================
2611 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
2612 CORBA::Double theD1, CORBA::Double theD2,
2613 GEOM::GEOM_List_ptr theEdges)
2615 beginService( " GEOM_Superv_i::MakeChamferEdges" );
2616 MESSAGE("GEOM_Superv_i::MakeChamferEdges");
2617 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2618 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2620 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdges(theShape, theD1, theD2, aListImplF->GetList());
2621 endService( " GEOM_Superv_i::MakeChamferEdges" );
2624 endService( " GEOM_Superv_i::MakeChamferEdges" );
2628 //=============================================================================
2629 // MakeChamferEdgesAD:
2630 //=============================================================================
2631 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
2632 CORBA::Double theD, CORBA::Double theAngle,
2633 GEOM::GEOM_List_ptr theEdges)
2635 beginService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2636 MESSAGE("GEOM_Superv_i::MakeChamferEdgesAD");
2637 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2638 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2640 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgesAD(theShape, theD, theAngle, aListImplF->GetList());
2641 endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2644 endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2648 //=============================================================================
2650 //=============================================================================
2651 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
2652 CORBA::Double theWeight,
2653 CORBA::Double theWaterDensity,
2654 CORBA::Double theMeshingDeflection)
2656 beginService( " GEOM_Superv_i::MakeArchimede" );
2657 MESSAGE("GEOM_Superv_i::MakeArchimede");
2659 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
2660 endService( " GEOM_Superv_i::MakeArchimede" );
2664 //=============================================================================
2665 // GetSubShapeIndexMakeFilletAll:
2666 //=============================================================================
2667 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
2668 GEOM::GEOM_Object_ptr theSubShape)
2670 beginService( " GEOM_Superv_i::GetSubShapeIndex" );
2671 MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
2673 CORBA::Long aRes = myLocalOp->GetSubShapeIndex(theShape, theSubShape);
2674 endService( " GEOM_Superv_i::GetSubShapeIndex" );
2678 //=============================== GroupOperations =============================
2679 //=============================================================================
2681 //=============================================================================
2682 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
2683 CORBA::Long theShapeType)
2685 beginService( " GEOM_Superv_i::CreateGroup" );
2686 MESSAGE("GEOM_Superv_i::CreateGroup");
2688 GEOM::GEOM_Object_ptr anObj = myGroupOp->CreateGroup(theMainShape, theShapeType);
2689 endService( " GEOM_Superv_i::CreateGroup" );
2693 //=============================================================================
2695 //=============================================================================
2696 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup,
2697 CORBA::Long theSubShapeId)
2699 beginService( " GEOM_Superv_i::AddObject" );
2700 MESSAGE("GEOM_Superv_i::AddObject");
2702 myGroupOp->AddObject(theGroup, theSubShapeId);
2703 endService( " GEOM_Superv_i::AddObject" );
2706 //=============================================================================
2708 //=============================================================================
2709 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup,
2710 CORBA::Long theSubShapeId)
2712 beginService( " GEOM_Superv_i::RemoveObject" );
2713 MESSAGE("GEOM_Superv_i::RemoveObject");
2715 myGroupOp->RemoveObject(theGroup, theSubShapeId);
2716 endService( " GEOM_Superv_i::RemoveObject" );
2719 //=============================================================================
2721 //=============================================================================
2722 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
2724 beginService( " GEOM_Superv_i::GetType" );
2725 MESSAGE("GEOM_Superv_i::GetType");
2727 CORBA::Long aResult = myGroupOp->GetType(theGroup);
2728 endService( " GEOM_Superv_i::GetType" );
2732 //=============================================================================
2734 //=============================================================================
2735 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
2737 beginService( " GEOM_Superv_i::GetMainShape" );
2738 MESSAGE("GEOM_Superv_i::GetMainShape");
2740 GEOM::GEOM_Object_ptr anObj = myGroupOp->GetMainShape(theGroup);
2741 endService( " GEOM_Superv_i::GetMainShape" );
2745 //=============================================================================
2747 //=============================================================================
2748 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
2750 beginService( " GEOM_Superv_i::GetObjects" );
2751 MESSAGE("GEOM_Superv_i::GetObjects");
2754 GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
2755 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
2756 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2757 endService( " GEOM_Superv_i::GetObjects" );
2758 return aListPtr->_this();
2761 //=====================================================================================
2763 //=====================================================================================
2766 PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
2767 PortableServer::POA_ptr poa,
2768 PortableServer::ObjectId * contId,
2769 const char *instanceName,
2770 const char * interfaceName)
2772 GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
2773 //Don't understand the reason why this component is registered ???
2774 // myGEOM_Superv_i->register_name("/myGEOM_Superv");
2775 return myGEOM_Superv_i->getId() ;