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_ptr anObj = my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
817 endService( " GEOM_Superv_i::MakeSphepe" );
821 //=============================================================================
823 //=============================================================================
824 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
826 beginService( " GEOM_Superv_i::MakeSphereR" );
827 MESSAGE("GEOM_Superv_i::MakeSphereR");
829 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSphereR(theR);
830 endService( " GEOM_Superv_i::MakeSphereR" );
834 //=============================================================================
836 //=============================================================================
837 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
840 beginService( " GEOM_Superv_i::MakeSpherePntR" );
841 MESSAGE("GEOM_Superv_i::MakeSpherePntR");
843 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(thePnt, theR);
844 endService( " GEOM_Superv_i::MakeSpherePntR" );
848 //=============================================================================
849 // MakeTorusPntVecRR:
850 //=============================================================================
851 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
852 GEOM::GEOM_Object_ptr theVec,
853 CORBA::Double theRMajor,
854 CORBA::Double theRMinor)
856 beginService( " GEOM_Superv_i::MakeTorusPntVecRR" );
857 MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
859 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
860 endService( " GEOM_Superv_i::MakeTorusPntVecRR" );
864 //=============================================================================
866 //=============================================================================
867 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor,
868 CORBA::Double theRMinor)
870 beginService( " GEOM_Superv_i::MakeTorusRR" );
871 MESSAGE("GEOM_Superv_i::MakeTorusRR");
873 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
874 endService( " GEOM_Superv_i::MakeTorusRR" );
878 //=============================================================================
879 // MakeConePntVecR1R2H:
880 //=============================================================================
881 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
882 GEOM::GEOM_Object_ptr theAxis,
885 CORBA::Double theHeight)
887 beginService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
888 MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
890 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
891 endService( " GEOM_Superv_i::MakeConePntVecR1R2H" );
895 //=============================================================================
897 //=============================================================================
898 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1,
900 CORBA::Double theHeight)
902 beginService( " GEOM_Superv_i::MakeConeR1R2H" );
903 MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
905 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
906 endService( " GEOM_Superv_i::MakeConeR1R2H" );
910 //=============================================================================
912 //=============================================================================
913 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
914 GEOM::GEOM_Object_ptr theVec,
917 beginService( " GEOM_Superv_i::MakePrismVecH" );
918 MESSAGE("GEOM_Superv_i::MakePrismVecH");
920 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
921 endService( " GEOM_Superv_i::MakePrismVecH" );
925 //=============================================================================
926 // MakePrismVecH2Ways:
927 //=============================================================================
928 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
929 GEOM::GEOM_Object_ptr theVec,
932 beginService( " GEOM_Superv_i::MakePrismVecH2Ways" );
933 MESSAGE("GEOM_Superv_i::MakePrismVecH2Ways");
935 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismVecH2Ways(theBase, theVec, theH);
936 endService( " GEOM_Superv_i::MakePrismVecH2Ways" );
940 //=============================================================================
942 //=============================================================================
943 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
944 GEOM::GEOM_Object_ptr thePoint1,
945 GEOM::GEOM_Object_ptr thePoint2)
947 beginService( " GEOM_Superv_i::MakePrismTwoPnt" );
948 MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
950 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
951 endService( " GEOM_Superv_i::MakePrismTwoPnt" );
955 //=============================================================================
956 // MakePrismTwoPnt2Ways:
957 //=============================================================================
958 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
959 GEOM::GEOM_Object_ptr thePoint1,
960 GEOM::GEOM_Object_ptr thePoint2)
962 beginService( " GEOM_Superv_i::MakePrismTwoPnt2Ways" );
963 MESSAGE("GEOM_Superv_i::MakePrismTwoPnt2Ways");
965 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2);
966 endService( " GEOM_Superv_i::MakePrismTwoPnt2Ways" );
970 //=============================================================================
972 //=============================================================================
973 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase,
974 GEOM::GEOM_Object_ptr thePath)
976 beginService( " GEOM_Superv_i::MakePipe" );
977 MESSAGE("GEOM_Superv_i::MakePipe");
979 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipe(theBase, thePath);
980 endService( " GEOM_Superv_i::MakePipe" );
984 //=============================================================================
985 // MakeRevolutionAxisAngle:
986 //=============================================================================
987 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
988 GEOM::GEOM_Object_ptr theAxis,
989 CORBA::Double theAngle)
991 beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
992 MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
994 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
995 endService( " GEOM_Superv_i::MakeRevolutionAxisAngle" );
999 //=============================================================================
1000 // MakeRevolutionAxisAngle:
1001 //=============================================================================
1002 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
1003 GEOM::GEOM_Object_ptr theAxis,
1004 CORBA::Double theAngle)
1006 beginService( " GEOM_Superv_i::MakeRevolutionAxisAngle2Ways" );
1007 MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle2Ways");
1009 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle);
1010 endService( " GEOM_Superv_i::MakeRevolutionAxisAngle2Ways" );
1014 //=============================================================================
1016 //=============================================================================
1017 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
1018 CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
1019 CORBA::Double theTol2D, CORBA::Double theTol3D,
1020 CORBA::Long theNbIter, CORBA::Boolean theApprox)
1022 beginService( " GEOM_Superv_i::MakeFilling" );
1023 MESSAGE("GEOM_Superv_i::MakeFilling");
1025 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theApprox);
1026 endService( " GEOM_Superv_i::MakeFilling" );
1030 //============================= BooleanOperations =============================
1031 //=============================================================================
1033 //=============================================================================
1034 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
1035 GEOM::GEOM_Object_ptr theShape2,
1036 CORBA::Long theOperation)
1038 beginService( " GEOM_Superv_i::MakeBoolean" );
1039 // theOperation indicates the operation to be done:
1040 // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
1041 MESSAGE("GEOM_Superv_i::MakeBoolean");
1043 GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
1044 endService( " GEOM_Superv_i::MakeBoolean" );
1048 //=============================================================================
1049 // MakeThruSections:
1050 //=============================================================================
1051 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeThruSections(const GEOM::ListOfGO& theSeqSections,
1052 CORBA::Boolean theModeSolid,
1053 CORBA::Double thePreci,
1054 CORBA::Boolean theRuled)
1056 beginService( " GEOM_Superv_i::MakeThruSections" );
1057 MESSAGE("GEOM_Superv_i::MakeThruSections");
1059 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeThruSections(theSeqSections, theModeSolid,thePreci,theRuled);
1060 endService( " GEOM_Superv_i::MakeThruSections" );
1064 //=============================================================================
1066 //=============================================================================
1067 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithDifferentSections
1068 (const GEOM::ListOfGO& theBases,
1069 const GEOM::ListOfGO& theLocations,
1070 GEOM::GEOM_Object_ptr thePath,
1071 CORBA::Boolean theWithContact,
1072 CORBA::Boolean theWithCorrections)
1074 beginService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
1075 MESSAGE("GEOM_Superv_i::MakePipeWithDifferentSections");
1077 GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipeWithDifferentSections(theBases,theLocations, thePath,theWithContact,theWithCorrections);
1078 endService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
1083 //=============================================================================
1085 //=============================================================================
1086 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithShellSections
1087 (const GEOM::ListOfGO& theBases,
1088 const GEOM::ListOfGO& theSubBases,
1089 const GEOM::ListOfGO& theLocations,
1090 GEOM::GEOM_Object_ptr thePath,
1091 CORBA::Boolean theWithContact,
1092 CORBA::Boolean theWithCorrections)
1094 beginService( " GEOM_Superv_i::MakePipeWithShellSections" );
1095 MESSAGE("GEOM_Superv_i::MakePipeWithShellSections");
1097 GEOM::GEOM_Object_ptr anObj =
1098 my3DPrimOp->MakePipeWithShellSections(theBases, theSubBases,
1099 theLocations, thePath,
1100 theWithContact, theWithCorrections);
1101 endService( " GEOM_Superv_i::MakePipeWithShellSections" );
1106 //=============================================================================
1108 //=============================================================================
1109 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeShellsWithoutPath
1110 (const GEOM::ListOfGO& theBases,
1111 const GEOM::ListOfGO& theLocations)
1113 beginService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1114 MESSAGE("GEOM_Superv_i::MakePipeShellsWithoutPath");
1116 GEOM::GEOM_Object_ptr anObj =
1117 my3DPrimOp->MakePipeShellsWithoutPath(theBases,theLocations);
1118 endService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
1123 //=============================================================================
1125 //=============================================================================
1126 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1,
1127 GEOM::GEOM_Object_ptr theShape2)
1129 beginService( " GEOM_Superv_i::MakeFuse" );
1130 MESSAGE("GEOM_Superv_i::MakeFuse");
1132 GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeBoolean(theShape1, theShape2, 3);
1133 endService( " GEOM_Superv_i::MakeFuse" );
1137 //=============================================================================
1139 //=============================================================================
1140 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr theShapes,
1141 GEOM::GEOM_List_ptr theTools,
1142 GEOM::GEOM_List_ptr theKeepInside,
1143 GEOM::GEOM_List_ptr theRemoveInside,
1144 CORBA::Short theLimit,
1145 CORBA::Boolean theRemoveWebs,
1146 GEOM::GEOM_List_ptr theMaterials,
1147 CORBA::Short theKeepNonlimitShapes)
1149 beginService( " GEOM_Superv_i::MakePartition" );
1150 MESSAGE("GEOM_Superv_i::MakePartition");
1151 GEOM_List_i<GEOM::ListOfGO>* aListImplS =
1152 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in());
1153 GEOM_List_i<GEOM::ListOfGO>* aListImplT =
1154 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theTools, myPOA).in());
1155 GEOM_List_i<GEOM::ListOfGO>* aListImplKI =
1156 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theKeepInside, myPOA).in());
1157 GEOM_List_i<GEOM::ListOfGO>* aListImplRI =
1158 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theRemoveInside, myPOA).in());
1159 GEOM_List_i<GEOM::ListOfLong>* aListImplM =
1160 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theMaterials, myPOA).in());
1161 if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
1163 GEOM::GEOM_Object_ptr anObj =
1164 myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(),
1165 aListImplKI->GetList(), aListImplRI->GetList(),
1166 theLimit, theRemoveWebs, aListImplM->GetList(),
1167 theKeepNonlimitShapes);
1168 endService( " GEOM_Superv_i::MakePartition" );
1171 endService( " GEOM_Superv_i::MakePartition" );
1175 //=============================================================================
1176 // MakeHalfPartition:
1177 //=============================================================================
1178 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
1179 GEOM::GEOM_Object_ptr thePlane)
1181 beginService( " GEOM_Superv_i::MakeHalfPartition" );
1182 MESSAGE("GEOM_Superv_i::MakeHalfPartition");
1184 GEOM::GEOM_Object_ptr anObj = myBoolOp->MakeHalfPartition(theShape, thePlane);
1185 endService( " GEOM_Superv_i::MakeHalfPartition" );
1189 //============================== InsertOperations =============================
1190 //=============================================================================
1192 //=============================================================================
1193 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
1195 beginService( " GEOM_Superv_i::MakeCopy" );
1196 MESSAGE("GEOM_Superv_i::MakeCopy");
1198 GEOM::GEOM_Object_ptr anObj = myInsOp->MakeCopy(theOriginal);
1199 endService( " GEOM_Superv_i::MakeCopy" );
1203 //=============================================================================
1205 //=============================================================================
1206 void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject,
1207 const char* theFileName,
1208 const char* theFormatName)
1210 beginService( " GEOM_Superv_i::Export" );
1211 MESSAGE("GEOM_Superv_i::Export");
1213 myInsOp->Export(theObject, theFileName, theFormatName);
1214 endService( " GEOM_Superv_i::Export" );
1217 //=============================================================================
1219 //=============================================================================
1220 GEOM::GEOM_Object_ptr GEOM_Superv_i::Import (const char* theFileName,
1221 const char* theFormatName)
1223 beginService( " GEOM_Superv_i::Import" );
1224 MESSAGE("GEOM_Superv_i::Import");
1226 GEOM::GEOM_Object_ptr anObj = myInsOp->Import(theFileName, theFormatName);
1227 endService( " GEOM_Superv_i::Import" );
1231 //=============================================================================
1232 // ImportTranslators:
1233 //=============================================================================
1234 void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
1235 GEOM::string_array_out thePatterns)
1237 beginService( " GEOM_Superv_i::ImportTranslators" );
1238 MESSAGE("GEOM_Superv_i::ImportTranslators");
1240 myInsOp->ImportTranslators(theFormats, thePatterns);
1241 endService( " GEOM_Superv_i::ImportTranslators" );
1244 //=============================================================================
1245 // ExportTranslators:
1246 //=============================================================================
1247 void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
1248 GEOM::string_array_out thePatterns)
1250 beginService( " GEOM_Superv_i::ExportTranslators" );
1251 MESSAGE("GEOM_Superv_i::ExportTranslators");
1253 myInsOp->ExportTranslators(theFormats, thePatterns);
1254 endService( " GEOM_Superv_i::ExportTranslators" );
1257 //============================= TransformOperations ===========================
1258 //=============================================================================
1259 // TranslateTwoPoints:
1260 //=============================================================================
1261 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
1262 GEOM::GEOM_Object_ptr thePoint1,
1263 GEOM::GEOM_Object_ptr thePoint2)
1265 beginService( " GEOM_Superv_i::TranslateTwoPoints" );
1266 MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
1268 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
1269 endService( " GEOM_Superv_i::TranslateTwoPoints" );
1273 //=============================================================================
1274 // TranslateTwoPointsCopy:
1275 //=============================================================================
1276 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
1277 GEOM::GEOM_Object_ptr thePoint1,
1278 GEOM::GEOM_Object_ptr thePoint2)
1280 beginService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1281 MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
1283 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
1284 endService( " GEOM_Superv_i::TranslateTwoPointsCopy" );
1288 //=============================================================================
1290 //=============================================================================
1291 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
1292 CORBA::Double theDX,
1293 CORBA::Double theDY,
1294 CORBA::Double theDZ)
1296 beginService( " GEOM_Superv_i::TranslateDXDYDZ" );
1297 MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
1299 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
1300 endService( " GEOM_Superv_i::TranslateDXDYDZ" );
1304 //=============================================================================
1305 // TranslateDXDYDZCopy:
1306 //=============================================================================
1307 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
1308 CORBA::Double theDX,
1309 CORBA::Double theDY,
1310 CORBA::Double theDZ)
1312 beginService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1313 MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
1315 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
1316 endService( " GEOM_Superv_i::TranslateDXDYDZCopy" );
1320 //=============================================================================
1322 //=============================================================================
1323 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject,
1324 GEOM::GEOM_Object_ptr theVector)
1326 beginService( " GEOM_Superv_i::TranslateVector" );
1327 MESSAGE("GEOM_Superv_i::TranslateVector");
1329 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVector(theObject, theVector);
1330 endService( " GEOM_Superv_i::TranslateVector" );
1334 //=============================================================================
1335 // TranslateVectorCopy:
1336 //=============================================================================
1337 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
1338 GEOM::GEOM_Object_ptr theVector)
1340 beginService( " GEOM_Superv_i::TranslateVectorCopy" );
1341 MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
1343 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorCopy(theObject, theVector);
1344 endService( " GEOM_Superv_i::TranslateVectorCopy" );
1348 //=============================================================================
1349 // TranslateVectorDistance:
1350 //=============================================================================
1351 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
1352 GEOM::GEOM_Object_ptr theVector,
1353 CORBA::Double theDistance,
1354 CORBA::Boolean theCopy)
1356 beginService( " GEOM_Superv_i::TranslateVectorDistance" );
1357 MESSAGE("GEOM_Superv_i::TranslateVectorDistance");
1359 GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorDistance(theObject,
1360 theVector, theDistance, theCopy);
1361 endService( " GEOM_Superv_i::TranslateVectorDistance" );
1365 //=============================================================================
1366 // MultiTranslate1D:
1367 //=============================================================================
1368 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
1369 GEOM::GEOM_Object_ptr theVector,
1370 CORBA::Double theStep,
1371 CORBA::Long theNbTimes)
1373 beginService( " GEOM_Superv_i::MultiTranslate1D" );
1374 MESSAGE("GEOM_Superv_i::MultiTranslate1D");
1376 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
1377 endService( " GEOM_Superv_i::MultiTranslate1D" );
1381 //=============================================================================
1382 // MultiTranslate2D:
1383 //=============================================================================
1384 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
1385 GEOM::GEOM_Object_ptr theVector1,
1386 CORBA::Double theStep1,
1387 CORBA::Long theNbTimes1,
1388 GEOM::GEOM_Object_ptr theVector2,
1389 CORBA::Double theStep2,
1390 CORBA::Long theNbTimes2)
1392 beginService( " GEOM_Superv_i::MultiTranslate2D" );
1393 MESSAGE("GEOM_Superv_i::MultiTranslate2D");
1395 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
1396 theVector2, theStep2, theNbTimes2);
1397 endService( " GEOM_Superv_i::MultiTranslate2D" );
1401 //=============================================================================
1403 //=============================================================================
1404 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
1405 GEOM::GEOM_Object_ptr theAxis,
1406 CORBA::Double theAngle)
1408 beginService( " GEOM_Superv_i::Rotate" );
1409 MESSAGE("GEOM_Superv_i::Rotate");
1411 GEOM::GEOM_Object_ptr anObj = myTransfOp->Rotate(theObject, theAxis, theAngle);
1412 endService( " GEOM_Superv_i::Rotate" );
1416 //=============================================================================
1418 //=============================================================================
1419 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
1420 GEOM::GEOM_Object_ptr theAxis,
1421 CORBA::Double theAngle)
1423 beginService( " GEOM_Superv_i::RotateCopy" );
1424 MESSAGE("GEOM_Superv_i::RotateCopy");
1426 GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateCopy(theObject, theAxis, theAngle);
1427 endService( " GEOM_Superv_i::RotateCopy" );
1430 //=============================================================================
1431 // RotateThreePoints:
1432 //=============================================================================
1433 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
1434 GEOM::GEOM_Object_ptr theCentPoint,
1435 GEOM::GEOM_Object_ptr thePoint1,
1436 GEOM::GEOM_Object_ptr thePoint2)
1438 beginService( " GEOM_Superv_i::RotateThreePoints" );
1439 MESSAGE("GEOM_Superv_i::RotateThreePoints");
1441 GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2);
1442 endService( " GEOM_Superv_i::RotateThreePoints" );
1446 //=============================================================================
1447 // RotateThreePointsCopy:
1448 //=============================================================================
1449 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
1450 GEOM::GEOM_Object_ptr theCentPoint,
1451 GEOM::GEOM_Object_ptr thePoint1,
1452 GEOM::GEOM_Object_ptr thePoint2)
1454 beginService( " GEOM_Superv_i::RotateThreePointsCopy" );
1455 MESSAGE("GEOM_Superv_i::RotateThreePointsCopy");
1457 GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2);
1458 endService( " GEOM_Superv_i::RotateThreePointsCopy" );
1462 //=============================================================================
1464 //=============================================================================
1465 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1466 GEOM::GEOM_Object_ptr theAxis,
1467 CORBA::Long theNbTimes)
1469 beginService( " GEOM_Superv_i::MultiRotate1D" );
1470 MESSAGE("GEOM_Superv_i::MultiRotate1D");
1472 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
1473 endService( " GEOM_Superv_i::MultiRotate1D" );
1477 //=============================================================================
1479 //=============================================================================
1480 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1481 GEOM::GEOM_Object_ptr theAxis,
1482 CORBA::Double theAngle,
1483 CORBA::Long theNbTimes1,
1484 CORBA::Double theStep,
1485 CORBA::Long theNbTimes2)
1487 beginService( " GEOM_Superv_i::MultiRotate2D" );
1488 MESSAGE("GEOM_Superv_i::MultiRotate2D");
1490 GEOM::GEOM_Object_ptr anObj = myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
1491 endService( " GEOM_Superv_i::MultiRotate2D" );
1495 //=============================================================================
1497 //=============================================================================
1498 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject,
1499 GEOM::GEOM_Object_ptr thePlane)
1501 beginService( " GEOM_Superv_i::MirrorPlane" );
1502 MESSAGE("GEOM_Superv_i::MirrorPlane");
1504 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlane(theObject, thePlane);
1505 endService( " GEOM_Superv_i::MirrorPlane" );
1509 //=============================================================================
1511 //=============================================================================
1512 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
1513 GEOM::GEOM_Object_ptr thePlane)
1515 beginService( " GEOM_Superv_i::MirrorPlaneCopy" );
1516 MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
1518 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPlaneCopy(theObject, thePlane);
1519 endService( " GEOM_Superv_i::MirrorPlaneCopy" );
1523 //=============================================================================
1525 //=============================================================================
1526 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject,
1527 GEOM::GEOM_Object_ptr theAxis)
1529 beginService( " GEOM_Superv_i::MirrorAxis" );
1530 MESSAGE("GEOM_Superv_i::MirrorAxis");
1532 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxis(theObject, theAxis);
1533 endService( " GEOM_Superv_i::MirrorAxis" );
1537 //=============================================================================
1539 //=============================================================================
1540 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
1541 GEOM::GEOM_Object_ptr theAxis)
1543 beginService( " GEOM_Superv_i::MirrorAxisCopy" );
1544 MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
1546 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorAxisCopy(theObject, theAxis);
1547 endService( " GEOM_Superv_i::MirrorAxisCopy" );
1551 //=============================================================================
1553 //=============================================================================
1554 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject,
1555 GEOM::GEOM_Object_ptr thePoint)
1557 beginService( " GEOM_Superv_i::MirrorPoint" );
1558 MESSAGE("GEOM_Superv_i::MirrorPoint");
1560 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPoint(theObject, thePoint);
1561 endService( " GEOM_Superv_i::MirrorPoint" );
1565 //=============================================================================
1567 //=============================================================================
1568 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
1569 GEOM::GEOM_Object_ptr thePoint)
1571 beginService( " GEOM_Superv_i::MirrorPoint" );
1572 MESSAGE("GEOM_Superv_i::MirrorPointCopy");
1574 GEOM::GEOM_Object_ptr anObj = myTransfOp->MirrorPointCopy(theObject, thePoint);
1575 endService( " GEOM_Superv_i::MirrorPoint" );
1579 //=============================================================================
1581 //=============================================================================
1582 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject,
1583 CORBA::Double theOffset)
1585 beginService( " GEOM_Superv_i::OffsetShape" );
1586 MESSAGE("GEOM_Superv_i::OffsetShape");
1588 GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset);
1589 endService( " GEOM_Superv_i::OffsetShape" );
1593 //=============================================================================
1595 //=============================================================================
1596 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
1597 CORBA::Double theOffset)
1599 beginService( " GEOM_Superv_i::OffsetShapeCopy" );
1600 MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1602 GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset);
1603 endService( " GEOM_Superv_i::OffsetShapeCopy" );
1607 //=============================================================================
1609 //=============================================================================
1610 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject,
1611 GEOM::GEOM_Object_ptr thePoint,
1612 CORBA::Double theFactor)
1614 beginService( " GEOM_Superv_i::ScaleShape" );
1615 MESSAGE("GEOM_Superv_i::ScaleShape");
1617 GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShape(theObject, thePoint, theFactor);
1618 endService( " GEOM_Superv_i::ScaleShape" );
1622 //=============================================================================
1624 //=============================================================================
1625 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
1626 GEOM::GEOM_Object_ptr thePoint,
1627 CORBA::Double theFactor)
1629 beginService( " GEOM_Superv_i::ScaleShapeCopy" );
1630 MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
1632 GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
1633 endService( " GEOM_Superv_i::ScaleShapeCopy" );
1637 //=============================================================================
1638 // ScaleShapeAlongAxes:
1639 //=============================================================================
1640 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject,
1641 GEOM::GEOM_Object_ptr thePoint,
1642 CORBA::Double theFactorX,
1643 CORBA::Double theFactorY,
1644 CORBA::Double theFactorZ)
1646 beginService( " GEOM_Superv_i::ScaleShapeAlongAxes" );
1647 MESSAGE("GEOM_Superv_i::ScaleShapeAlongAxes");
1649 GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeAlongAxes
1650 (theObject, thePoint, theFactorX, theFactorY, theFactorZ);
1651 endService( " GEOM_Superv_i::ScaleShapeAlongAxes" );
1655 //=============================================================================
1656 // ScaleShapeAlongAxesCopy:
1657 //=============================================================================
1658 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject,
1659 GEOM::GEOM_Object_ptr thePoint,
1660 CORBA::Double theFactorX,
1661 CORBA::Double theFactorY,
1662 CORBA::Double theFactorZ)
1664 beginService( " GEOM_Superv_i::ScaleShapeAlongAxesCopy" );
1665 MESSAGE("GEOM_Superv_i::ScaleShapeAlongAxesCopy");
1667 GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeAlongAxesCopy
1668 (theObject, thePoint, theFactorX, theFactorY, theFactorZ);
1669 endService( " GEOM_Superv_i::ScaleShapeAlongAxesCopy" );
1673 //=============================================================================
1675 //=============================================================================
1676 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
1677 GEOM::GEOM_Object_ptr theStartLCS,
1678 GEOM::GEOM_Object_ptr theEndLCS)
1680 beginService( " GEOM_Superv_i::PositionShape" );
1681 MESSAGE("GEOM_Superv_i::PositionShape");
1683 GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
1684 endService( " GEOM_Superv_i::PositionShape" );
1688 //=============================================================================
1689 // PositionShapeCopy:
1690 //=============================================================================
1691 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
1692 GEOM::GEOM_Object_ptr theStartLCS,
1693 GEOM::GEOM_Object_ptr theEndLCS)
1695 beginService( " GEOM_Superv_i::PositionShapeCopy" );
1696 MESSAGE("GEOM_Superv_i::PositionShapeCopy");
1698 GEOM::GEOM_Object_ptr anObj = myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
1699 endService( " GEOM_Superv_i::PositionShapeCopy" );
1703 //=============================== ShapesOperations ============================
1704 //=============================================================================
1706 //=============================================================================
1707 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
1708 GEOM::GEOM_Object_ptr thePnt2)
1710 beginService( " GEOM_Superv_i::MakeEdge" );
1711 MESSAGE("GEOM_Superv_i::MakeEdge");
1713 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeEdge(thePnt1, thePnt2);
1714 endService( " GEOM_Superv_i::MakeEdge" );
1718 //=============================================================================
1720 //=============================================================================
1721 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires)
1723 beginService( " GEOM_Superv_i::MakeWire" );
1724 MESSAGE("GEOM_Superv_i::MakeWire");
1725 if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW =
1726 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
1728 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeWire(aListImplEW->GetList());
1729 endService( " GEOM_Superv_i::MakeWire" );
1732 endService( " GEOM_Superv_i::MakeWire" );
1736 //=============================================================================
1738 //=============================================================================
1739 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
1740 CORBA::Boolean isPlanarWanted)
1742 beginService( " GEOM_Superv_i::MakeFace" );
1743 MESSAGE("GEOM_Superv_i::MakeFace");
1745 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFace(theWire, isPlanarWanted);
1746 endService( " GEOM_Superv_i::MakeFace" );
1750 //=============================================================================
1752 //=============================================================================
1753 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires,
1754 CORBA::Boolean isPlanarWanted)
1756 beginService( " GEOM_Superv_i::MakeFaceWires" );
1757 MESSAGE("GEOM_Superv_i::MakeFaceWires");
1758 if (GEOM_List_i<GEOM::ListOfGO>* aListImplW =
1759 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
1761 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
1762 endService( " GEOM_Superv_i::MakeFaceWires" );
1765 endService( " GEOM_Superv_i::MakeFaceWires" );
1769 //=============================================================================
1771 //=============================================================================
1772 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells)
1774 beginService( " GEOM_Superv_i::MakeShell" );
1775 MESSAGE("GEOM_Superv_i::MakeShell");
1776 if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS =
1777 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
1779 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeShell(aListImplFS->GetList());
1780 endService( " GEOM_Superv_i::MakeShell" );
1783 endService( " GEOM_Superv_i::MakeShell" );
1787 //=============================================================================
1789 //=============================================================================
1790 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
1792 beginService( " GEOM_Superv_i::MakeSolidShell" );
1793 MESSAGE("GEOM_Superv_i::MakeSolidShell");
1795 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShell(theShell);
1796 endService( " GEOM_Superv_i::MakeSolidShell" );
1800 //=============================================================================
1802 //=============================================================================
1803 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells)
1805 beginService( " GEOM_Superv_i::MakeSolidShells" );
1806 MESSAGE("GEOM_Superv_i::MakeSolidShells");
1807 if (GEOM_List_i<GEOM::ListOfGO>* aListImplS =
1808 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
1810 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidShells(aListImplS->GetList());
1811 endService( " GEOM_Superv_i::MakeSolidShells" );
1814 endService( " GEOM_Superv_i::MakeSolidShells" );
1818 //=============================================================================
1820 //=============================================================================
1821 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes)
1823 beginService( " GEOM_Superv_i::MakeCompound" );
1824 MESSAGE("GEOM_Superv_i::MakeCompound");
1825 if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
1826 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
1828 GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeCompound(aListImpl->GetList());
1829 endService( " GEOM_Superv_i::MakeCompound" );
1832 endService( " GEOM_Superv_i::MakeCompound" );
1836 //=============================================================================
1838 //=============================================================================
1839 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
1840 CORBA::Double theTolerance,
1841 CORBA::Boolean doKeepNonSolids)
1843 beginService( " GEOM_Superv_i::MakeGlueFaces" );
1844 MESSAGE("GEOM_Superv_i::MakeGlueFaces");
1846 GEOM::GEOM_Object_ptr anObj =
1847 myShapesOp->MakeGlueFaces(theShape, theTolerance, doKeepNonSolids);
1848 endService( " GEOM_Superv_i::MakeGlueFaces" );
1852 //=============================================================================
1854 //=============================================================================
1855 GEOM::GEOM_List_ptr GEOM_Superv_i::GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
1856 CORBA::Double theTolerance)
1858 beginService( " GEOM_Superv_i::GetGlueFaces" );
1859 MESSAGE("GEOM_Superv_i::GetGlueFaces");
1861 GEOM::ListOfGO* aList = myShapesOp->GetGlueFaces(theShape, theTolerance);
1862 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1863 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1864 endService( " GEOM_Superv_i::GetGlueFaces" );
1865 return aListPtr->_this();
1868 //=============================================================================
1869 // MakeGlueFacesByList:
1870 //=============================================================================
1871 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
1872 CORBA::Double theTolerance,
1873 const GEOM::ListOfGO& theFaces,
1874 CORBA::Boolean doKeepNonSolids)
1876 beginService( " GEOM_Superv_i::MakeGlueFacesByList" );
1877 MESSAGE("GEOM_Superv_i::MakeGlueFacesByList");
1879 GEOM::GEOM_Object_ptr anObj =
1880 myShapesOp->MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids);
1881 endService( " GEOM_Superv_i::MakeGlueFacesByList" );
1885 //=============================================================================
1887 //=============================================================================
1888 GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
1889 CORBA::Long theShapeType,
1890 CORBA::Boolean isSorted)
1892 beginService( " GEOM_Superv_i::MakeExplode" );
1893 MESSAGE("GEOM_Superv_i::MakeExplode");
1896 GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
1897 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1898 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1899 endService( " GEOM_Superv_i::MakeExplode" );
1900 return aListPtr->_this();
1903 //=============================================================================
1905 //=============================================================================
1906 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
1908 beginService( " GEOM_Superv_i::NumberOfFaces" );
1909 MESSAGE("GEOM_Superv_i::NumberOfFaces");
1911 CORBA::Long aRes = myShapesOp->NumberOfFaces(theShape);
1912 endService( " GEOM_Superv_i::NumberOfFaces" );
1916 //=============================================================================
1918 //=============================================================================
1919 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
1921 beginService( " GEOM_Superv_i::NumberOfEdges" );
1922 MESSAGE("GEOM_Superv_i::NumberOfEdges");
1924 CORBA::Long aRes = myShapesOp->NumberOfEdges(theShape);
1925 endService( " GEOM_Superv_i::NumberOfEdges" );
1930 //=============================================================================
1931 // ChangeOrientation:
1932 //=============================================================================
1933 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
1935 beginService( " GEOM_Superv_i::ChangeOrientation" );
1936 MESSAGE("GEOM_Superv_i::ChangeOrientation");
1938 GEOM::GEOM_Object_ptr anObj = myShapesOp->ChangeOrientation(theShape);
1939 endService( " GEOM_Superv_i::ChangeOrientation" );
1944 //=============================================================================
1945 // GetShapesOnShape:
1946 //=============================================================================
1947 GEOM::GEOM_List_ptr GEOM_Superv_i::GetShapesOnShape
1948 (GEOM::GEOM_Object_ptr theCheckShape,
1949 GEOM::GEOM_Object_ptr theShape,
1950 CORBA::Short theShapeType,
1951 GEOM::shape_state theState)
1953 beginService( " GEOM_Superv_i::GetShapesOnShape" );
1954 MESSAGE("GEOM_Superv_i::GetShapesOnShape");
1956 GEOM::ListOfGO* aList =
1957 myShapesOp->GetShapesOnShape(theCheckShape, theShape, theShapeType, theState);
1958 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
1959 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
1960 endService( " GEOM_Superv_i::GetShapesOnShape" );
1961 return aListPtr->_this();
1965 //=============================================================================
1966 // GetShapesOnShapeAsCompound:
1967 //=============================================================================
1968 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetShapesOnShapeAsCompound
1969 (GEOM::GEOM_Object_ptr theCheckShape,
1970 GEOM::GEOM_Object_ptr theShape,
1971 CORBA::Short theShapeType,
1972 GEOM::shape_state theState)
1974 beginService( " GEOM_Superv_i::GetShapesOnShapeAsCompound" );
1975 MESSAGE("GEOM_Superv_i::GetShapesOnShapeAsCompound");
1977 GEOM::GEOM_Object_ptr anObj =
1978 myShapesOp->GetShapesOnShapeAsCompound(theCheckShape, theShape, theShapeType, theState);
1979 endService( " GEOM_Superv_i::GetShapesOnShapeAsCompound" );
1984 //=============================== BlocksOperations ============================
1985 //=============================================================================
1986 // MakeQuad4Vertices:
1987 //=============================================================================
1988 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
1989 GEOM::GEOM_Object_ptr thePnt2,
1990 GEOM::GEOM_Object_ptr thePnt3,
1991 GEOM::GEOM_Object_ptr thePnt4)
1993 beginService( " GEOM_Superv_i::MakeQuad4Vertices" );
1994 MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
1996 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
1997 endService( " GEOM_Superv_i::MakeQuad4Vertices" );
2001 //=============================================================================
2003 //=============================================================================
2004 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
2005 GEOM::GEOM_Object_ptr theEdge2,
2006 GEOM::GEOM_Object_ptr theEdge3,
2007 GEOM::GEOM_Object_ptr theEdge4)
2009 beginService( " GEOM_Superv_i::MakeQuad" );
2010 MESSAGE("GEOM_Superv_i::MakeQuad");
2012 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
2013 endService( " GEOM_Superv_i::MakeQuad" );
2017 //=============================================================================
2019 //=============================================================================
2020 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
2021 GEOM::GEOM_Object_ptr theEdge2)
2023 beginService( " GEOM_Superv_i::MakeQuad2Edges" );
2024 MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
2026 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
2027 endService( " GEOM_Superv_i::MakeQuad2Edges" );
2031 //=============================================================================
2033 //=============================================================================
2034 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
2035 GEOM::GEOM_Object_ptr theFace2,
2036 GEOM::GEOM_Object_ptr theFace3,
2037 GEOM::GEOM_Object_ptr theFace4,
2038 GEOM::GEOM_Object_ptr theFace5,
2039 GEOM::GEOM_Object_ptr theFace6)
2041 beginService( " GEOM_Superv_i::MakeHexa" );
2042 MESSAGE("GEOM_Superv_i::MakeHexa");
2044 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
2045 endService( " GEOM_Superv_i::MakeHexa" );
2049 //=============================================================================
2051 //=============================================================================
2052 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
2053 GEOM::GEOM_Object_ptr theFace2)
2055 beginService( " GEOM_Superv_i::MakeHexa2Faces" );
2056 MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
2058 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
2059 endService( " GEOM_Superv_i::MakeHexa2Faces" );
2063 //=============================================================================
2065 //=============================================================================
2066 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
2070 CORBA::Double theEpsilon)
2072 beginService( " GEOM_Superv_i::GetPoint" );
2073 MESSAGE("GEOM_Superv_i::GetPoint");
2075 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
2076 endService( " GEOM_Superv_i::GetPoint" );
2080 //=============================================================================
2082 //=============================================================================
2083 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
2084 GEOM::GEOM_Object_ptr thePoint1,
2085 GEOM::GEOM_Object_ptr thePoint2)
2087 beginService( " GEOM_Superv_i::GetEdge" );
2088 MESSAGE("GEOM_Superv_i::GetEdge");
2090 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
2091 endService( " GEOM_Superv_i::GetEdge" );
2095 //=============================================================================
2096 // GetEdgeNearPoint:
2097 //=============================================================================
2098 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
2099 GEOM::GEOM_Object_ptr thePoint)
2101 beginService( " GEOM_Superv_i::GetEdgeNearPoint" );
2102 MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
2104 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
2105 endService( " GEOM_Superv_i::GetEdgeNearPoint" );
2109 //=============================================================================
2111 //=============================================================================
2112 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
2113 GEOM::GEOM_Object_ptr thePoint1,
2114 GEOM::GEOM_Object_ptr thePoint2,
2115 GEOM::GEOM_Object_ptr thePoint3,
2116 GEOM::GEOM_Object_ptr thePoint4)
2118 beginService( " GEOM_Superv_i::GetFaceByPoints" );
2119 MESSAGE("GEOM_Superv_i::GetFaceByPoints");
2121 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
2122 endService( " GEOM_Superv_i::GetFaceByPoints" );
2126 //=============================================================================
2128 //=============================================================================
2129 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
2130 GEOM::GEOM_Object_ptr theEdge1,
2131 GEOM::GEOM_Object_ptr theEdge2)
2133 beginService( " GEOM_Superv_i::GetFaceByEdges" );
2134 MESSAGE("GEOM_Superv_i::GetFaceByEdges");
2136 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
2137 endService( " GEOM_Superv_i::GetFaceByEdges" );
2141 //=============================================================================
2143 //=============================================================================
2144 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
2145 GEOM::GEOM_Object_ptr theFace)
2147 beginService( " GEOM_Superv_i::GetOppositeFace" );
2148 MESSAGE("GEOM_Superv_i::GetOppositeFace");
2150 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetOppositeFace(theBlock, theFace);
2151 endService( " GEOM_Superv_i::GetOppositeFace" );
2155 //=============================================================================
2156 // GetFaceNearPoint:
2157 //=============================================================================
2158 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
2159 GEOM::GEOM_Object_ptr thePoint)
2161 beginService( " GEOM_Superv_i::GetFaceNearPoint" );
2162 MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
2164 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceNearPoint(theShape, thePoint);
2165 endService( " GEOM_Superv_i::GetFaceNearPoint" );
2169 //=============================================================================
2170 // GetFaceByNormale:
2171 //=============================================================================
2172 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
2173 GEOM::GEOM_Object_ptr theVector)
2175 beginService( " GEOM_Superv_i::GetFaceByNormale" );
2176 MESSAGE("GEOM_Superv_i::GetFaceByNormale");
2178 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetFaceByNormale(theBlock, theVector);
2179 endService( " GEOM_Superv_i::GetFaceByNormale" );
2183 //=============================================================================
2184 // IsCompoundOfBlocks:
2185 //=============================================================================
2186 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2187 CORBA::Long theMinNbFaces,
2188 CORBA::Long theMaxNbFaces,
2189 CORBA::Long& theNbBlocks)
2191 beginService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2192 MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
2194 CORBA::Boolean aRes = myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
2195 endService( " GEOM_Superv_i::IsCompoundOfBlocks" );
2199 //=============================================================================
2200 // CheckCompoundOfBlocks:
2201 //=============================================================================
2202 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks
2203 (GEOM::GEOM_Object_ptr theCompound,
2204 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
2206 beginService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2207 MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
2209 CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
2210 endService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
2214 //=============================================================================
2216 //=============================================================================
2217 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
2218 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
2220 beginService( " GEOM_Superv_i::PrintBCErrors" );
2221 MESSAGE("GEOM_Superv_i::PrintBCErrors");
2223 char* anErrors = myBlocksOp->PrintBCErrors(theCompound, theErrors);
2224 endService( " GEOM_Superv_i::PrintBCErrors" );
2228 //=============================================================================
2229 // ExplodeCompoundOfBlocks:
2230 //=============================================================================
2231 GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
2232 CORBA::Long theMinNbFaces,
2233 CORBA::Long theMaxNbFaces)
2235 beginService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2236 MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
2238 GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
2239 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2240 endService( " GEOM_Superv_i::ExplodeCompoundOfBlocks" );
2241 return aListPtr->_this();
2244 //=============================================================================
2245 // GetBlockNearPoint:
2246 //=============================================================================
2247 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
2248 GEOM::GEOM_Object_ptr thePoint)
2250 beginService( " GEOM_Superv_i::GetBlockNearPoint" );
2251 MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
2253 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
2254 endService( " GEOM_Superv_i::GetBlockNearPoint" );
2258 //=============================================================================
2260 //=============================================================================
2261 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
2262 GEOM::GEOM_List_ptr theParts)
2264 beginService( " GEOM_Superv_i::GetBlockByParts" );
2265 MESSAGE("GEOM_Superv_i::GetBlockByParts");
2266 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2267 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2269 GEOM::GEOM_Object_ptr anObj = myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
2270 endService( " GEOM_Superv_i::GetBlockByParts" );
2273 endService( " GEOM_Superv_i::GetBlockByParts" );
2277 //=============================================================================
2278 // GetBlocksByParts:
2279 //=============================================================================
2280 GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
2281 GEOM::GEOM_List_ptr theParts)
2283 beginService( " GEOM_Superv_i::GetBlocksByParts" );
2284 MESSAGE("GEOM_Superv_i::GetBlocksByParts");
2285 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2286 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
2289 GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
2290 GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
2291 endService( " GEOM_Superv_i::GetBlocksByParts" );
2292 return aListPtr->_this();
2294 endService( " GEOM_Superv_i::GetBlocksByParts" );
2298 //=============================================================================
2299 // MakeMultiTransformation1D:
2300 //=============================================================================
2301 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
2302 CORBA::Long theDirFace1,
2303 CORBA::Long theDirFace2,
2304 CORBA::Long theNbTimes)
2306 beginService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2307 MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
2309 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
2310 endService( " GEOM_Superv_i::MakeMultiTransformation1D" );
2314 //=============================================================================
2315 // MakeMultiTransformation2D:
2316 //=============================================================================
2317 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D
2318 (GEOM::GEOM_Object_ptr theBlock,
2319 CORBA::Long theDirFace1U,
2320 CORBA::Long theDirFace2U,
2321 CORBA::Long theNbTimesU,
2322 CORBA::Long theDirFace1V,
2323 CORBA::Long theDirFace2V,
2324 CORBA::Long theNbTimesV)
2326 beginService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2327 MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
2329 GEOM::GEOM_Object_ptr anObj = myBlocksOp->MakeMultiTransformation2D(theBlock,
2330 theDirFace1U, theDirFace2U, theNbTimesU,
2331 theDirFace1V, theDirFace2V, theNbTimesV);
2332 endService( " GEOM_Superv_i::MakeMultiTransformation2D" );
2336 //=============================== CurvesOperations ============================
2337 //=============================================================================
2338 // MakeCirclePntVecR:
2339 //=============================================================================
2340 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
2341 GEOM::GEOM_Object_ptr theVector,
2344 beginService( " GEOM_Superv_i::MakeCirclePntVecR" );
2345 MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
2347 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
2348 endService( " GEOM_Superv_i::MakeCirclePntVecR" );
2352 //=============================================================================
2353 // MakeCircleThreePnt:
2354 //=============================================================================
2355 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
2356 GEOM::GEOM_Object_ptr thePnt2,
2357 GEOM::GEOM_Object_ptr thePnt3)
2359 beginService( " GEOM_Superv_i::MakeCircleThreePnt" );
2360 MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
2362 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
2363 endService( " GEOM_Superv_i::MakeCircleThreePnt" );
2366 //=============================================================================
2367 // MakeCircleCenter2Pnt:
2368 //=============================================================================
2369 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
2370 GEOM::GEOM_Object_ptr thePnt2,
2371 GEOM::GEOM_Object_ptr thePnt3)
2373 beginService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2374 MESSAGE("GEOM_Superv_i::MakeCircleCenter2Pnt");
2376 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3);
2377 endService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
2381 //=============================================================================
2383 //=============================================================================
2384 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
2385 GEOM::GEOM_Object_ptr theVector,
2386 CORBA::Double theRMajor,
2387 CORBA::Double theRMinor)
2389 beginService( " GEOM_Superv_i::MakeEllipse" );
2390 MESSAGE("GEOM_Superv_i::MakeEllipse");
2392 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
2393 endService( " GEOM_Superv_i::MakeEllipse" );
2397 //=============================================================================
2399 //=============================================================================
2400 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
2401 GEOM::GEOM_Object_ptr thePnt2,
2402 GEOM::GEOM_Object_ptr thePnt3)
2404 beginService( " GEOM_Superv_i::MakeArc" );
2405 MESSAGE("GEOM_Superv_i::MakeArc");
2407 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
2408 endService( " GEOM_Superv_i::MakeArc" );
2412 //=============================================================================
2414 //=============================================================================
2415 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
2416 GEOM::GEOM_Object_ptr thePnt1,
2417 GEOM::GEOM_Object_ptr thePnt2,
2418 CORBA::Boolean theSense)
2420 beginService( " GEOM_Superv_i::MakeArcCenter" );
2421 MESSAGE("GEOM_Superv_i::MakeArcCenter");
2423 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeArcCenter(theCenter, thePnt1, thePnt2,theSense);
2424 endService( " GEOM_Superv_i::MakeArcCenter" );
2428 //=============================================================================
2430 //=============================================================================
2431 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints)
2433 beginService( " GEOM_Superv_i::MakePolyline" );
2434 MESSAGE("GEOM_Superv_i::MakePolyline");
2435 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2436 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2438 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakePolyline(aListImplP->GetList());
2439 endService( " GEOM_Superv_i::MakePolyline" );
2442 endService( " GEOM_Superv_i::MakePolyline" );
2446 //=============================================================================
2447 // MakeSplineBezier:
2448 //=============================================================================
2449 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints)
2451 beginService( " GEOM_Superv_i::MakeSplineBezier" );
2452 MESSAGE("GEOM_Superv_i::MakeSplineBezier");
2453 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2454 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2456 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineBezier(aListImplP->GetList());
2457 endService( " GEOM_Superv_i::MakeSplineBezier" );
2460 endService( " GEOM_Superv_i::MakeSplineBezier" );
2464 //=============================================================================
2465 // MakeSplineInterpolation:
2466 //=============================================================================
2467 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints)
2469 beginService( " GEOM_Superv_i::MakeSplineInterpolation" );
2470 MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
2471 if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
2472 dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
2474 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
2475 endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2478 endService( " GEOM_Superv_i::MakeSplineInterpolation" );
2482 //=============================================================================
2484 //=============================================================================
2485 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand,
2486 GEOM::GEOM_List_ptr theWorkingPlane)
2488 beginService( " GEOM_Superv_i::MakeSketcher" );
2489 MESSAGE("GEOM_Superv_i::MakeSketcher");
2490 if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP =
2491 dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
2493 GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
2494 endService( " GEOM_Superv_i::MakeSketcher" );
2497 endService( " GEOM_Superv_i::MakeSketcher" );
2501 //=============================== LocalOperations =============================
2502 //=============================================================================
2504 //=============================================================================
2505 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
2508 beginService( " GEOM_Superv_i::MakeFilletAll" );
2509 MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
2511 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletAll(theShape, theR);
2512 endService( " GEOM_Superv_i::MakeFilletAll" );
2516 //=============================================================================
2518 //=============================================================================
2519 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape,
2521 GEOM::GEOM_List_ptr theEdges)
2523 beginService( " GEOM_Superv_i::MakeFilletEdges" );
2524 MESSAGE("GEOM_Superv_i::MakeFilletEdges");
2525 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
2526 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2528 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
2529 endService( " GEOM_Superv_i::MakeFilletEdges" );
2532 endService( " GEOM_Superv_i::MakeFilletEdges" );
2536 //=============================================================================
2537 // MakeFilletEdges R1 R2:
2538 //=============================================================================
2539 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape,
2540 CORBA::Double theR1,
2541 CORBA::Double theR2,
2542 GEOM::GEOM_List_ptr theEdges)
2544 beginService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2545 MESSAGE("GEOM_Superv_i::MakeFilletEdgesR1R2");
2546 if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
2547 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2549 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdgesR1R2(theShape, theR1,
2550 theR2, aListImplE->GetList());
2551 endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2554 endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
2558 //=============================================================================
2560 //=============================================================================
2561 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape,
2563 GEOM::GEOM_List_ptr theFaces)
2565 beginService( " GEOM_Superv_i::MakeFilletFaces" );
2566 MESSAGE("GEOM_Superv_i::MakeFilletFaces");
2567 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2568 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2570 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
2571 endService( " GEOM_Superv_i::MakeFilletFaces" );
2574 endService( " GEOM_Superv_i::MakeFilletFaces" );
2578 //=============================================================================
2579 // MakeFilletFaces R1 R2:
2580 //=============================================================================
2581 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape,
2582 CORBA::Double theR1,
2583 CORBA::Double theR2,
2584 GEOM::GEOM_List_ptr theFaces)
2586 beginService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2587 MESSAGE("GEOM_Superv_i::MakeFilletFacesR1R2");
2588 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2589 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2591 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFacesR1R2(theShape, theR1, theR2,
2592 aListImplF->GetList());
2593 endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2596 endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
2600 //=============================================================================
2602 //=============================================================================
2603 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
2605 beginService( " GEOM_Superv_i::MakeChamferAll" );
2606 MESSAGE("GEOM_Superv_i::MakeChamferAll");
2608 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferAll(theShape, theD);
2609 endService( " GEOM_Superv_i::MakeChamferAll" );
2613 //=============================================================================
2615 //=============================================================================
2616 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
2617 CORBA::Double theD1, CORBA::Double theD2,
2618 CORBA::Long theFace1, CORBA::Long theFace2)
2620 beginService( " GEOM_Superv_i::MakeChamferEdge" );
2621 MESSAGE("GEOM_Superv_i::MakeChamferEdge");
2623 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
2624 endService( " GEOM_Superv_i::MakeChamferEdge" );
2628 //=============================================================================
2629 // MakeChamferEdgeAD:
2630 //=============================================================================
2631 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
2632 CORBA::Double theD, CORBA::Double theAngle,
2633 CORBA::Long theFace1, CORBA::Long theFace2)
2635 beginService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2636 MESSAGE("GEOM_Superv_i::MakeChamferEdgeAD");
2638 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2);
2639 endService( " GEOM_Superv_i::MakeChamferEdgeAD" );
2643 //=============================================================================
2644 // MakeChamferFaces:
2645 //=============================================================================
2646 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
2647 CORBA::Double theD1, CORBA::Double theD2,
2648 GEOM::GEOM_List_ptr theFaces)
2650 beginService( " GEOM_Superv_i::MakeChamferFaces" );
2651 MESSAGE("GEOM_Superv_i::MakeChamferFaces");
2652 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2653 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2655 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
2656 endService( " GEOM_Superv_i::MakeChamferFaces" );
2659 endService( " GEOM_Superv_i::MakeChamferFaces" );
2663 //=============================================================================
2664 // MakeChamferFacesAD:
2665 //=============================================================================
2666 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
2667 CORBA::Double theD, CORBA::Double theAngle,
2668 GEOM::GEOM_List_ptr theFaces)
2670 beginService( " GEOM_Superv_i::MakeChamferFacesAD" );
2671 MESSAGE("GEOM_Superv_i::MakeChamferFacesAD");
2672 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2673 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
2675 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFacesAD(theShape, theD, theAngle, aListImplF->GetList());
2676 endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2679 endService( " GEOM_Superv_i::MakeChamferFacesAD" );
2683 //=============================================================================
2684 // MakeChamferEdges:
2685 //=============================================================================
2686 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
2687 CORBA::Double theD1, CORBA::Double theD2,
2688 GEOM::GEOM_List_ptr theEdges)
2690 beginService( " GEOM_Superv_i::MakeChamferEdges" );
2691 MESSAGE("GEOM_Superv_i::MakeChamferEdges");
2692 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2693 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2695 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdges(theShape, theD1, theD2, aListImplF->GetList());
2696 endService( " GEOM_Superv_i::MakeChamferEdges" );
2699 endService( " GEOM_Superv_i::MakeChamferEdges" );
2703 //=============================================================================
2704 // MakeChamferEdgesAD:
2705 //=============================================================================
2706 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
2707 CORBA::Double theD, CORBA::Double theAngle,
2708 GEOM::GEOM_List_ptr theEdges)
2710 beginService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2711 MESSAGE("GEOM_Superv_i::MakeChamferEdgesAD");
2712 if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
2713 dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
2715 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgesAD(theShape, theD, theAngle, aListImplF->GetList());
2716 endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2719 endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
2723 //=============================================================================
2725 //=============================================================================
2726 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
2727 CORBA::Double theWeight,
2728 CORBA::Double theWaterDensity,
2729 CORBA::Double theMeshingDeflection)
2731 beginService( " GEOM_Superv_i::MakeArchimede" );
2732 MESSAGE("GEOM_Superv_i::MakeArchimede");
2734 GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
2735 endService( " GEOM_Superv_i::MakeArchimede" );
2739 //=============================================================================
2740 // GetSubShapeIndexMakeFilletAll:
2741 //=============================================================================
2742 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
2743 GEOM::GEOM_Object_ptr theSubShape)
2745 beginService( " GEOM_Superv_i::GetSubShapeIndex" );
2746 MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
2748 CORBA::Long aRes = myLocalOp->GetSubShapeIndex(theShape, theSubShape);
2749 endService( " GEOM_Superv_i::GetSubShapeIndex" );
2753 //=============================== GroupOperations =============================
2754 //=============================================================================
2756 //=============================================================================
2757 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
2758 CORBA::Long theShapeType)
2760 beginService( " GEOM_Superv_i::CreateGroup" );
2761 MESSAGE("GEOM_Superv_i::CreateGroup");
2763 GEOM::GEOM_Object_ptr anObj = myGroupOp->CreateGroup(theMainShape, theShapeType);
2764 endService( " GEOM_Superv_i::CreateGroup" );
2768 //=============================================================================
2770 //=============================================================================
2771 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup,
2772 CORBA::Long theSubShapeId)
2774 beginService( " GEOM_Superv_i::AddObject" );
2775 MESSAGE("GEOM_Superv_i::AddObject");
2777 myGroupOp->AddObject(theGroup, theSubShapeId);
2778 endService( " GEOM_Superv_i::AddObject" );
2781 //=============================================================================
2783 //=============================================================================
2784 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup,
2785 CORBA::Long theSubShapeId)
2787 beginService( " GEOM_Superv_i::RemoveObject" );
2788 MESSAGE("GEOM_Superv_i::RemoveObject");
2790 myGroupOp->RemoveObject(theGroup, theSubShapeId);
2791 endService( " GEOM_Superv_i::RemoveObject" );
2794 //=============================================================================
2796 //=============================================================================
2797 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
2799 beginService( " GEOM_Superv_i::GetType" );
2800 MESSAGE("GEOM_Superv_i::GetType");
2802 CORBA::Long aResult = myGroupOp->GetType(theGroup);
2803 endService( " GEOM_Superv_i::GetType" );
2807 //=============================================================================
2809 //=============================================================================
2810 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
2812 beginService( " GEOM_Superv_i::GetMainShape" );
2813 MESSAGE("GEOM_Superv_i::GetMainShape");
2815 GEOM::GEOM_Object_ptr anObj = myGroupOp->GetMainShape(theGroup);
2816 endService( " GEOM_Superv_i::GetMainShape" );
2820 //=============================================================================
2822 //=============================================================================
2823 GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
2825 beginService( " GEOM_Superv_i::GetObjects" );
2826 MESSAGE("GEOM_Superv_i::GetObjects");
2829 GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
2830 GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
2831 MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
2832 endService( " GEOM_Superv_i::GetObjects" );
2833 return aListPtr->_this();
2836 //=====================================================================================
2838 //=====================================================================================
2841 PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
2842 PortableServer::POA_ptr poa,
2843 PortableServer::ObjectId * contId,
2844 const char *instanceName,
2845 const char * interfaceName)
2847 GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
2848 //Don't understand the reason why this component is registered ???
2849 // myGEOM_Superv_i->register_name("/myGEOM_Superv");
2850 return myGEOM_Superv_i->getId() ;