3 #include "GEOM_Superv_i.hh"
5 //=============================================================================
7 //=============================================================================
8 GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
9 PortableServer::POA_ptr poa,
10 PortableServer::ObjectId * contId,
11 const char *instanceName,
12 const char *interfaceName) :
13 Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
15 MESSAGE("GEOM_Superv_i::GEOM_Superv_i");
18 _id = _poa->activate_object(_thisObj);
19 name_service = new SALOME_NamingService(_orb);
21 myGeomEngine = GEOM::GEOM_Gen::_nil();
24 myBasicOp = GEOM::GEOM_IBasicOperations::_nil();
25 my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil();
26 myBoolOp = GEOM::GEOM_IBooleanOperations::_nil();
27 myInsOp = GEOM::GEOM_IInsertOperations::_nil();
28 myTransfOp = GEOM::GEOM_ITransformOperations::_nil();
29 myShapesOp = GEOM::GEOM_IShapesOperations::_nil();
30 myBlocksOp = GEOM::GEOM_IBlocksOperations::_nil();
31 myCurvesOp = GEOM::GEOM_ICurvesOperations::_nil();
32 myLocalOp = GEOM::GEOM_ILocalOperations::_nil();
33 myGroupOp = GEOM::GEOM_IGroupOperations::_nil();
36 //=============================================================================
38 //=============================================================================
39 GEOM_Superv_i::~GEOM_Superv_i()
41 MESSAGE("GEOM_Superv_i::~GEOM_Superv_i");
45 //============================================================================
46 // function : register()
47 // purpose : register 'name' in 'name_service'
48 //============================================================================
49 void GEOM_Superv_i::register_name(char * name)
51 GEOM::GEOM_Superv_ptr g = GEOM::GEOM_Superv::_narrow(POA_GEOM::GEOM_Superv::_this());
52 name_service->Register(g, strdup(name));
55 //=============================================================================
57 //=============================================================================
58 void GEOM_Superv_i::setGeomEngine()
60 // get GEOM_Gen engine
61 SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
62 Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" );
64 myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
67 //=============================================================================
69 //=============================================================================
70 void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
75 //=============================================================================
77 //=============================================================================
78 void GEOM_Superv_i::getBasicOp()
80 if (CORBA::is_nil(myGeomEngine))
82 // get GEOM_IBasicOperations interface
83 myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
86 //=============================================================================
88 //=============================================================================
89 void GEOM_Superv_i::get3DPrimOp()
91 if (CORBA::is_nil(myGeomEngine))
93 // get GEOM_I3DPrimOperations interface
94 my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
97 //=============================================================================
99 //=============================================================================
100 void GEOM_Superv_i::getBoolOp()
102 if (CORBA::is_nil(myGeomEngine))
104 // get GEOM_IBooleanOperations interface
105 myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
108 //=============================================================================
110 //=============================================================================
111 void GEOM_Superv_i::getInsOp()
113 if (CORBA::is_nil(myGeomEngine))
115 // get GEOM_IInsertOperations interface
116 myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
119 //=============================================================================
121 //=============================================================================
122 void GEOM_Superv_i::getTransfOp()
124 if (CORBA::is_nil(myGeomEngine))
126 // get GEOM_ITransformOperations interface
127 myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
130 //=============================================================================
132 //=============================================================================
133 void GEOM_Superv_i::getShapesOp()
135 if (CORBA::is_nil(myGeomEngine))
137 // get GEOM_IShapesOperations interface
138 myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
141 //=============================================================================
143 //=============================================================================
144 void GEOM_Superv_i::getBlocksOp()
146 if (CORBA::is_nil(myGeomEngine))
148 // get GEOM_IBlocksOperations interface
149 myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
152 //=============================================================================
154 //=============================================================================
155 void GEOM_Superv_i::getCurvesOp()
157 if (CORBA::is_nil(myGeomEngine))
159 // get GEOM_ICurvesOperations interface
160 myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
163 //=============================================================================
165 //=============================================================================
166 void GEOM_Superv_i::getLocalOp()
168 if (CORBA::is_nil(myGeomEngine))
170 // get GEOM_ILocalOperations interface
171 myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
174 //=============================================================================
176 //=============================================================================
177 void GEOM_Superv_i::getGroupOp()
179 if (CORBA::is_nil(myGeomEngine))
181 // get GEOM_IGroupOperations interface
182 myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
185 //============================================================================
187 // purpose : save OCAF/Geom document
188 //============================================================================
189 SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
193 SALOMEDS::TMPFile_var aStreamFile;
194 return aStreamFile._retn();
197 //============================================================================
198 // function : SaveASCII()
200 //============================================================================
201 SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
205 SALOMEDS::TMPFile_var aStreamFile;
206 return aStreamFile._retn();
209 //============================================================================
212 //============================================================================
213 CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
214 const SALOMEDS::TMPFile& theStream,
221 //============================================================================
222 // function : LoadASCII()
224 //============================================================================
225 CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
226 const SALOMEDS::TMPFile& theStream,
233 //============================================================================
234 // function : Close()
236 //============================================================================
237 void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr theComponent)
240 //============================================================================
241 // function : ComponentDataType()
243 //============================================================================
244 char* GEOM_Superv_i::ComponentDataType()
249 //============================================================================
250 // function : IORToLocalPersistentID()
252 //============================================================================
253 char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
254 const char* IORString,
255 CORBA::Boolean isMultiFile,
256 CORBA::Boolean isASCII)
261 //============================================================================
262 // function : LocalPersistentIDToIOR()
263 // purpose : Create/Load CORBA object from a persistent ref (an entry)
264 // : Used when a study is loaded
265 // : The IOR (IORName) of object created is returned
266 //============================================================================
267 char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
268 const char* aLocalPersistentID,
269 CORBA::Boolean isMultiFile,
270 CORBA::Boolean isASCII)
275 //============================================================================
276 // function : CanPublishInStudy
278 //============================================================================
279 bool GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
281 if (CORBA::is_nil(myGeomEngine))
283 return myGeomEngine->CanPublishInStudy(theIOR);
286 //============================================================================
287 // function : PublishInStudy
289 //============================================================================
290 SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
291 SALOMEDS::SObject_ptr theSObject,
292 CORBA::Object_ptr theObject,
293 const char* theName) throw (SALOME::SALOME_Exception)
295 if (CORBA::is_nil(myGeomEngine))
297 return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
300 //============================================================================
301 // function : CanCopy()
303 //============================================================================
304 CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr theObject)
309 //============================================================================
310 // function : CopyFrom()
312 //============================================================================
313 SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID)
315 SALOMEDS::TMPFile_var aStreamFile;
316 return aStreamFile._retn();
319 //============================================================================
320 // function : CanPaste()
322 //============================================================================
323 CORBA::Boolean GEOM_Superv_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID)
328 //============================================================================
329 // function : PasteInto()
331 //============================================================================
332 SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& theStream,
333 CORBA::Long theObjectID,
334 SALOMEDS::SObject_ptr theObject)
336 SALOMEDS::SObject_var aNewSO;
337 return aNewSO._retn();
340 //================= Primitives Construction : BasicOperations =================
341 //=============================================================================
343 //=============================================================================
344 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointXYZ(CORBA::Double theX,
348 MESSAGE("GEOM_Superv_i::MakePointXYZ");
349 if (CORBA::is_nil(myBasicOp)) getBasicOp();
350 // make vertex and return
351 return myBasicOp->MakePointXYZ(theX, theY, theZ);
354 //=============================================================================
355 // MakePointWithReference:
356 //=============================================================================
357 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
362 MESSAGE("GEOM_Superv_i::MakePointWithReference");
363 if (CORBA::is_nil(myBasicOp)) getBasicOp();
364 return myBasicOp->MakePointWithReference(theReference, theX, theY, theZ);
367 //=============================================================================
369 //=============================================================================
370 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
371 CORBA::Double theParameter)
373 MESSAGE("GEOM_Superv_i::MakePointOnCurve");
374 if (CORBA::is_nil(myBasicOp)) getBasicOp();
375 return myBasicOp->MakePointOnCurve(theRefCurve, theParameter);
378 //=============================================================================
380 //=============================================================================
381 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorDXDYDZ (CORBA::Double theDX,
385 MESSAGE("GEOM_Superv_i::MakeVectorDXDYDZ");
386 if (CORBA::is_nil(myBasicOp)) getBasicOp();
387 return myBasicOp->MakeVectorDXDYDZ(theDX, theDY, theDZ);
390 //=============================================================================
392 //=============================================================================
393 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
394 GEOM::GEOM_Object_ptr thePnt2)
396 MESSAGE("GEOM_Superv_i::MakeVector");
397 if (CORBA::is_nil(myBasicOp)) getBasicOp();
398 return myBasicOp->MakeVectorTwoPnt(thePnt1, thePnt2);
401 //=============================================================================
403 //=============================================================================
404 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
405 GEOM::GEOM_Object_ptr thePnt2)
407 MESSAGE("GEOM_Superv_i::MakeLineTwoPnt");
408 if (CORBA::is_nil(myBasicOp)) getBasicOp();
409 return myBasicOp->MakeLineTwoPnt(thePnt1, thePnt2);
412 //=============================================================================
413 // MakePlaneThreePnt:
414 //=============================================================================
415 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
416 GEOM::GEOM_Object_ptr thePnt2,
417 GEOM::GEOM_Object_ptr thePnt3,
418 CORBA::Double theTrimSize)
420 MESSAGE("GEOM_Superv_i::MakePlaneThreePnt");
421 if (CORBA::is_nil(myBasicOp)) getBasicOp();
422 return myBasicOp->MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize);
425 //=============================================================================
427 //=============================================================================
428 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
429 GEOM::GEOM_Object_ptr theVec,
430 CORBA::Double theTrimSize)
432 MESSAGE("GEOM_Superv_i::MakePlanePntVec");
433 if (CORBA::is_nil(myBasicOp)) getBasicOp();
434 return myBasicOp->MakePlanePntVec(thePnt, theVec, theTrimSize);
437 //=============================================================================
439 //=============================================================================
440 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
441 CORBA::Double theTrimSize)
443 MESSAGE("GEOM_Superv_i::MakePlaneFace");
444 if (CORBA::is_nil(myBasicOp)) getBasicOp();
445 return myBasicOp->MakePlaneFace(theFace, theTrimSize);
448 //=============================================================================
450 //=============================================================================
451 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarker
452 (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
453 CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
454 CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
456 MESSAGE("GEOM_Superv_i::MakeMarker");
457 if (CORBA::is_nil(myBasicOp)) getBasicOp();
458 return myBasicOp->MakeMarker(theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ);
461 //================= Primitives Construction : 3DPrimOperations ================
462 //=============================================================================
464 //=============================================================================
465 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBox (CORBA::Double theX1,
472 MESSAGE("GEOM_Superv_i::MakeBox");
473 if (CORBA::is_nil(myBasicOp)) getBasicOp();
474 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
475 return my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1),
476 myBasicOp->MakePointXYZ(theX2, theY2, theZ2));
479 //=============================================================================
481 //=============================================================================
482 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxDXDYDZ (CORBA::Double theDX,
486 MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ");
487 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
488 return my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ);
491 //=============================================================================
493 //=============================================================================
494 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
495 GEOM::GEOM_Object_ptr thePnt2)
497 MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt");
498 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
499 return my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2);
502 //=============================================================================
503 // MakeCylinderPntVecRH:
504 //=============================================================================
505 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
506 GEOM::GEOM_Object_ptr theAxis,
507 CORBA::Double theRadius,
508 CORBA::Double theHeight)
510 MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH");
511 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
512 return my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight);
515 //=============================================================================
517 //=============================================================================
518 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR,
521 MESSAGE("GEOM_Superv_i::MakeCylinderRH");
522 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
523 return my3DPrimOp->MakeCylinderRH(theR, theH);
526 //=============================================================================
528 //=============================================================================
529 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere (CORBA::Double theX,
532 CORBA::Double theRadius)
534 MESSAGE("GEOM_Superv_i::MakeSphepe");
535 if (CORBA::is_nil(myBasicOp)) getBasicOp();
536 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
537 return my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
540 //=============================================================================
542 //=============================================================================
543 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
545 MESSAGE("GEOM_Superv_i::MakeSphereR");
546 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
547 return my3DPrimOp->MakeSphereR(theR);
550 //=============================================================================
552 //=============================================================================
553 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
556 MESSAGE("GEOM_Superv_i::MakeSpherePntR");
557 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
558 return my3DPrimOp->MakeSpherePntR(thePnt, theR);
561 //=============================================================================
562 // MakeTorusPntVecRR:
563 //=============================================================================
564 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
565 GEOM::GEOM_Object_ptr theVec,
566 CORBA::Double theRMajor,
567 CORBA::Double theRMinor)
569 MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
570 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
571 return my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
574 //=============================================================================
576 //=============================================================================
577 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor,
578 CORBA::Double theRMinor)
580 MESSAGE("GEOM_Superv_i::MakeTorusRR");
581 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
582 return my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
585 //=============================================================================
586 // MakeConePntVecR1R2H:
587 //=============================================================================
588 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
589 GEOM::GEOM_Object_ptr theAxis,
592 CORBA::Double theHeight)
594 MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
595 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
596 return my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
599 //=============================================================================
601 //=============================================================================
602 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1,
604 CORBA::Double theHeight)
606 MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
607 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
608 return my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
611 //=============================================================================
613 //=============================================================================
614 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
615 GEOM::GEOM_Object_ptr theVec,
618 MESSAGE("GEOM_Superv_i::MakePrismVecH");
619 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
620 return my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
624 //=============================================================================
626 //=============================================================================
627 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
628 GEOM::GEOM_Object_ptr thePoint1,
629 GEOM::GEOM_Object_ptr thePoint2)
631 MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
632 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
633 return my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
636 //=============================================================================
638 //=============================================================================
639 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase,
640 GEOM::GEOM_Object_ptr thePath)
642 MESSAGE("GEOM_Superv_i::MakePipe");
643 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
644 return my3DPrimOp->MakePipe(theBase, thePath);
647 //=============================================================================
648 // MakeRevolutionAxisAngle:
649 //=============================================================================
650 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
651 GEOM::GEOM_Object_ptr theAxis,
652 CORBA::Double theAngle)
654 MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
655 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
656 return my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
659 //=============================================================================
661 //=============================================================================
662 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
663 CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
664 CORBA::Double theTol2D, CORBA::Double theTol3D,
665 CORBA::Long theNbIter)
667 MESSAGE("GEOM_Superv_i::MakeFilling");
668 if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
669 return my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter);
672 //============================= BooleanOperations =============================
673 //=============================================================================
675 //=============================================================================
676 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
677 GEOM::GEOM_Object_ptr theShape2,
678 CORBA::Long theOperation)
680 // theOperation indicates the operation to be done:
681 // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
682 MESSAGE("GEOM_Superv_i::MakeBoolean");
683 if (CORBA::is_nil(myBoolOp)) getBoolOp();
684 return myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
687 //=============================================================================
689 //=============================================================================
690 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1,
691 GEOM::GEOM_Object_ptr theShape2)
693 MESSAGE("GEOM_Superv_i::MakeFuse");
694 if (CORBA::is_nil(myBoolOp)) getBoolOp();
695 return myBoolOp->MakeBoolean(theShape1, theShape2, 3);
698 //=============================================================================
700 //=============================================================================
701 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (const GEOM::ListOfGO& theShapes,
702 const GEOM::ListOfGO& theTools,
703 const GEOM::ListOfGO& theKeepInside,
704 const GEOM::ListOfGO& theRemoveInside,
705 const CORBA::Short theLimit,
706 const CORBA::Boolean theRemoveWebs,
707 const GEOM::ListOfLong& theMaterials)
709 MESSAGE("GEOM_Superv_i::MakePartition");
710 if (CORBA::is_nil(myBoolOp)) getBoolOp();
711 return myBoolOp->MakePartition(theShapes, theTools, theKeepInside, theRemoveInside,
712 theLimit, theRemoveWebs, theMaterials);
715 //=============================================================================
716 // MakeHalfPartition:
717 //=============================================================================
718 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
719 GEOM::GEOM_Object_ptr thePlane)
721 MESSAGE("GEOM_Superv_i::MakeHalfPartition");
722 if (CORBA::is_nil(myBoolOp)) getBoolOp();
723 return myBoolOp->MakeHalfPartition(theShape, thePlane);
726 //============================== InsertOperations =============================
727 //=============================================================================
729 //=============================================================================
730 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
732 MESSAGE("GEOM_Superv_i::MakeCopy");
733 if (CORBA::is_nil(myInsOp)) getInsOp();
734 return myInsOp->MakeCopy(theOriginal);
737 //=============================================================================
739 //=============================================================================
740 void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject,
741 const char* theFileName,
742 const char* theFormatName)
744 MESSAGE("GEOM_Superv_i::Export");
745 if (CORBA::is_nil(myInsOp)) getInsOp();
746 myInsOp->Export(theObject, theFileName, theFormatName);
749 //=============================================================================
751 //=============================================================================
752 GEOM::GEOM_Object_ptr GEOM_Superv_i::Import (const char* theFileName,
753 const char* theFormatName)
755 MESSAGE("GEOM_Superv_i::Import");
756 if (CORBA::is_nil(myInsOp)) getInsOp();
757 return myInsOp->Import(theFileName, theFormatName);
760 //=============================================================================
761 // ImportTranslators:
762 //=============================================================================
763 void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
764 GEOM::string_array_out thePatterns)
766 MESSAGE("GEOM_Superv_i::ImportTranslators");
767 if (CORBA::is_nil(myInsOp)) getInsOp();
768 myInsOp->ImportTranslators(theFormats, thePatterns);
771 //=============================================================================
772 // ExportTranslators:
773 //=============================================================================
774 void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
775 GEOM::string_array_out thePatterns)
777 MESSAGE("GEOM_Superv_i::ExportTranslators");
778 if (CORBA::is_nil(myInsOp)) getInsOp();
779 myInsOp->ExportTranslators(theFormats, thePatterns);
782 //============================= TransformOperations ===========================
783 //=============================================================================
784 // TranslateTwoPoints:
785 //=============================================================================
786 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
787 GEOM::GEOM_Object_ptr thePoint1,
788 GEOM::GEOM_Object_ptr thePoint2)
790 MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
791 if (CORBA::is_nil(myTransfOp)) getTransfOp();
792 return myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
795 //=============================================================================
796 // TranslateTwoPointsCopy:
797 //=============================================================================
798 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
799 GEOM::GEOM_Object_ptr thePoint1,
800 GEOM::GEOM_Object_ptr thePoint2)
802 MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
803 if (CORBA::is_nil(myTransfOp)) getTransfOp();
804 return myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
807 //=============================================================================
809 //=============================================================================
810 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
815 MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
816 if (CORBA::is_nil(myTransfOp)) getTransfOp();
817 return myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
820 //=============================================================================
821 // TranslateDXDYDZCopy:
822 //=============================================================================
823 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
828 MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
829 if (CORBA::is_nil(myTransfOp)) getTransfOp();
830 return myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
833 //=============================================================================
835 //=============================================================================
836 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject,
837 GEOM::GEOM_Object_ptr theVector)
839 MESSAGE("GEOM_Superv_i::TranslateVector");
840 if (CORBA::is_nil(myTransfOp)) getTransfOp();
841 return myTransfOp->TranslateVector(theObject, theVector);
844 //=============================================================================
845 // TranslateVectorCopy:
846 //=============================================================================
847 GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
848 GEOM::GEOM_Object_ptr theVector)
850 MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
851 if (CORBA::is_nil(myTransfOp)) getTransfOp();
852 return myTransfOp->TranslateVectorCopy(theObject, theVector);
855 //=============================================================================
857 //=============================================================================
858 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
859 GEOM::GEOM_Object_ptr theVector,
860 CORBA::Double theStep,
861 CORBA::Long theNbTimes)
863 MESSAGE("GEOM_Superv_i::MultiTranslate1D");
864 if (CORBA::is_nil(myTransfOp)) getTransfOp();
865 return myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
868 //=============================================================================
870 //=============================================================================
871 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
872 GEOM::GEOM_Object_ptr theVector1,
873 CORBA::Double theStep1,
874 CORBA::Long theNbTimes1,
875 GEOM::GEOM_Object_ptr theVector2,
876 CORBA::Double theStep2,
877 CORBA::Long theNbTimes2)
879 MESSAGE("GEOM_Superv_i::MultiTranslate2D");
880 if (CORBA::is_nil(myTransfOp)) getTransfOp();
881 return myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
882 theVector2, theStep2, theNbTimes2);
885 //=============================================================================
887 //=============================================================================
888 GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject,
889 GEOM::GEOM_Object_ptr theAxis,
890 CORBA::Double theAngle)
892 MESSAGE("GEOM_Superv_i::Rotate");
893 if (CORBA::is_nil(myTransfOp)) getTransfOp();
894 return myTransfOp->Rotate(theObject, theAxis, theAngle);
897 //=============================================================================
899 //=============================================================================
900 GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
901 GEOM::GEOM_Object_ptr theAxis,
902 CORBA::Double theAngle)
904 MESSAGE("GEOM_Superv_i::RotateCopy");
905 if (CORBA::is_nil(myTransfOp)) getTransfOp();
906 return myTransfOp->RotateCopy(theObject, theAxis, theAngle);
909 //=============================================================================
911 //=============================================================================
912 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
913 GEOM::GEOM_Object_ptr theAxis,
914 CORBA::Long theNbTimes)
916 MESSAGE("GEOM_Superv_i::MultiRotate1D");
917 if (CORBA::is_nil(myTransfOp)) getTransfOp();
918 return myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
921 //=============================================================================
923 //=============================================================================
924 GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
925 GEOM::GEOM_Object_ptr theAxis,
926 CORBA::Double theAngle,
927 CORBA::Long theNbTimes1,
928 CORBA::Double theStep,
929 CORBA::Long theNbTimes2)
931 MESSAGE("GEOM_Superv_i::MultiRotate2D");
932 if (CORBA::is_nil(myTransfOp)) getTransfOp();
933 return myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
936 //=============================================================================
938 //=============================================================================
939 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject,
940 GEOM::GEOM_Object_ptr thePlane)
942 MESSAGE("GEOM_Superv_i::MirrorPlane");
943 if (CORBA::is_nil(myTransfOp)) getTransfOp();
944 return myTransfOp->MirrorPlane(theObject, thePlane);
947 //=============================================================================
949 //=============================================================================
950 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
951 GEOM::GEOM_Object_ptr thePlane)
953 MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
954 if (CORBA::is_nil(myTransfOp)) getTransfOp();
955 return myTransfOp->MirrorPlaneCopy(theObject, thePlane);
958 //=============================================================================
960 //=============================================================================
961 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject,
962 GEOM::GEOM_Object_ptr theAxis)
964 MESSAGE("GEOM_Superv_i::MirrorAxis");
965 if (CORBA::is_nil(myTransfOp)) getTransfOp();
966 return myTransfOp->MirrorAxis(theObject, theAxis);
969 //=============================================================================
971 //=============================================================================
972 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
973 GEOM::GEOM_Object_ptr theAxis)
975 MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
976 if (CORBA::is_nil(myTransfOp)) getTransfOp();
977 return myTransfOp->MirrorAxisCopy(theObject, theAxis);
980 //=============================================================================
982 //=============================================================================
983 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject,
984 GEOM::GEOM_Object_ptr thePoint)
986 MESSAGE("GEOM_Superv_i::MirrorPoint");
987 if (CORBA::is_nil(myTransfOp)) getTransfOp();
988 return myTransfOp->MirrorPoint(theObject, thePoint);
991 //=============================================================================
993 //=============================================================================
994 GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
995 GEOM::GEOM_Object_ptr thePoint)
997 MESSAGE("GEOM_Superv_i::MirrorPointCopy");
998 if (CORBA::is_nil(myTransfOp)) getTransfOp();
999 return myTransfOp->MirrorPointCopy(theObject, thePoint);
1002 //=============================================================================
1004 //=============================================================================
1005 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject,
1006 CORBA::Double theOffset)
1008 MESSAGE("GEOM_Superv_i::OffsetShape");
1009 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1010 return myTransfOp->OffsetShape(theObject, theOffset);
1013 //=============================================================================
1015 //=============================================================================
1016 GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
1017 CORBA::Double theOffset)
1019 MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
1020 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1021 return myTransfOp->OffsetShapeCopy(theObject, theOffset);
1024 //=============================================================================
1026 //=============================================================================
1027 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject,
1028 GEOM::GEOM_Object_ptr thePoint,
1029 CORBA::Double theFactor)
1031 MESSAGE("GEOM_Superv_i::ScaleShape");
1032 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1033 return myTransfOp->ScaleShape(theObject, thePoint, theFactor);
1036 //=============================================================================
1038 //=============================================================================
1039 GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
1040 GEOM::GEOM_Object_ptr thePoint,
1041 CORBA::Double theFactor)
1043 MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
1044 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1045 return myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
1048 //=============================================================================
1050 //=============================================================================
1051 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject,
1052 GEOM::GEOM_Object_ptr theStartLCS,
1053 GEOM::GEOM_Object_ptr theEndLCS)
1055 MESSAGE("GEOM_Superv_i::PositionShape");
1056 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1057 return myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
1060 //=============================================================================
1061 // PositionShapeCopy:
1062 //=============================================================================
1063 GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
1064 GEOM::GEOM_Object_ptr theStartLCS,
1065 GEOM::GEOM_Object_ptr theEndLCS)
1067 MESSAGE("GEOM_Superv_i::PositionShapeCopy");
1068 if (CORBA::is_nil(myTransfOp)) getTransfOp();
1069 return myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
1072 //=============================== ShapesOperations ============================
1073 //=============================================================================
1075 //=============================================================================
1076 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
1077 GEOM::GEOM_Object_ptr thePnt2)
1079 MESSAGE("GEOM_Superv_i::MakeEdge");
1080 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1081 return myShapesOp->MakeEdge(thePnt1, thePnt2);
1084 //=============================================================================
1086 //=============================================================================
1087 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (const GEOM::ListOfGO& theEdgesAndWires)
1089 MESSAGE("GEOM_Superv_i::MakeWire");
1090 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1091 return myShapesOp->MakeWire(theEdgesAndWires);
1094 //=============================================================================
1096 //=============================================================================
1097 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire,
1098 CORBA::Boolean isPlanarWanted)
1100 MESSAGE("GEOM_Superv_i::MakeFace");
1101 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1102 return myShapesOp->MakeFace(theWire, isPlanarWanted);
1105 //=============================================================================
1107 //=============================================================================
1108 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (const GEOM::ListOfGO& theWires,
1109 CORBA::Boolean isPlanarWanted)
1111 MESSAGE("GEOM_Superv_i::MakeFaceWires");
1112 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1113 return myShapesOp->MakeFaceWires(theWires, isPlanarWanted);
1116 //=============================================================================
1118 //=============================================================================
1119 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (const GEOM::ListOfGO& theFacesAndShells)
1121 MESSAGE("GEOM_Superv_i::MakeShell");
1122 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1123 return myShapesOp->MakeShell(theFacesAndShells);
1126 //=============================================================================
1128 //=============================================================================
1129 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
1131 MESSAGE("GEOM_Superv_i::MakeSolidShell");
1132 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1133 return myShapesOp->MakeSolidShell(theShell);
1136 //=============================================================================
1138 //=============================================================================
1139 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (const GEOM::ListOfGO& theShells)
1141 MESSAGE("GEOM_Superv_i::MakeSolidShells");
1142 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1143 return myShapesOp->MakeSolidShells(theShells);
1146 //=============================================================================
1148 //=============================================================================
1149 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (const GEOM::ListOfGO& theShapes)
1151 MESSAGE("GEOM_Superv_i::MakeCompound");
1152 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1153 return myShapesOp->MakeCompound(theShapes);
1156 //=============================================================================
1158 //=============================================================================
1159 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
1160 const CORBA::Double theTolerance)
1162 MESSAGE("GEOM_Superv_i::MakeGlueFaces");
1163 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1164 return myShapesOp->MakeGlueFaces(theShape, theTolerance);
1167 //=============================================================================
1169 //=============================================================================
1170 GEOM::ListOfGO* GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
1171 const CORBA::Long theShapeType,
1172 const CORBA::Boolean isSorted)
1174 MESSAGE("GEOM_Superv_i::MakeExplode");
1175 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1176 return myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
1179 //=============================================================================
1181 //=============================================================================
1182 CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
1184 MESSAGE("GEOM_Superv_i::NumberOfFaces");
1185 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1186 return myShapesOp->NumberOfFaces(theShape);
1189 //=============================================================================
1191 //=============================================================================
1192 CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
1194 MESSAGE("GEOM_Superv_i::NumberOfEdges");
1195 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1196 return myShapesOp->NumberOfEdges(theShape);
1199 //=============================================================================
1200 // ChangeOrientation:
1201 //=============================================================================
1202 GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
1204 MESSAGE("GEOM_Superv_i::ChangeOrientation");
1205 if (CORBA::is_nil(myShapesOp)) getShapesOp();
1206 return myShapesOp->ChangeOrientation(theShape);
1210 //=============================== BlocksOperations ============================
1211 //=============================================================================
1212 // MakeQuad4Vertices:
1213 //=============================================================================
1214 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
1215 GEOM::GEOM_Object_ptr thePnt2,
1216 GEOM::GEOM_Object_ptr thePnt3,
1217 GEOM::GEOM_Object_ptr thePnt4)
1219 MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
1220 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1221 return myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
1224 //=============================================================================
1226 //=============================================================================
1227 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
1228 GEOM::GEOM_Object_ptr theEdge2,
1229 GEOM::GEOM_Object_ptr theEdge3,
1230 GEOM::GEOM_Object_ptr theEdge4)
1232 MESSAGE("GEOM_Superv_i::MakeQuad");
1233 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1234 return myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
1237 //=============================================================================
1239 //=============================================================================
1240 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
1241 GEOM::GEOM_Object_ptr theEdge2)
1243 MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
1244 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1245 return myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
1248 //=============================================================================
1250 //=============================================================================
1251 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1,
1252 GEOM::GEOM_Object_ptr theFace2,
1253 GEOM::GEOM_Object_ptr theFace3,
1254 GEOM::GEOM_Object_ptr theFace4,
1255 GEOM::GEOM_Object_ptr theFace5,
1256 GEOM::GEOM_Object_ptr theFace6)
1258 MESSAGE("GEOM_Superv_i::MakeHexa");
1259 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1260 return myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
1263 //=============================================================================
1265 //=============================================================================
1266 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
1267 GEOM::GEOM_Object_ptr theFace2)
1269 MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
1270 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1271 return myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
1274 //=============================================================================
1276 //=============================================================================
1277 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape,
1278 const CORBA::Double theX,
1279 const CORBA::Double theY,
1280 const CORBA::Double theZ,
1281 const CORBA::Double theEpsilon)
1283 MESSAGE("GEOM_Superv_i::GetPoint");
1284 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1285 return myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
1288 //=============================================================================
1290 //=============================================================================
1291 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape,
1292 GEOM::GEOM_Object_ptr thePoint1,
1293 GEOM::GEOM_Object_ptr thePoint2)
1295 MESSAGE("GEOM_Superv_i::GetEdge");
1296 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1297 return myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
1300 //=============================================================================
1301 // GetEdgeNearPoint:
1302 //=============================================================================
1303 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
1304 GEOM::GEOM_Object_ptr thePoint)
1306 MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
1307 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1308 return myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
1311 //=============================================================================
1313 //=============================================================================
1314 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
1315 GEOM::GEOM_Object_ptr thePoint1,
1316 GEOM::GEOM_Object_ptr thePoint2,
1317 GEOM::GEOM_Object_ptr thePoint3,
1318 GEOM::GEOM_Object_ptr thePoint4)
1320 MESSAGE("GEOM_Superv_i::GetFaceByPoints");
1321 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1322 return myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
1325 //=============================================================================
1327 //=============================================================================
1328 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
1329 GEOM::GEOM_Object_ptr theEdge1,
1330 GEOM::GEOM_Object_ptr theEdge2)
1332 MESSAGE("GEOM_Superv_i::GetFaceByEdges");
1333 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1334 return myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
1337 //=============================================================================
1339 //=============================================================================
1340 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
1341 GEOM::GEOM_Object_ptr theFace)
1343 MESSAGE("GEOM_Superv_i::GetOppositeFace");
1344 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1345 return myBlocksOp->GetOppositeFace(theBlock, theFace);
1348 //=============================================================================
1349 // GetFaceNearPoint:
1350 //=============================================================================
1351 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
1352 GEOM::GEOM_Object_ptr thePoint)
1354 MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
1355 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1356 return myBlocksOp->GetFaceNearPoint(theShape, thePoint);
1359 //=============================================================================
1360 // GetFaceByNormale:
1361 //=============================================================================
1362 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
1363 GEOM::GEOM_Object_ptr theVector)
1365 MESSAGE("GEOM_Superv_i::GetFaceByNormale");
1366 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1367 return myBlocksOp->GetFaceByNormale(theBlock, theVector);
1370 //=============================================================================
1371 // IsCompoundOfBlocks:
1372 //=============================================================================
1373 CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
1374 const CORBA::Long theMinNbFaces,
1375 const CORBA::Long theMaxNbFaces,
1376 CORBA::Long& theNbBlocks)
1378 MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
1379 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1380 return myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
1383 //=============================================================================
1384 // CheckCompoundOfBlocks:
1385 //=============================================================================
1386 CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks
1387 (GEOM::GEOM_Object_ptr theCompound,
1388 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
1390 MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
1391 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1392 return myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
1395 //=============================================================================
1397 //=============================================================================
1398 char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
1399 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
1401 MESSAGE("GEOM_Superv_i::PrintBCErrors");
1402 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1403 return myBlocksOp->PrintBCErrors(theCompound, theErrors);
1406 //=============================================================================
1407 // ExplodeCompoundOfBlocks:
1408 //=============================================================================
1409 GEOM::ListOfGO* GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
1410 const CORBA::Long theMinNbFaces,
1411 const CORBA::Long theMaxNbFaces)
1413 MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
1414 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1415 return myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
1418 //=============================================================================
1419 // GetBlockNearPoint:
1420 //=============================================================================
1421 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
1422 GEOM::GEOM_Object_ptr thePoint)
1424 MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
1425 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1426 return myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
1429 //=============================================================================
1431 //=============================================================================
1432 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
1433 const GEOM::ListOfGO& theParts)
1435 MESSAGE("GEOM_Superv_i::GetBlockByParts");
1436 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1437 return myBlocksOp->GetBlockByParts(theCompound, theParts);
1440 //=============================================================================
1441 // GetBlocksByParts:
1442 //=============================================================================
1443 GEOM::ListOfGO* GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
1444 const GEOM::ListOfGO& theParts)
1446 MESSAGE("GEOM_Superv_i::GetBlocksByParts");
1447 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1448 return myBlocksOp->GetBlocksByParts(theCompound, theParts);
1451 //=============================================================================
1452 // MakeMultiTransformation1D:
1453 //=============================================================================
1454 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
1455 const CORBA::Long theDirFace1,
1456 const CORBA::Long theDirFace2,
1457 const CORBA::Long theNbTimes)
1459 MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
1460 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1461 return myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
1464 //=============================================================================
1465 // MakeMultiTransformation2D:
1466 //=============================================================================
1467 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D
1468 (GEOM::GEOM_Object_ptr theBlock,
1469 const CORBA::Long theDirFace1U,
1470 const CORBA::Long theDirFace2U,
1471 const CORBA::Long theNbTimesU,
1472 const CORBA::Long theDirFace1V,
1473 const CORBA::Long theDirFace2V,
1474 const CORBA::Long theNbTimesV)
1476 MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
1477 if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
1478 return myBlocksOp->MakeMultiTransformation2D(theBlock,
1479 theDirFace1U, theDirFace2U, theNbTimesU,
1480 theDirFace1V, theDirFace2V, theNbTimesV);
1483 //=============================== CurvesOperations ============================
1484 //=============================================================================
1485 // MakeCirclePntVecR:
1486 //=============================================================================
1487 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
1488 GEOM::GEOM_Object_ptr theVector,
1491 MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
1492 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1493 return myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
1496 //=============================================================================
1497 // MakeCircleThreePnt:
1498 //=============================================================================
1499 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
1500 GEOM::GEOM_Object_ptr thePnt2,
1501 GEOM::GEOM_Object_ptr thePnt3)
1503 MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
1504 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1505 return myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
1508 //=============================================================================
1510 //=============================================================================
1511 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
1512 GEOM::GEOM_Object_ptr theVector,
1513 CORBA::Double theRMajor,
1514 CORBA::Double theRMinor)
1516 MESSAGE("GEOM_Superv_i::MakeEllipse");
1517 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1518 return myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
1521 //=============================================================================
1523 //=============================================================================
1524 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
1525 GEOM::GEOM_Object_ptr thePnt2,
1526 GEOM::GEOM_Object_ptr thePnt3)
1528 MESSAGE("GEOM_Superv_i::MakeArc");
1529 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1530 return myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
1533 //=============================================================================
1535 //=============================================================================
1536 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (const GEOM::ListOfGO& thePoints)
1538 MESSAGE("GEOM_Superv_i::MakePolyline");
1539 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1540 return myCurvesOp->MakePolyline(thePoints);
1543 //=============================================================================
1544 // MakeSplineBezier:
1545 //=============================================================================
1546 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (const GEOM::ListOfGO& thePoints)
1548 MESSAGE("GEOM_Superv_i::MakeSplineBezier");
1549 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1550 return myCurvesOp->MakeSplineBezier(thePoints);
1553 //=============================================================================
1554 // MakeSplineInterpolation:
1555 //=============================================================================
1556 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (const GEOM::ListOfGO& thePoints)
1558 MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
1559 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1560 return myCurvesOp->MakeSplineInterpolation(thePoints);
1563 //=============================================================================
1565 //=============================================================================
1566 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand,
1567 const GEOM::ListOfDouble& theWorkingPlane)
1569 MESSAGE("GEOM_Superv_i::MakeSketcher");
1570 if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
1571 return myCurvesOp->MakeSketcher(theCommand, theWorkingPlane);
1574 //=============================== LocalOperations =============================
1575 //=============================================================================
1577 //=============================================================================
1578 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
1581 MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
1582 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1583 return myLocalOp->MakeFilletAll(theShape, theR);
1586 //=============================================================================
1588 //=============================================================================
1589 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape,
1591 const GEOM::ListOfLong& theEdges)
1593 MESSAGE("GEOM_Superv_i::MakeFilletEdges");
1594 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1595 return myLocalOp->MakeFilletEdges(theShape, theR, theEdges);
1598 //=============================================================================
1600 //=============================================================================
1601 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape,
1603 const GEOM::ListOfLong& theFaces)
1605 MESSAGE("GEOM_Superv_i::MakeFilletFaces");
1606 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1607 return myLocalOp->MakeFilletFaces(theShape, theR, theFaces);
1610 //=============================================================================
1612 //=============================================================================
1613 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
1615 MESSAGE("GEOM_Superv_i::MakeChamferAll");
1616 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1617 return myLocalOp->MakeChamferAll(theShape, theD);
1620 //=============================================================================
1622 //=============================================================================
1623 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
1624 CORBA::Double theD1, CORBA::Double theD2,
1625 CORBA::Long theFace1, CORBA::Long theFace2)
1627 MESSAGE("GEOM_Superv_i::MakeChamferEdge");
1628 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1629 return myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
1632 //=============================================================================
1633 // MakeChamferFaces:
1634 //=============================================================================
1635 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
1636 CORBA::Double theD1, CORBA::Double theD2,
1637 const GEOM::ListOfLong& theFaces)
1639 MESSAGE("GEOM_Superv_i::MakeChamferFaces");
1640 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1641 return myLocalOp->MakeChamferFaces(theShape, theD1, theD2, theFaces);
1644 //=============================================================================
1646 //=============================================================================
1647 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape,
1648 CORBA::Double theWeight,
1649 CORBA::Double theWaterDensity,
1650 CORBA::Double theMeshingDeflection)
1652 MESSAGE("GEOM_Superv_i::MakeArchimede");
1653 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1654 return myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
1657 //=============================================================================
1658 // GetSubShapeIndexMakeFilletAll:
1659 //=============================================================================
1660 CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
1661 GEOM::GEOM_Object_ptr theSubShape)
1663 MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
1664 if (CORBA::is_nil(myLocalOp)) getLocalOp();
1665 return myLocalOp->GetSubShapeIndex(theShape, theSubShape);
1668 //=============================== GroupOperations =============================
1669 //=============================================================================
1671 //=============================================================================
1672 GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
1673 CORBA::Long theShapeType)
1675 MESSAGE("GEOM_Superv_i::CreateGroup");
1676 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1677 return myGroupOp->CreateGroup(theMainShape, theShapeType);
1680 //=============================================================================
1682 //=============================================================================
1683 void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup,
1684 CORBA::Long theSubShapeId)
1686 MESSAGE("GEOM_Superv_i::AddObject");
1687 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1688 myGroupOp->AddObject(theGroup, theSubShapeId);
1691 //=============================================================================
1693 //=============================================================================
1694 void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup,
1695 CORBA::Long theSubShapeId)
1697 MESSAGE("GEOM_Superv_i::RemoveObject");
1698 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1699 myGroupOp->RemoveObject(theGroup, theSubShapeId);
1702 //=============================================================================
1704 //=============================================================================
1705 CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
1707 MESSAGE("GEOM_Superv_i::GetType");
1708 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1709 return myGroupOp->GetType(theGroup);
1712 //=============================================================================
1714 //=============================================================================
1715 GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
1717 MESSAGE("GEOM_Superv_i::GetMainShape");
1718 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1719 return myGroupOp->GetMainShape(theGroup);
1722 //=============================================================================
1724 //=============================================================================
1725 GEOM::ListOfLong* GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
1727 MESSAGE("GEOM_Superv_i::GetObjects");
1728 if (CORBA::is_nil(myGroupOp)) getGroupOp();
1729 return myGroupOp->GetObjects(theGroup);
1732 //=====================================================================================
1734 //=====================================================================================
1737 PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb,
1738 PortableServer::POA_ptr poa,
1739 PortableServer::ObjectId * contId,
1740 const char *instanceName,
1741 const char * interfaceName)
1743 GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
1744 myGEOM_Superv_i->register_name("/myGEOM_Superv");
1745 return myGEOM_Superv_i->getId() ;