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" );
1896 //=============================================================================
1897 // ChangeOrientation:
1898 //=============================================================================
1899 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
1901 beginService( " GEOM_Superv_i::ChangeOrientation" );
1902 MESSAGE("GEOM_Superv_i::ChangeOrientation");
1904 GEOM::GEOM_Object_ptr anObj = myShapesOp->ChangeOrientation(theShape);
1905 endService( " GEOM_Superv_i::ChangeOrientation" );
1910 //=============================================================================
1911 // GetShapesOnShape:
1912 //=============================================================================
1913 GEOM::GEOM_List_ptr GEOM_Superv_i::GetShapesOnShape
1914 (GEOM::GEOM_Object_ptr theCheckShape,
1915 GEOM::GEOM_Object_ptr theShape,
1916 CORBA::Short theShapeType,
1917 GEOM::shape_state theState)
1919 beginService( " GEOM_Superv_i::GetShapesOnShape" );
1920 MESSAGE("GEOM_Superv_i::GetShapesOnShape");
1922 GEOM::ListOfGO* aList =
1923 myShapesOp->GetShapesOnShape(theCheckShape, theShape, theShapeType, theState);
1924 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1925 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1926 endService( " GEOM_Superv_i::GetShapesOnShape" );
1927 return aListPtr->_this();
1931 //=============================================================================
1932 // GetShapesOnShapeAsCompound:
1933 //=============================================================================
1934 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetShapesOnShapeAsCompound
1935 (GEOM::GEOM_Object_ptr theCheckShape,
1936 GEOM::GEOM_Object_ptr theShape,
1937 CORBA::Short theShapeType,
1938 GEOM::shape_state theState)
1940 beginService( " GEOM_Superv_i::GetShapesOnShapeAsCompound" );
1941 MESSAGE("GEOM_Superv_i::GetShapesOnShapeAsCompound");
1943 GEOM::GEOM_Object_ptr anObj =
1944 myShapesOp->GetShapesOnShapeAsCompound(theCheckShape, theShape, theShapeType, theState);
1945 endService( " GEOM_Superv_i::GetShapesOnShapeAsCompound" );
1950 //=============================== BlocksOperations ============================
1951 //=============================================================================
1952 // MakeQuad4Vertices:
1953 //=============================================================================
1954 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
1955 GEOM::GEOM_Object_ptr thePnt2,
1956 GEOM::GEOM_Object_ptr thePnt3,
1957 GEOM::GEOM_Object_ptr thePnt4)
1959 beginService( " GEOM_Superv_i::MakeQuad4Vertices" );
1960 MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
1962 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
1963 endService( " GEOM_Superv_i::MakeQuad4Vertices" );
1967 //=============================================================================
1969 //=============================================================================
1970 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
1971 GEOM::GEOM_Object_ptr theEdge2,
1972 GEOM::GEOM_Object_ptr theEdge3,
1973 GEOM::GEOM_Object_ptr theEdge4)
1975 beginService( " GEOM_Superv_i::MakeQuad" );
1976 MESSAGE("GEOM_Superv_i::MakeQuad");
1978 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
1979 endService( " GEOM_Superv_i::MakeQuad" );
1983 //=============================================================================
1985 //=============================================================================
1986 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
1987 GEOM::GEOM_Object_ptr theEdge2)
1989 beginService( " GEOM_Superv_i::MakeQuad2Edges" );
1990 MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
1992 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
1993 endService( " GEOM_Superv_i::MakeQuad2Edges" );
1997 //=============================================================================
1999 //=============================================================================
2000 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
2001 GEOM::GEOM_Object_ptr theFace2,
2002 GEOM::GEOM_Object_ptr theFace3,
2003 GEOM::GEOM_Object_ptr theFace4,
2004 GEOM::GEOM_Object_ptr theFace5,
2005 GEOM::GEOM_Object_ptr theFace6)
2007 beginService( " GEOM_Superv_i::MakeHexa" );
2008 MESSAGE("GEOM_Superv_i::MakeHexa");
2010 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
2011 endService( " GEOM_Superv_i::MakeHexa" );
2015 //=============================================================================
2017 //=============================================================================
2018 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
2019 GEOM::GEOM_Object_ptr theFace2)
2021 beginService( " GEOM_Superv_i::MakeHexa2Faces" );
2022 MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
2024 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
2025 endService( " GEOM_Superv_i::MakeHexa2Faces" );
2029 //=============================================================================
2031 //=============================================================================
2032 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
2036 CORBA::Double theEpsilon)
2038 beginService( " GEOM_Superv_i::GetPoint" );
2039 MESSAGE("GEOM_Superv_i::GetPoint");
2041 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
2042 endService( " GEOM_Superv_i::GetPoint" );
2046 //=============================================================================
2048 //=============================================================================
2049 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
2050 GEOM::GEOM_Object_ptr thePoint1,
2051 GEOM::GEOM_Object_ptr thePoint2)
2053 beginService( " GEOM_Superv_i::GetEdge" );
2054 MESSAGE("GEOM_Superv_i::GetEdge");
2056 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
2057 endService( " GEOM_Superv_i::GetEdge" );
2061 //=============================================================================
2062 // GetEdgeNearPoint:
2063 //=============================================================================
2064 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
2065 GEOM::GEOM_Object_ptr thePoint)
2067 beginService( " GEOM_Superv_i::GetEdgeNearPoint" );
2068 MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
2070 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
2071 endService( " GEOM_Superv_i::GetEdgeNearPoint" );
2075 //=============================================================================
2077 //=============================================================================
2078 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
2079 GEOM::GEOM_Object_ptr thePoint1,
2080 GEOM::GEOM_Object_ptr thePoint2,
2081 GEOM::GEOM_Object_ptr thePoint3,
2082 GEOM::GEOM_Object_ptr thePoint4)
2084 beginService( " GEOM_Superv_i::GetFaceByPoints" );
2085 MESSAGE("GEOM_Superv_i::GetFaceByPoints");
2087 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
2088 endService( " GEOM_Superv_i::GetFaceByPoints" );
2092 //=============================================================================
2094 //=============================================================================
2095 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
2096 GEOM::GEOM_Object_ptr theEdge1,
2097 GEOM::GEOM_Object_ptr theEdge2)
2099 beginService( " GEOM_Superv_i::GetFaceByEdges" );
2100 MESSAGE("GEOM_Superv_i::GetFaceByEdges");
2102 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
2103 endService( " GEOM_Superv_i::GetFaceByEdges" );
2107 //=============================================================================
2109 //=============================================================================
2110 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
2111 GEOM::GEOM_Object_ptr theFace)
2113 beginService( " GEOM_Superv_i::GetOppositeFace" );
2114 MESSAGE("GEOM_Superv_i::GetOppositeFace");
2116 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetOppositeFace(theBlock, theFace);
2117 endService( " GEOM_Superv_i::GetOppositeFace" );
2121 //=============================================================================
2122 // GetFaceNearPoint:
2123 //=============================================================================
2124 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
2125 GEOM::GEOM_Object_ptr thePoint)
2127 beginService( " GEOM_Superv_i::GetFaceNearPoint" );
2128 MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
2130 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceNearPoint(theShape, thePoint);
2131 endService( " GEOM_Superv_i::GetFaceNearPoint" );
2135 //=============================================================================
2136 // GetFaceByNormale:
2137 //=============================================================================
2138 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
2139 GEOM::GEOM_Object_ptr theVector)
2141 beginService( " GEOM_Superv_i::GetFaceByNormale" );
2142 MESSAGE("GEOM_Superv_i::GetFaceByNormale");
2144 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByNormale(theBlock, theVector);
2145 endService( " GEOM_Superv_i::GetFaceByNormale" );
2149 //=============================================================================
2150 // IsCompoundOfBlocks:
2151 //=============================================================================
2152 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2153 CORBA::Long theMinNbFaces,
2154 CORBA::Long theMaxNbFaces,
2155 CORBA::Long& theNbBlocks)
2157 beginService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2158 MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
2160 CORBA::Boolean aRes = myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
2161 endService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2165 //=============================================================================
2166 // CheckCompoundOfBlocks:
2167 //=============================================================================
2168 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks
2169 (GEOM::GEOM_Object_ptr theCompound,
2170 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
2172 beginService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2173 MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
2175 CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
2176 endService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2180 //=============================================================================
2182 //=============================================================================
2183 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
2184 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
2186 beginService( " GEOM_Superv_i::PrintBCErrors" );
2187 MESSAGE("GEOM_Superv_i::PrintBCErrors");
2189 char* anErrors = myBlocksOp->PrintBCErrors(theCompound, theErrors);
2190 endService( " GEOM_Superv_i::PrintBCErrors" );
2194 //=============================================================================
2195 // ExplodeCompoundOfBlocks:
2196 //=============================================================================
2197 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2198 CORBA::Long theMinNbFaces,
2199 CORBA::Long theMaxNbFaces)
2201 beginService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2202 MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
2204 GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
2205 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2206 endService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2207 return aListPtr->_this();
2210 //=============================================================================
2211 // GetBlockNearPoint:
2212 //=============================================================================
2213 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
2214 GEOM::GEOM_Object_ptr thePoint)
2216 beginService( " GEOM_Superv_i::GetBlockNearPoint" );
2217 MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
2219 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
2220 endService( " GEOM_Superv_i::GetBlockNearPoint" );
2224 //=============================================================================
2226 //=============================================================================
2227 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
2228 GEOM::GEOM_List_ptr theParts)
2230 beginService( " GEOM_Superv_i::GetBlockByParts" );
2231 MESSAGE("GEOM_Superv_i::GetBlockByParts");
2232 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2233 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2235 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
2236 endService( " GEOM_Superv_i::GetBlockByParts" );
2239 endService( " GEOM_Superv_i::GetBlockByParts" );
2243 //=============================================================================
2244 // GetBlocksByParts:
2245 //=============================================================================
2246 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
2247 GEOM::GEOM_List_ptr theParts)
2249 beginService( " GEOM_Superv_i::GetBlocksByParts" );
2250 MESSAGE("GEOM_Superv_i::GetBlocksByParts");
2251 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2252 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2255 GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
2256 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2257 endService( " GEOM_Superv_i::GetBlocksByParts" );
2258 return aListPtr->_this();
2260 endService( " GEOM_Superv_i::GetBlocksByParts" );
2264 //=============================================================================
2265 // MakeMultiTransformation1D:
2266 //=============================================================================
2267 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
2268 CORBA::Long theDirFace1,
2269 CORBA::Long theDirFace2,
2270 CORBA::Long theNbTimes)
2272 beginService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2273 MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
2275 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
2276 endService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2280 //=============================================================================
2281 // MakeMultiTransformation2D:
2282 //=============================================================================
2283 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D
2284 (GEOM::GEOM_Object_ptr theBlock,
2285 CORBA::Long theDirFace1U,
2286 CORBA::Long theDirFace2U,
2287 CORBA::Long theNbTimesU,
2288 CORBA::Long theDirFace1V,
2289 CORBA::Long theDirFace2V,
2290 CORBA::Long theNbTimesV)
2292 beginService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2293 MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
2295 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation2D(theBlock,
2296 theDirFace1U, theDirFace2U, theNbTimesU,
2297 theDirFace1V, theDirFace2V, theNbTimesV);
2298 endService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2302 //=============================== CurvesOperations ============================
2303 //=============================================================================
2304 // MakeCirclePntVecR:
2305 //=============================================================================
2306 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
2307 GEOM::GEOM_Object_ptr theVector,
2310 beginService( " GEOM_Superv_i::MakeCirclePntVecR" );
2311 MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
2313 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
2314 endService( " GEOM_Superv_i::MakeCirclePntVecR" );
2318 //=============================================================================
2319 // MakeCircleThreePnt:
2320 //=============================================================================
2321 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
2322 GEOM::GEOM_Object_ptr thePnt2,
2323 GEOM::GEOM_Object_ptr thePnt3)
2325 beginService( " GEOM_Superv_i::MakeCircleThreePnt" );
2326 MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
2328 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
2329 endService( " GEOM_Superv_i::MakeCircleThreePnt" );
2332 //=============================================================================
2333 // MakeCircleCenter2Pnt:
2334 //=============================================================================
2335 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
2336 GEOM::GEOM_Object_ptr thePnt2,
2337 GEOM::GEOM_Object_ptr thePnt3)
2339 beginService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2340 MESSAGE("GEOM_Superv_i::MakeCircleCenter2Pnt");
2342 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3);
2343 endService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2347 //=============================================================================
2349 //=============================================================================
2350 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
2351 GEOM::GEOM_Object_ptr theVector,
2352 CORBA::Double theRMajor,
2353 CORBA::Double theRMinor)
2355 beginService( " GEOM_Superv_i::MakeEllipse" );
2356 MESSAGE("GEOM_Superv_i::MakeEllipse");
2358 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
2359 endService( " GEOM_Superv_i::MakeEllipse" );
2363 //=============================================================================
2365 //=============================================================================
2366 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
2367 GEOM::GEOM_Object_ptr thePnt2,
2368 GEOM::GEOM_Object_ptr thePnt3)
2370 beginService( " GEOM_Superv_i::MakeArc" );
2371 MESSAGE("GEOM_Superv_i::MakeArc");
2373 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
2374 endService( " GEOM_Superv_i::MakeArc" );
2378 //=============================================================================
2380 //=============================================================================
2381 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
2382 GEOM::GEOM_Object_ptr thePnt1,
2383 GEOM::GEOM_Object_ptr thePnt2,
2384 CORBA::Boolean theSense)
2386 beginService( " GEOM_Superv_i::MakeArcCenter" );
2387 MESSAGE("GEOM_Superv_i::MakeArcCenter");
2389 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArcCenter(theCenter, thePnt1, thePnt2,theSense);
2390 endService( " GEOM_Superv_i::MakeArcCenter" );
2394 //=============================================================================
2396 //=============================================================================
2397 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints)
2399 beginService( " GEOM_Superv_i::MakePolyline" );
2400 MESSAGE("GEOM_Superv_i::MakePolyline");
2401 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2402 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2404 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakePolyline(aListImplP->GetList());
2405 endService( " GEOM_Superv_i::MakePolyline" );
2408 endService( " GEOM_Superv_i::MakePolyline" );
2412 //=============================================================================
2413 // MakeSplineBezier:
2414 //=============================================================================
2415 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints)
2417 beginService( " GEOM_Superv_i::MakeSplineBezier" );
2418 MESSAGE("GEOM_Superv_i::MakeSplineBezier");
2419 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2420 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2422 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineBezier(aListImplP->GetList());
2423 endService( " GEOM_Superv_i::MakeSplineBezier" );
2426 endService( " GEOM_Superv_i::MakeSplineBezier" );
2430 //=============================================================================
2431 // MakeSplineInterpolation:
2432 //=============================================================================
2433 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints)
2435 beginService( " GEOM_Superv_i::MakeSplineInterpolation" );
2436 MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
2437 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2438 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2440 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
2441 endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2444 endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2448 //=============================================================================
2450 //=============================================================================
2451 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand,
2452 GEOM::GEOM_List_ptr theWorkingPlane)
2454 beginService( " GEOM_Superv_i::MakeSketcher" );
2455 MESSAGE("GEOM_Superv_i::MakeSketcher");
2456 if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP =
2457 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
2459 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
2460 endService( " GEOM_Superv_i::MakeSketcher" );
2463 endService( " GEOM_Superv_i::MakeSketcher" );
2467 //=============================== LocalOperations =============================
2468 //=============================================================================
2470 //=============================================================================
2471 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
2474 beginService( " GEOM_Superv_i::MakeFilletAll" );
2475 MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
2477 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletAll(theShape, theR);
2478 endService( " GEOM_Superv_i::MakeFilletAll" );
2482 //=============================================================================
2484 //=============================================================================
2485 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape,
2487 GEOM::GEOM_List_ptr theEdges)
2489 beginService( " GEOM_Superv_i::MakeFilletEdges" );
2490 MESSAGE("GEOM_Superv_i::MakeFilletEdges");
2491 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
2492 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2494 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
2495 endService( " GEOM_Superv_i::MakeFilletEdges" );
2498 endService( " GEOM_Superv_i::MakeFilletEdges" );
2502 //=============================================================================
2503 // MakeFilletEdges R1 R2:
2504 //=============================================================================
2505 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape,
2506 CORBA::Double theR1,
2507 CORBA::Double theR2,
2508 GEOM::GEOM_List_ptr theEdges)
2510 beginService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2511 MESSAGE("GEOM_Superv_i::MakeFilletEdgesR1R2");
2512 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
2513 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2515 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdgesR1R2(theShape, theR1,
2516 theR2, aListImplE->GetList());
2517 endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2520 endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2524 //=============================================================================
2526 //=============================================================================
2527 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape,
2529 GEOM::GEOM_List_ptr theFaces)
2531 beginService( " GEOM_Superv_i::MakeFilletFaces" );
2532 MESSAGE("GEOM_Superv_i::MakeFilletFaces");
2533 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2534 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2536 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
2537 endService( " GEOM_Superv_i::MakeFilletFaces" );
2540 endService( " GEOM_Superv_i::MakeFilletFaces" );
2544 //=============================================================================
2545 // MakeFilletFaces R1 R2:
2546 //=============================================================================
2547 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape,
2548 CORBA::Double theR1,
2549 CORBA::Double theR2,
2550 GEOM::GEOM_List_ptr theFaces)
2552 beginService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2553 MESSAGE("GEOM_Superv_i::MakeFilletFacesR1R2");
2554 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2555 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2557 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFacesR1R2(theShape, theR1, theR2,
2558 aListImplF->GetList());
2559 endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2562 endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2566 //=============================================================================
2568 //=============================================================================
2569 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
2571 beginService( " GEOM_Superv_i::MakeChamferAll" );
2572 MESSAGE("GEOM_Superv_i::MakeChamferAll");
2574 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferAll(theShape, theD);
2575 endService( " GEOM_Superv_i::MakeChamferAll" );
2579 //=============================================================================
2581 //=============================================================================
2582 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
2583 CORBA::Double theD1, CORBA::Double theD2,
2584 CORBA::Long theFace1, CORBA::Long theFace2)
2586 beginService( " GEOM_Superv_i::MakeChamferEdge" );
2587 MESSAGE("GEOM_Superv_i::MakeChamferEdge");
2589 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
2590 endService( " GEOM_Superv_i::MakeChamferEdge" );
2594 //=============================================================================
2595 // MakeChamferEdgeAD:
2596 //=============================================================================
2597 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
2598 CORBA::Double theD, CORBA::Double theAngle,
2599 CORBA::Long theFace1, CORBA::Long theFace2)
2601 beginService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2602 MESSAGE("GEOM_Superv_i::MakeChamferEdgeAD");
2604 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2);
2605 endService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2609 //=============================================================================
2610 // MakeChamferFaces:
2611 //=============================================================================
2612 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
2613 CORBA::Double theD1, CORBA::Double theD2,
2614 GEOM::GEOM_List_ptr theFaces)
2616 beginService( " GEOM_Superv_i::MakeChamferFaces" );
2617 MESSAGE("GEOM_Superv_i::MakeChamferFaces");
2618 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2619 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2621 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
2622 endService( " GEOM_Superv_i::MakeChamferFaces" );
2625 endService( " GEOM_Superv_i::MakeChamferFaces" );
2629 //=============================================================================
2630 // MakeChamferFacesAD:
2631 //=============================================================================
2632 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
2633 CORBA::Double theD, CORBA::Double theAngle,
2634 GEOM::GEOM_List_ptr theFaces)
2636 beginService( " GEOM_Superv_i::MakeChamferFacesAD" );
2637 MESSAGE("GEOM_Superv_i::MakeChamferFacesAD");
2638 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2639 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2641 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFacesAD(theShape, theD, theAngle, aListImplF->GetList());
2642 endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2645 endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2649 //=============================================================================
2650 // MakeChamferEdges:
2651 //=============================================================================
2652 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
2653 CORBA::Double theD1, CORBA::Double theD2,
2654 GEOM::GEOM_List_ptr theEdges)
2656 beginService( " GEOM_Superv_i::MakeChamferEdges" );
2657 MESSAGE("GEOM_Superv_i::MakeChamferEdges");
2658 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2659 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2661 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdges(theShape, theD1, theD2, aListImplF->GetList());
2662 endService( " GEOM_Superv_i::MakeChamferEdges" );
2665 endService( " GEOM_Superv_i::MakeChamferEdges" );
2669 //=============================================================================
2670 // MakeChamferEdgesAD:
2671 //=============================================================================
2672 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
2673 CORBA::Double theD, CORBA::Double theAngle,
2674 GEOM::GEOM_List_ptr theEdges)
2676 beginService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2677 MESSAGE("GEOM_Superv_i::MakeChamferEdgesAD");
2678 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2679 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2681 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgesAD(theShape, theD, theAngle, aListImplF->GetList());
2682 endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2685 endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2689 //=============================================================================
2691 //=============================================================================
2692 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
2693 CORBA::Double theWeight,
2694 CORBA::Double theWaterDensity,
2695 CORBA::Double theMeshingDeflection)
2697 beginService( " GEOM_Superv_i::MakeArchimede" );
2698 MESSAGE("GEOM_Superv_i::MakeArchimede");
2700 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
2701 endService( " GEOM_Superv_i::MakeArchimede" );
2705 //=============================================================================
2706 // GetSubShapeIndexMakeFilletAll:
2707 //=============================================================================
2708 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
2709 GEOM::GEOM_Object_ptr theSubShape)
2711 beginService( " GEOM_Superv_i::GetSubShapeIndex" );
2712 MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
2714 CORBA::Long aRes = myLocalOp->GetSubShapeIndex(theShape, theSubShape);
2715 endService( " GEOM_Superv_i::GetSubShapeIndex" );
2719 //=============================== GroupOperations =============================
2720 //=============================================================================
2722 //=============================================================================
2723 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
2724 CORBA::Long theShapeType)
2726 beginService( " GEOM_Superv_i::CreateGroup" );
2727 MESSAGE("GEOM_Superv_i::CreateGroup");
2729 GEOM::GEOM_Object_ptr anObj = myGroupOp->CreateGroup(theMainShape, theShapeType);
2730 endService( " GEOM_Superv_i::CreateGroup" );
2734 //=============================================================================
2736 //=============================================================================
2737 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup,
2738 CORBA::Long theSubShapeId)
2740 beginService( " GEOM_Superv_i::AddObject" );
2741 MESSAGE("GEOM_Superv_i::AddObject");
2743 myGroupOp->AddObject(theGroup, theSubShapeId);
2744 endService( " GEOM_Superv_i::AddObject" );
2747 //=============================================================================
2749 //=============================================================================
2750 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup,
2751 CORBA::Long theSubShapeId)
2753 beginService( " GEOM_Superv_i::RemoveObject" );
2754 MESSAGE("GEOM_Superv_i::RemoveObject");
2756 myGroupOp->RemoveObject(theGroup, theSubShapeId);
2757 endService( " GEOM_Superv_i::RemoveObject" );
2760 //=============================================================================
2762 //=============================================================================
2763 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
2765 beginService( " GEOM_Superv_i::GetType" );
2766 MESSAGE("GEOM_Superv_i::GetType");
2768 CORBA::Long aResult = myGroupOp->GetType(theGroup);
2769 endService( " GEOM_Superv_i::GetType" );
2773 //=============================================================================
2775 //=============================================================================
2776 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
2778 beginService( " GEOM_Superv_i::GetMainShape" );
2779 MESSAGE("GEOM_Superv_i::GetMainShape");
2781 GEOM::GEOM_Object_ptr anObj = myGroupOp->GetMainShape(theGroup);
2782 endService( " GEOM_Superv_i::GetMainShape" );
2786 //=============================================================================
2788 //=============================================================================
2789 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
2791 beginService( " GEOM_Superv_i::GetObjects" );
2792 MESSAGE("GEOM_Superv_i::GetObjects");
2795 GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
2796 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
2797 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2798 endService( " GEOM_Superv_i::GetObjects" );
2799 return aListPtr->_this();
2802 //=====================================================================================
2804 //=====================================================================================
2807 PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
2808 PortableServer::POA_ptr poa,
2809 PortableServer::ObjectId * contId,
2810 const char *instanceName,
2811 const char * interfaceName)
2813 GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
2814 //Don't understand the reason why this component is registered ???
2815 // myGEOM_Superv_i->register_name("/myGEOM_Superv");
2816 return myGEOM_Superv_i->getId() ;