*/
//=============================================================================
-GHS3DPlugin_GHS3D::GHS3DPlugin_GHS3D(int hypId, int studyId, SMESH_Gen* gen)
- : SMESH_3D_Algo(hypId, studyId, gen), _isLibUsed( false )
+GHS3DPlugin_GHS3D::GHS3DPlugin_GHS3D(int hypId, SMESH_Gen* gen)
+ : SMESH_3D_Algo(hypId, gen), _isLibUsed( false )
{
MESSAGE("GHS3DPlugin_GHS3D::GHS3DPlugin_GHS3D");
_name = Name();
_nbShape=0;
_compatibleHypothesis.push_back( GHS3DPlugin_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");
+ _study = SALOMEDS::Study::_narrow(anObject);
- MESSAGE("studyid = " << _studyId);
-
- _study = NULL;
- _study = aStudyMgr->GetStudyByID(_studyId);
if (!_study->_is_nil())
- MESSAGE("_study->StudyId() = " << _study->StudyId());
+ MESSAGE("Study not empty");
_computeCanceled = false;
_progressAdvance = 1e-4;
//=============================================================================
GHS3DPlugin_GHS3D_i::GHS3DPlugin_GHS3D_i (PortableServer::POA_ptr thePOA,
- int theStudyId,
::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ),
{
MESSAGE( "GHS3DPlugin_GHS3D_i::GHS3DPlugin_GHS3D_i" );
myBaseImpl = new ::GHS3DPlugin_GHS3D (theGenImpl->GetANewId(),
- theStudyId,
theGenImpl );
}
MESSAGE( "GHS3DPlugin_GHS3D_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
//=======================================================================
GHS3DPlugin_Hypothesis_i::GHS3DPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
- int theStudyId,
::SMESH_Gen* theGenImpl)
: SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA )
{
MESSAGE( "GHS3DPlugin_Hypothesis_i::GHS3DPlugin_Hypothesis_i" );
myBaseImpl = new ::GHS3DPlugin_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()) {
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()) {
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;
string theVertexEntry = theVertex->GetStudyEntry();
if (theVertexEntry.empty()) {
GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine();
- SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
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();
}
string theVertexEntry = theVertex->GetStudyEntry();
if (theVertexEntry.empty()) {
GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine();
- SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
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);