{
if ( !CORBA::is_nil(myGeomEngine) )
return;
- // get GEOM_Gen engine
- /*
- SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
- Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" );
- */
+ // get GEOM_Gen engine
Engines::Container_var cont=GetContainerRef();
- cont->load_component_Library("GEOM");
- Engines::Component_var comp=cont->create_component_instance("GEOM",0);
+ CORBA::String_var container_name=cont->name();
+ std::string shortName=container_name.in();
+ shortName=shortName.substr(12); // substract "/Containers/"
+ SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
+ Engines::Component_var comp = lcc->FindOrLoad_Component( shortName.c_str(), "GEOM" );
+ delete lcc;
myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
}
return anObj;
}
+//=============================================================================
+// MakeFaceHW:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceHW (CORBA::Double theH,
+ CORBA::Double theW)
+{
+ beginService( " GEOM_Superv_i::MakeFaceHW" );
+ MESSAGE("GEOM_Superv_i::MakeFaceHW");
+ get3DPrimOp();
+ GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFaceHW(theH, theW);
+ endService( " GEOM_Superv_i::MakeFaceHW" );
+ return anObj;
+}
+
+//=============================================================================
+// MakeFaceTwoPlaneHW:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFacePlaneHW (GEOM::GEOM_Object_ptr theFace,
+ CORBA::Double theH,
+ CORBA::Double theW)
+{
+ beginService( " GEOM_Superv_i::MakeFacePlaneHW" );
+ MESSAGE("GEOM_Superv_i::MakeFacePlaneHW");
+ get3DPrimOp();
+ GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFacePlaneHW(theFace, theH, theW);
+ endService( " GEOM_Superv_i::MakeFacePlaneHW" );
+ return anObj;
+}
+
+//=============================================================================
+// MakeDiskPntVecR:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDiskPntVecR (GEOM::GEOM_Object_ptr theCenter,
+ GEOM::GEOM_Object_ptr theVector,
+ CORBA::Double theR)
+{
+ beginService( " GEOM_Superv_i::MakeDiskPntVecR" );
+ MESSAGE("GEOM_Superv_i::MakeDiskPntVecR");
+ get3DPrimOp();
+ GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeDiskPntVecR(theCenter, theVector, theR);
+ endService( " GEOM_Superv_i::MakeDiskPntVecR" );
+ return anObj;
+}
+
+//=============================================================================
+// MakeDiskThreePnt:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDiskThreePnt (GEOM::GEOM_Object_ptr thePnt1,
+ GEOM::GEOM_Object_ptr thePnt2,
+ GEOM::GEOM_Object_ptr thePnt3)
+{
+ beginService( " GEOM_Superv_i::MakeDiskThreePnt" );
+ MESSAGE("GEOM_Superv_i::MakeDiskThreePnt");
+ get3DPrimOp();
+ GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeDiskThreePnt(thePnt1, thePnt2, thePnt3);
+ endService( " GEOM_Superv_i::MakeDiskThreePnt" );
+ return anObj;
+}
+
//=============================================================================
// MakeCylinderPntVecRH:
//=============================================================================
MESSAGE("GEOM_Superv_i::MakeSphepe");
getBasicOp();
get3DPrimOp();
- GEOM::GEOM_Object_var o = myBasicOp->MakePointXYZ(theX, theY, theZ);
- GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(o, theRadius);
- o->Destroy();
+ GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
endService( " GEOM_Superv_i::MakeSphepe" );
return anObj;
}
return anObj;
}
+//=============================================================================
+// MakePrismDXDYDZ:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismDXDYDZ (GEOM::GEOM_Object_ptr theBase,
+ CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ)
+{
+ beginService( " GEOM_Superv_i::MakePrismDXDYDZ" );
+ MESSAGE("GEOM_Superv_i::MakePrismDXDYDZ");
+ get3DPrimOp();
+ GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismDXDYDZ(theBase, theDX, theDY, theDZ);
+ endService( " GEOM_Superv_i::MakePrismDXDYDZ" );
+ return anObj;
+}
+
+//=============================================================================
+// MakePrismDXDYDZ:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismDXDYDZ2Ways (GEOM::GEOM_Object_ptr theBase,
+ CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ)
+{
+ beginService( " GEOM_Superv_i::MakePrismDXDYDZ2Ways" );
+ MESSAGE("GEOM_Superv_i::MakePrismDXDYDZ2Ways");
+ get3DPrimOp();
+ GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ);
+ endService( " GEOM_Superv_i::MakePrismDXDYDZ2Ways" );
+ return anObj;
+}
+
//=============================================================================
// MakePipe:
//=============================================================================
return anObj;
}
+//=============================================================================
+// TranslateVectorDistance:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
+ GEOM::GEOM_Object_ptr theVector,
+ CORBA::Double theDistance,
+ CORBA::Boolean theCopy)
+{
+ beginService( " GEOM_Superv_i::TranslateVectorDistance" );
+ MESSAGE("GEOM_Superv_i::TranslateVectorDistance");
+ getTransfOp();
+ GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorDistance(theObject,
+ theVector, theDistance, theCopy);
+ endService( " GEOM_Superv_i::TranslateVectorDistance" );
+ return anObj;
+}
+
//=============================================================================
// MultiTranslate1D:
//=============================================================================
return anObj;
}
+//=============================================================================
+// ScaleShapeAlongAxes:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject,
+ GEOM::GEOM_Object_ptr thePoint,
+ CORBA::Double theFactorX,
+ CORBA::Double theFactorY,
+ CORBA::Double theFactorZ)
+{
+ beginService( " GEOM_Superv_i::ScaleShapeAlongAxes" );
+ MESSAGE("GEOM_Superv_i::ScaleShapeAlongAxes");
+ getTransfOp();
+ GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeAlongAxes
+ (theObject, thePoint, theFactorX, theFactorY, theFactorZ);
+ endService( " GEOM_Superv_i::ScaleShapeAlongAxes" );
+ return anObj;
+}
+
+//=============================================================================
+// ScaleShapeAlongAxesCopy:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject,
+ GEOM::GEOM_Object_ptr thePoint,
+ CORBA::Double theFactorX,
+ CORBA::Double theFactorY,
+ CORBA::Double theFactorZ)
+{
+ beginService( " GEOM_Superv_i::ScaleShapeAlongAxesCopy" );
+ MESSAGE("GEOM_Superv_i::ScaleShapeAlongAxesCopy");
+ getTransfOp();
+ GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeAlongAxesCopy
+ (theObject, thePoint, theFactorX, theFactorY, theFactorZ);
+ endService( " GEOM_Superv_i::ScaleShapeAlongAxesCopy" );
+ return anObj;
+}
+
//=============================================================================
// PositionShape:
//=============================================================================
return aRes;
}
+
//=============================================================================
// ChangeOrientation:
//=============================================================================
}
+//=============================================================================
+// GetShapesOnShape:
+//=============================================================================
+GEOM::GEOM_List_ptr GEOM_Superv_i::GetShapesOnShape
+ (GEOM::GEOM_Object_ptr theCheckShape,
+ GEOM::GEOM_Object_ptr theShape,
+ CORBA::Short theShapeType,
+ GEOM::shape_state theState)
+{
+ beginService( " GEOM_Superv_i::GetShapesOnShape" );
+ MESSAGE("GEOM_Superv_i::GetShapesOnShape");
+ getShapesOp();
+ GEOM::ListOfGO* aList =
+ myShapesOp->GetShapesOnShape(theCheckShape, theShape, theShapeType, theState);
+ GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
+ MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
+ endService( " GEOM_Superv_i::GetShapesOnShape" );
+ return aListPtr->_this();
+}
+
+
+//=============================================================================
+// GetShapesOnShapeAsCompound:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::GetShapesOnShapeAsCompound
+ (GEOM::GEOM_Object_ptr theCheckShape,
+ GEOM::GEOM_Object_ptr theShape,
+ CORBA::Short theShapeType,
+ GEOM::shape_state theState)
+{
+ beginService( " GEOM_Superv_i::GetShapesOnShapeAsCompound" );
+ MESSAGE("GEOM_Superv_i::GetShapesOnShapeAsCompound");
+ getShapesOp();
+ GEOM::GEOM_Object_ptr anObj =
+ myShapesOp->GetShapesOnShapeAsCompound(theCheckShape, theShape, theShapeType, theState);
+ endService( " GEOM_Superv_i::GetShapesOnShapeAsCompound" );
+ return anObj;
+}
+
+
//=============================== BlocksOperations ============================
//=============================================================================
// MakeQuad4Vertices: