*/
//=============================================================================
-HYBRIDPlugin_HYBRID::HYBRIDPlugin_HYBRID(int hypId, int studyId, SMESH_Gen* gen)
- : SMESH_3D_Algo(hypId, studyId, gen)
+HYBRIDPlugin_HYBRID::HYBRIDPlugin_HYBRID(int hypId, SMESH_Gen* gen)
+ : SMESH_3D_Algo(hypId, gen)
{
MESSAGE("HYBRIDPlugin_HYBRID::HYBRIDPlugin_HYBRID");
_name = Name();
_nbShape=0;
_compatibleHypothesis.push_back( HYBRIDPlugin_Hypothesis::GetHypType());
//_compatibleHypothesis.push_back( StdMeshers_ViscousLayers::GetHypType() );
- _requireShape = false; // can work without shape_studyId
+ _requireShape = false; // can work without shape
smeshGen_i = SMESH_Gen_i::GetSMESHGen();
- CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/myStudyManager");
- SALOMEDS::StudyManager_var aStudyMgr = SALOMEDS::StudyManager::_narrow(anObject);
+ CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/Study");
- MESSAGE("studyid = " << _studyId);
-
- myStudy = NULL;
- myStudy = aStudyMgr->GetStudyByID(_studyId);
+ myStudy = SALOMEDS::Study::_narrow(anObject);
if (!myStudy->_is_nil())
- MESSAGE("myStudy->StudyId() = " << myStudy->StudyId());
+ MESSAGE("Study not empty");
_computeCanceled = false;
}
//=============================================================================
HYBRIDPlugin_HYBRID_i::HYBRIDPlugin_HYBRID_i (PortableServer::POA_ptr thePOA,
- int theStudyId,
- ::SMESH_Gen* theGenImpl )
+ ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ),
SMESH_Algo_i( thePOA ),
{
MESSAGE( "HYBRIDPlugin_HYBRID_i::HYBRIDPlugin_HYBRID_i" );
myBaseImpl = new ::HYBRIDPlugin_HYBRID (theGenImpl->GetANewId(),
- theStudyId,
- theGenImpl );
+ theGenImpl );
}
//=============================================================================
MESSAGE( "HYBRIDPlugin_HYBRID_i::importGMFMesh" );
SMESH_Gen_i* smeshGen = SMESH_Gen_i::GetSMESHGen();
SMESH::SMESH_Mesh_ptr theMesh = smeshGen->CreateEmptyMesh();
- smeshGen->RemoveLastFromPythonScript(smeshGen->GetCurrentStudy()->StudyId());
- SALOMEDS::SObject_ptr theSMesh = smeshGen->ObjectToSObject(smeshGen->GetCurrentStudy(), theMesh);
+ smeshGen->RemoveLastFromPythonScript();
+ SALOMEDS::SObject_ptr theSMesh = smeshGen->ObjectToSObject(theMesh);
#ifdef WINNT
#define SEP '\\'
#else
//function : HYBRIDPlugin_Hypothesis_i
//=======================================================================
HYBRIDPlugin_Hypothesis_i::HYBRIDPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
- int theStudyId,
- ::SMESH_Gen* theGenImpl)
+ ::SMESH_Gen* theGenImpl)
: SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA )
{
MESSAGE( "HYBRIDPlugin_Hypothesis_i::HYBRIDPlugin_Hypothesis_i" );
myBaseImpl = new ::HYBRIDPlugin_Hypothesis (theGenImpl->GetANewId(),
- theStudyId,
theGenImpl);
}
CORBA::Double x = 0, y = 0, z = 0;
CORBA::Boolean isCompound = false;
GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine();
- SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
if (theVertexEntry.empty()) {
std::string aName;
if (theVertex->GetShapeType() == GEOM::VERTEX) {
isCompound = true;
}
aName += theVertex->GetEntry();
- SALOMEDS::SObject_ptr theSVertex = geomGen->PublishInStudy(smeshGen->GetCurrentStudy(), NULL, theVertex, aName.c_str());
+ SALOMEDS::SObject_ptr theSVertex = geomGen->PublishInStudy(NULL, theVertex, aName.c_str());
if (!theSVertex->_is_nil())
theVertexEntry = theSVertex->GetID();
}
THROW_SALOME_CORBA_EXCEPTION( "Geom object is not published in study" ,SALOME::BAD_PARAM );
if (theVertex->GetShapeType() == GEOM::VERTEX) {
- GEOM::GEOM_IMeasureOperations_var measureOp = geomGen->GetIMeasureOperations( smeshGen->GetCurrentStudy()->StudyId() );
+ GEOM::GEOM_IMeasureOperations_var measureOp = geomGen->GetIMeasureOperations();
if (CORBA::is_nil(measureOp))
return false;
CORBA::Double x = 0, y = 0, z = 0;
CORBA::Boolean isCompound = false;
GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine();
- SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
if (theVertexEntry.empty()) {
std::string aName;
if (theVertex->GetShapeType() == GEOM::VERTEX) {
isCompound = true;
}
aName += theVertex->GetEntry();
- SALOMEDS::SObject_ptr theSVertex = geomGen->PublishInStudy(smeshGen->GetCurrentStudy(), NULL, theVertex, aName.c_str());
+ SALOMEDS::SObject_ptr theSVertex = geomGen->PublishInStudy(NULL, theVertex, aName.c_str());
if (!theSVertex->_is_nil())
theVertexEntry = theSVertex->GetID();
}
THROW_SALOME_CORBA_EXCEPTION( "Geom object is not published in study" ,SALOME::BAD_PARAM );
if (theVertex->GetShapeType() == GEOM::VERTEX) {
- GEOM::GEOM_IMeasureOperations_var measureOp = geomGen->GetIMeasureOperations( smeshGen->GetCurrentStudy()->StudyId() );
+ GEOM::GEOM_IMeasureOperations_var measureOp = geomGen->GetIMeasureOperations();
if (CORBA::is_nil(measureOp))
return false;
std::string theVertexEntry = theVertex->GetStudyEntry();
if (theVertexEntry.empty()) {
GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine();
- SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
std::string aName;
if (theVertex->GetShapeType() == GEOM::VERTEX)
aName = "Vertex_";
if (theVertex->GetShapeType() == GEOM::COMPOUND)
aName = "Compound_";
aName += theVertex->GetEntry();
- SALOMEDS::SObject_ptr theSVertex = geomGen->PublishInStudy(smeshGen->GetCurrentStudy(), NULL, theVertex, aName.c_str());
+ SALOMEDS::SObject_ptr theSVertex = geomGen->PublishInStudy(NULL, theVertex, aName.c_str());
if (!theSVertex->_is_nil())
theVertexEntry = theSVertex->GetID();
}
std::string theVertexEntry = theVertex->GetStudyEntry();
if (theVertexEntry.empty()) {
GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine();
- SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
std::string aName;
if (theVertex->GetShapeType() == GEOM::VERTEX)
aName = "Vertex_";
if (theVertex->GetShapeType() == GEOM::COMPOUND)
aName = "Compound_";
aName += theVertex->GetEntry();
- SALOMEDS::SObject_ptr theSVertex = geomGen->PublishInStudy(smeshGen->GetCurrentStudy(), NULL, theVertex, aName.c_str());
+ SALOMEDS::SObject_ptr theSVertex = geomGen->PublishInStudy(NULL, theVertex, aName.c_str());
if (!theSVertex->_is_nil())
theVertexEntry = theSVertex->GetID();
}
SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::SObject_ptr SObj = smeshGen->ObjectToSObject(smeshGen->GetCurrentStudy(),theSource);
+ SALOMEDS::SObject_ptr SObj = smeshGen->ObjectToSObject(theSource);
SMESH_Mesh_i* theMesh_i = SMESH::DownCast<SMESH_Mesh_i*>( theSource);
SMESH_Group_i* theGroup_i = SMESH::DownCast<SMESH_Group_i*>( theSource);