#include "GEOM_Superv_i.hh"
#include "SALOME_LifeCycleCORBA.hxx"
+
+#include CORBA_SERVER_HEADER(SALOME_Session)
+#include "SALOMEDSClient_ClientFactory.hxx"
+
+#define isNewStudy(a,b) (a > 0 && a != b)
+
using namespace std;
//=============================================================================
// constructor:
setGeomEngine();
myStudyID = -1;
+ myLastStudyID = -1;
myBasicOp = GEOM::GEOM_IBasicOperations::_nil();
my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil();
//=============================================================================
void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
{
- myStudyID = theId;
+ // mkr : PAL10770 -->
+ myLastStudyID = myStudyID;
+
+ CORBA::Object_ptr anObject = name_service->Resolve("/Kernel/Session");
+ if ( !CORBA::is_nil(anObject) ) {
+ SALOME::Session_var aSession = SALOME::Session::_narrow(anObject);
+ if ( !CORBA::is_nil(aSession) ) {
+ int aStudyID = aSession->GetActiveStudyId();
+ if ( theId != aStudyID ) MESSAGE("Warning : given study ID theId="<<theId<<" is wrong and will be replaced by the value "<<aStudyID);
+ myStudyID = aStudyID;
+ }
+ }
+
+ if ( isNewStudy(myLastStudyID,myStudyID) ) {
+ if (CORBA::is_nil(myGeomEngine)) setGeomEngine();
+ string anEngine = _orb->object_to_string( myGeomEngine );
+
+ CORBA::Object_var anObj = name_service->Resolve("/myStudyManager");
+ if ( !CORBA::is_nil(anObj) ) {
+ SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(anObj);
+ if ( !CORBA::is_nil(aStudyManager) ) {
+ _PTR(Study) aDSStudy = ClientFactory::Study(aStudyManager->GetStudyByID(myStudyID));
+ if ( aDSStudy ) {
+ _PTR(SComponent) aSCO = aDSStudy->FindComponent(myGeomEngine->ComponentDataType());
+ if ( aSCO ) {
+ _PTR(StudyBuilder) aBuilder = aDSStudy->NewBuilder();
+ if ( aBuilder ) aBuilder->LoadWith( aSCO, anEngine );
+ }
+ }
+ }
+ }
+ }
+ // mkr : PAL10770 <--
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IBasicOperations interface
- myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
+ if (CORBA::is_nil(myBasicOp) || isNewStudy(myLastStudyID,myStudyID))
+ myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_I3DPrimOperations interface
- my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
+ if (CORBA::is_nil(my3DPrimOp) || isNewStudy(myLastStudyID,myStudyID))
+ my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IBooleanOperations interface
- myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
+ if (CORBA::is_nil(myBoolOp) || isNewStudy(myLastStudyID,myStudyID))
+ myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IInsertOperations interface
- myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
+ if (CORBA::is_nil(myInsOp) || isNewStudy(myLastStudyID,myStudyID))
+ myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_ITransformOperations interface
- myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
+ if (CORBA::is_nil(myTransfOp) || isNewStudy(myLastStudyID,myStudyID))
+ myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IShapesOperations interface
- myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
+ if (CORBA::is_nil(myShapesOp) || isNewStudy(myLastStudyID,myStudyID))
+ myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IBlocksOperations interface
- myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
+ if (CORBA::is_nil(myBlocksOp) || isNewStudy(myLastStudyID,myStudyID))
+ myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_ICurvesOperations interface
- myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
+ if (CORBA::is_nil(myCurvesOp) || isNewStudy(myLastStudyID,myStudyID))
+ myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_ILocalOperations interface
- myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
+ if (CORBA::is_nil(myLocalOp) || isNewStudy(myLastStudyID,myStudyID))
+ myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IGroupOperations interface
- myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
+ if (CORBA::is_nil(myGroupOp) || isNewStudy(myLastStudyID,myStudyID))
+ myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
}
//=============================================================================
// purpose :
//============================================================================
void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr theComponent)
-{}
+{
+}
//============================================================================
// function : ComponentDataType()
CORBA::Double theZ)
{
MESSAGE("GEOM_Superv_i::MakePointXYZ");
- if (CORBA::is_nil(myBasicOp)) getBasicOp();
+ getBasicOp();
// make vertex and return
return myBasicOp->MakePointXYZ(theX, theY, theZ);
}
CORBA::Double theZ)
{
MESSAGE("GEOM_Superv_i::MakePointWithReference");
- if (CORBA::is_nil(myBasicOp)) getBasicOp();
+ getBasicOp();
return myBasicOp->MakePointWithReference(theReference, theX, theY, theZ);
}
CORBA::Double theParameter)
{
MESSAGE("GEOM_Superv_i::MakePointOnCurve");
- if (CORBA::is_nil(myBasicOp)) getBasicOp();
+ getBasicOp();
return myBasicOp->MakePointOnCurve(theRefCurve, theParameter);
}
CORBA::Double theDZ)
{
MESSAGE("GEOM_Superv_i::MakeVectorDXDYDZ");
- if (CORBA::is_nil(myBasicOp)) getBasicOp();
+ getBasicOp();
return myBasicOp->MakeVectorDXDYDZ(theDX, theDY, theDZ);
}
GEOM::GEOM_Object_ptr thePnt2)
{
MESSAGE("GEOM_Superv_i::MakeVector");
- if (CORBA::is_nil(myBasicOp)) getBasicOp();
+ getBasicOp();
return myBasicOp->MakeVectorTwoPnt(thePnt1, thePnt2);
}
GEOM::GEOM_Object_ptr thePnt2)
{
MESSAGE("GEOM_Superv_i::MakeLineTwoPnt");
- if (CORBA::is_nil(myBasicOp)) getBasicOp();
+ getBasicOp();
return myBasicOp->MakeLineTwoPnt(thePnt1, thePnt2);
}
CORBA::Double theTrimSize)
{
MESSAGE("GEOM_Superv_i::MakePlaneThreePnt");
- if (CORBA::is_nil(myBasicOp)) getBasicOp();
+ getBasicOp();
return myBasicOp->MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize);
}
CORBA::Double theTrimSize)
{
MESSAGE("GEOM_Superv_i::MakePlanePntVec");
- if (CORBA::is_nil(myBasicOp)) getBasicOp();
+ getBasicOp();
return myBasicOp->MakePlanePntVec(thePnt, theVec, theTrimSize);
}
CORBA::Double theTrimSize)
{
MESSAGE("GEOM_Superv_i::MakePlaneFace");
- if (CORBA::is_nil(myBasicOp)) getBasicOp();
+ getBasicOp();
return myBasicOp->MakePlaneFace(theFace, theTrimSize);
}
CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
{
MESSAGE("GEOM_Superv_i::MakeMarker");
- if (CORBA::is_nil(myBasicOp)) getBasicOp();
+ getBasicOp();
return myBasicOp->MakeMarker(theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ);
}
CORBA::Double theZ2)
{
MESSAGE("GEOM_Superv_i::MakeBox");
- if (CORBA::is_nil(myBasicOp)) getBasicOp();
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ getBasicOp();
+ get3DPrimOp();
return my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1),
myBasicOp->MakePointXYZ(theX2, theY2, theZ2));
}
CORBA::Double theDZ)
{
MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ);
}
GEOM::GEOM_Object_ptr thePnt2)
{
MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2);
}
CORBA::Double theHeight)
{
MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight);
}
CORBA::Double theH)
{
MESSAGE("GEOM_Superv_i::MakeCylinderRH");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakeCylinderRH(theR, theH);
}
CORBA::Double theRadius)
{
MESSAGE("GEOM_Superv_i::MakeSphepe");
- if (CORBA::is_nil(myBasicOp)) getBasicOp();
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ getBasicOp();
+ get3DPrimOp();
return my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
}
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR)
{
MESSAGE("GEOM_Superv_i::MakeSphereR");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakeSphereR(theR);
}
CORBA::Double theR)
{
MESSAGE("GEOM_Superv_i::MakeSpherePntR");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakeSpherePntR(thePnt, theR);
}
CORBA::Double theRMinor)
{
MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor);
}
CORBA::Double theRMinor)
{
MESSAGE("GEOM_Superv_i::MakeTorusRR");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakeTorusRR(theRMajor, theRMinor);
}
CORBA::Double theHeight)
{
MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight);
}
CORBA::Double theHeight)
{
MESSAGE("GEOM_Superv_i::MakeConeR1R2H");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight);
}
CORBA::Double theH)
{
MESSAGE("GEOM_Superv_i::MakePrismVecH");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakePrismVecH(theBase, theVec, theH);
}
GEOM::GEOM_Object_ptr thePoint2)
{
MESSAGE("GEOM_Superv_i::MakePrismTwoPnt");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2);
}
GEOM::GEOM_Object_ptr thePath)
{
MESSAGE("GEOM_Superv_i::MakePipe");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakePipe(theBase, thePath);
}
CORBA::Double theAngle)
{
MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle);
}
CORBA::Long theNbIter)
{
MESSAGE("GEOM_Superv_i::MakeFilling");
- if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp();
+ get3DPrimOp();
return my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter);
}
// theOperation indicates the operation to be done:
// 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section
MESSAGE("GEOM_Superv_i::MakeBoolean");
- if (CORBA::is_nil(myBoolOp)) getBoolOp();
+ getBoolOp();
return myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
}
GEOM::GEOM_Object_ptr theShape2)
{
MESSAGE("GEOM_Superv_i::MakeFuse");
- if (CORBA::is_nil(myBoolOp)) getBoolOp();
+ getBoolOp();
return myBoolOp->MakeBoolean(theShape1, theShape2, 3);
}
GEOM_List_i<GEOM::ListOfLong>* aListImplM =
dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theMaterials, myPOA).in());
if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
- if (CORBA::is_nil(myBoolOp)) getBoolOp();
+ getBoolOp();
return myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(),
aListImplKI->GetList(), aListImplRI->GetList(),
theLimit, theRemoveWebs, aListImplM->GetList());
GEOM::GEOM_Object_ptr thePlane)
{
MESSAGE("GEOM_Superv_i::MakeHalfPartition");
- if (CORBA::is_nil(myBoolOp)) getBoolOp();
+ getBoolOp();
return myBoolOp->MakeHalfPartition(theShape, thePlane);
}
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal)
{
MESSAGE("GEOM_Superv_i::MakeCopy");
- if (CORBA::is_nil(myInsOp)) getInsOp();
+ getInsOp();
return myInsOp->MakeCopy(theOriginal);
}
const char* theFormatName)
{
MESSAGE("GEOM_Superv_i::Export");
- if (CORBA::is_nil(myInsOp)) getInsOp();
+ getInsOp();
myInsOp->Export(theObject, theFileName, theFormatName);
}
const char* theFormatName)
{
MESSAGE("GEOM_Superv_i::Import");
- if (CORBA::is_nil(myInsOp)) getInsOp();
+ getInsOp();
return myInsOp->Import(theFileName, theFormatName);
}
GEOM::string_array_out thePatterns)
{
MESSAGE("GEOM_Superv_i::ImportTranslators");
- if (CORBA::is_nil(myInsOp)) getInsOp();
+ getInsOp();
myInsOp->ImportTranslators(theFormats, thePatterns);
}
GEOM::string_array_out thePatterns)
{
MESSAGE("GEOM_Superv_i::ExportTranslators");
- if (CORBA::is_nil(myInsOp)) getInsOp();
+ getInsOp();
myInsOp->ExportTranslators(theFormats, thePatterns);
}
GEOM::GEOM_Object_ptr thePoint2)
{
MESSAGE("GEOM_Superv_i::TranslateTwoPoints");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2);
}
GEOM::GEOM_Object_ptr thePoint2)
{
MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2);
}
CORBA::Double theDZ)
{
MESSAGE("GEOM_Superv_i::TranslateDXDYDZ");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ);
}
CORBA::Double theDZ)
{
MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ);
}
GEOM::GEOM_Object_ptr theVector)
{
MESSAGE("GEOM_Superv_i::TranslateVector");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->TranslateVector(theObject, theVector);
}
GEOM::GEOM_Object_ptr theVector)
{
MESSAGE("GEOM_Superv_i::TranslateVectorCopy");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->TranslateVectorCopy(theObject, theVector);
}
CORBA::Long theNbTimes)
{
MESSAGE("GEOM_Superv_i::MultiTranslate1D");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes);
}
CORBA::Long theNbTimes2)
{
MESSAGE("GEOM_Superv_i::MultiTranslate2D");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
theVector2, theStep2, theNbTimes2);
}
CORBA::Double theAngle)
{
MESSAGE("GEOM_Superv_i::Rotate");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->Rotate(theObject, theAxis, theAngle);
}
CORBA::Double theAngle)
{
MESSAGE("GEOM_Superv_i::RotateCopy");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->RotateCopy(theObject, theAxis, theAngle);
}
CORBA::Long theNbTimes)
{
MESSAGE("GEOM_Superv_i::MultiRotate1D");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes);
}
CORBA::Long theNbTimes2)
{
MESSAGE("GEOM_Superv_i::MultiRotate2D");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2);
}
GEOM::GEOM_Object_ptr thePlane)
{
MESSAGE("GEOM_Superv_i::MirrorPlane");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->MirrorPlane(theObject, thePlane);
}
GEOM::GEOM_Object_ptr thePlane)
{
MESSAGE("GEOM_Superv_i::MirrorPlaneCopy");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->MirrorPlaneCopy(theObject, thePlane);
}
GEOM::GEOM_Object_ptr theAxis)
{
MESSAGE("GEOM_Superv_i::MirrorAxis");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->MirrorAxis(theObject, theAxis);
}
GEOM::GEOM_Object_ptr theAxis)
{
MESSAGE("GEOM_Superv_i::MirrorAxisCopy");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->MirrorAxisCopy(theObject, theAxis);
}
GEOM::GEOM_Object_ptr thePoint)
{
MESSAGE("GEOM_Superv_i::MirrorPoint");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->MirrorPoint(theObject, thePoint);
}
GEOM::GEOM_Object_ptr thePoint)
{
MESSAGE("GEOM_Superv_i::MirrorPointCopy");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->MirrorPointCopy(theObject, thePoint);
}
CORBA::Double theOffset)
{
MESSAGE("GEOM_Superv_i::OffsetShape");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->OffsetShape(theObject, theOffset);
}
CORBA::Double theOffset)
{
MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->OffsetShapeCopy(theObject, theOffset);
}
CORBA::Double theFactor)
{
MESSAGE("GEOM_Superv_i::ScaleShape");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->ScaleShape(theObject, thePoint, theFactor);
}
CORBA::Double theFactor)
{
MESSAGE("GEOM_Superv_i::ScaleShapeCopy");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor);
}
GEOM::GEOM_Object_ptr theEndLCS)
{
MESSAGE("GEOM_Superv_i::PositionShape");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS);
}
GEOM::GEOM_Object_ptr theEndLCS)
{
MESSAGE("GEOM_Superv_i::PositionShapeCopy");
- if (CORBA::is_nil(myTransfOp)) getTransfOp();
+ getTransfOp();
return myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS);
}
GEOM::GEOM_Object_ptr thePnt2)
{
MESSAGE("GEOM_Superv_i::MakeEdge");
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
return myShapesOp->MakeEdge(thePnt1, thePnt2);
}
MESSAGE("GEOM_Superv_i::MakeWire");
if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
return myShapesOp->MakeWire(aListImplEW->GetList());
}
return NULL;
CORBA::Boolean isPlanarWanted)
{
MESSAGE("GEOM_Superv_i::MakeFace");
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
return myShapesOp->MakeFace(theWire, isPlanarWanted);
}
MESSAGE("GEOM_Superv_i::MakeFaceWires");
if (GEOM_List_i<GEOM::ListOfGO>* aListImplW =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
return myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
}
return NULL;
MESSAGE("GEOM_Superv_i::MakeShell");
if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesAndShells, myPOA).in())) {
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
return myShapesOp->MakeShell(aListImplFS->GetList());
}
return NULL;
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell)
{
MESSAGE("GEOM_Superv_i::MakeSolidShell");
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
return myShapesOp->MakeSolidShell(theShell);
}
MESSAGE("GEOM_Superv_i::MakeSolidShells");
if (GEOM_List_i<GEOM::ListOfGO>* aListImplS =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
return myShapesOp->MakeSolidShells(aListImplS->GetList());
}
return NULL;
MESSAGE("GEOM_Superv_i::MakeCompound");
if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in())) {
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
return myShapesOp->MakeCompound(aListImpl->GetList());
}
return NULL;
CORBA::Double theTolerance)
{
MESSAGE("GEOM_Superv_i::MakeGlueFaces");
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
return myShapesOp->MakeGlueFaces(theShape, theTolerance);
}
CORBA::Boolean isSorted)
{
MESSAGE("GEOM_Superv_i::MakeExplode");
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
{
MESSAGE("GEOM_Superv_i::NumberOfFaces");
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
return myShapesOp->NumberOfFaces(theShape);
}
CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
{
MESSAGE("GEOM_Superv_i::NumberOfEdges");
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
return myShapesOp->NumberOfEdges(theShape);
}
GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape)
{
MESSAGE("GEOM_Superv_i::ChangeOrientation");
- if (CORBA::is_nil(myShapesOp)) getShapesOp();
+ getShapesOp();
return myShapesOp->ChangeOrientation(theShape);
}
GEOM::GEOM_Object_ptr thePnt4)
{
MESSAGE("GEOM_Superv_i::MakeQuad4Vertices");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4);
}
GEOM::GEOM_Object_ptr theEdge4)
{
MESSAGE("GEOM_Superv_i::MakeQuad");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4);
}
GEOM::GEOM_Object_ptr theEdge2)
{
MESSAGE("GEOM_Superv_i::MakeQuad2Edges");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2);
}
GEOM::GEOM_Object_ptr theFace6)
{
MESSAGE("GEOM_Superv_i::MakeHexa");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6);
}
GEOM::GEOM_Object_ptr theFace2)
{
MESSAGE("GEOM_Superv_i::MakeHexa2Faces");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->MakeHexa2Faces(theFace1, theFace2);
}
CORBA::Double theEpsilon)
{
MESSAGE("GEOM_Superv_i::GetPoint");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon);
}
GEOM::GEOM_Object_ptr thePoint2)
{
MESSAGE("GEOM_Superv_i::GetEdge");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->GetEdge(theShape, thePoint1, thePoint2);
}
GEOM::GEOM_Object_ptr thePoint)
{
MESSAGE("GEOM_Superv_i::GetEdgeNearPoint");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->GetEdgeNearPoint(theShape, thePoint);
}
GEOM::GEOM_Object_ptr thePoint4)
{
MESSAGE("GEOM_Superv_i::GetFaceByPoints");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4);
}
GEOM::GEOM_Object_ptr theEdge2)
{
MESSAGE("GEOM_Superv_i::GetFaceByEdges");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2);
}
GEOM::GEOM_Object_ptr theFace)
{
MESSAGE("GEOM_Superv_i::GetOppositeFace");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->GetOppositeFace(theBlock, theFace);
}
GEOM::GEOM_Object_ptr thePoint)
{
MESSAGE("GEOM_Superv_i::GetFaceNearPoint");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->GetFaceNearPoint(theShape, thePoint);
}
GEOM::GEOM_Object_ptr theVector)
{
MESSAGE("GEOM_Superv_i::GetFaceByNormale");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->GetFaceByNormale(theBlock, theVector);
}
CORBA::Long& theNbBlocks)
{
MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks);
}
GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors)
{
MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
}
const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
{
MESSAGE("GEOM_Superv_i::PrintBCErrors");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->PrintBCErrors(theCompound, theErrors);
}
CORBA::Long theMaxNbFaces)
{
MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
return aListPtr->_this();
GEOM::GEOM_Object_ptr thePoint)
{
MESSAGE("GEOM_Superv_i::GetBlockNearPoint");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->GetBlockNearPoint(theCompound, thePoint);
}
MESSAGE("GEOM_Superv_i::GetBlockByParts");
if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
}
return NULL;
MESSAGE("GEOM_Superv_i::GetBlocksByParts");
if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
CORBA::Long theNbTimes)
{
MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes);
}
CORBA::Long theNbTimesV)
{
MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D");
- if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
+ getBlocksOp();
return myBlocksOp->MakeMultiTransformation2D(theBlock,
theDirFace1U, theDirFace2U, theNbTimesU,
theDirFace1V, theDirFace2V, theNbTimesV);
CORBA::Double theR)
{
MESSAGE("GEOM_Superv_i::MakeCirclePntVecR");
- if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
+ getCurvesOp();
return myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR);
}
GEOM::GEOM_Object_ptr thePnt3)
{
MESSAGE("GEOM_Superv_i::MakeCircleThreePnt");
- if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
+ getCurvesOp();
return myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3);
}
CORBA::Double theRMinor)
{
MESSAGE("GEOM_Superv_i::MakeEllipse");
- if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
+ getCurvesOp();
return myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor);
}
GEOM::GEOM_Object_ptr thePnt3)
{
MESSAGE("GEOM_Superv_i::MakeArc");
- if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
+ getCurvesOp();
return myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3);
}
MESSAGE("GEOM_Superv_i::MakePolyline");
if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
- if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
+ getCurvesOp();
return myCurvesOp->MakePolyline(aListImplP->GetList());
}
return NULL;
MESSAGE("GEOM_Superv_i::MakeSplineBezier");
if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
- if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
+ getCurvesOp();
return myCurvesOp->MakeSplineBezier(aListImplP->GetList());
}
return NULL;
MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
- if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
+ getCurvesOp();
return myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
}
return NULL;
MESSAGE("GEOM_Superv_i::MakeSketcher");
if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP =
dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
- if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
+ getCurvesOp();
return myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
}
return NULL;
CORBA::Double theR)
{
MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher");
- if (CORBA::is_nil(myLocalOp)) getLocalOp();
+ getLocalOp();
return myLocalOp->MakeFilletAll(theShape, theR);
}
MESSAGE("GEOM_Superv_i::MakeFilletEdges");
if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
- if (CORBA::is_nil(myLocalOp)) getLocalOp();
+ getLocalOp();
return myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList());
}
return NULL;
MESSAGE("GEOM_Superv_i::MakeFilletFaces");
if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
- if (CORBA::is_nil(myLocalOp)) getLocalOp();
+ getLocalOp();
return myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList());
}
return NULL;
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD)
{
MESSAGE("GEOM_Superv_i::MakeChamferAll");
- if (CORBA::is_nil(myLocalOp)) getLocalOp();
+ getLocalOp();
return myLocalOp->MakeChamferAll(theShape, theD);
}
CORBA::Long theFace1, CORBA::Long theFace2)
{
MESSAGE("GEOM_Superv_i::MakeChamferEdge");
- if (CORBA::is_nil(myLocalOp)) getLocalOp();
+ getLocalOp();
return myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2);
}
MESSAGE("GEOM_Superv_i::MakeChamferFaces");
if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
- if (CORBA::is_nil(myLocalOp)) getLocalOp();
+ getLocalOp();
return myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList());
}
return NULL;
CORBA::Double theMeshingDeflection)
{
MESSAGE("GEOM_Superv_i::MakeArchimede");
- if (CORBA::is_nil(myLocalOp)) getLocalOp();
+ getLocalOp();
return myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection);
}
GEOM::GEOM_Object_ptr theSubShape)
{
MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede");
- if (CORBA::is_nil(myLocalOp)) getLocalOp();
+ getLocalOp();
return myLocalOp->GetSubShapeIndex(theShape, theSubShape);
}
CORBA::Long theShapeType)
{
MESSAGE("GEOM_Superv_i::CreateGroup");
- if (CORBA::is_nil(myGroupOp)) getGroupOp();
+ getGroupOp();
return myGroupOp->CreateGroup(theMainShape, theShapeType);
}
CORBA::Long theSubShapeId)
{
MESSAGE("GEOM_Superv_i::AddObject");
- if (CORBA::is_nil(myGroupOp)) getGroupOp();
+ getGroupOp();
myGroupOp->AddObject(theGroup, theSubShapeId);
}
CORBA::Long theSubShapeId)
{
MESSAGE("GEOM_Superv_i::RemoveObject");
- if (CORBA::is_nil(myGroupOp)) getGroupOp();
+ getGroupOp();
myGroupOp->RemoveObject(theGroup, theSubShapeId);
}
CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup)
{
MESSAGE("GEOM_Superv_i::GetType");
- if (CORBA::is_nil(myGroupOp)) getGroupOp();
+ getGroupOp();
return myGroupOp->GetType(theGroup);
}
GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup)
{
MESSAGE("GEOM_Superv_i::GetMainShape");
- if (CORBA::is_nil(myGroupOp)) getGroupOp();
+ getGroupOp();
return myGroupOp->GetMainShape(theGroup);
}
GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
{
MESSAGE("GEOM_Superv_i::GetObjects");
- if (CORBA::is_nil(myGroupOp)) getGroupOp();
+ getGroupOp();
GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));