// Module : SMESH
// $Header$
-using namespace std;
using namespace std;
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include "SMESH_LocalLength_i.hxx"
#include "SMESH_NumberOfSegments_i.hxx"
#include "SMESH_MaxElementArea_i.hxx"
+#include "SMESH_MaxElementVolume_i.hxx"
#include "SMESHDS_Document.hxx"
//************branch 1 : hypothesis
if (gotBranch->Tag()==Tag_HypothesisRoot) { //hypothesis = tag 1
- double length,maxElementsArea;
+ double length,maxElementsArea,maxElementsVolume;
int numberOfSegments;
destFile = fopen( hypofile.ToCString() ,"w");
maxElementsArea = MEA->GetMaxElementArea();
fprintf(destFile,"%f\n",maxElementsArea);
}
+ else if (strcmp(myHyp->GetName(),"MaxElementVolume")==0) {
+ SMESH::SMESH_MaxElementVolume_var MEV = SMESH::SMESH_MaxElementVolume::_narrow( myHyp );
+ maxElementsVolume = MEV->GetMaxElementVolume();
+ fprintf(destFile,"%f\n",maxElementsVolume);
+ }
}
}
fclose(destFile);
int meshId = myMesh->GetId();
SMESH_Mesh_i* meshServant = myStudyContext->mapMesh_i[meshId];
::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
- Handle(SMESHDS_Mesh) mySMESHDSMesh = myLocMesh.GetMeshDS();
+ SMESHDS_Mesh* mySMESHDSMesh = myLocMesh.GetMeshDS();
SCRUTE(mySMESHDSMesh->NbNodes());
if (mySMESHDSMesh->NbNodes()>0) {//checks if the mesh is not empty
_NS->init_orb( _orb ) ;
SALOME_LifeCycleCORBA* myEnginesLifeCycle = new SALOME_LifeCycleCORBA(_NS);
Engines::Component_var geomEngine =
- myEnginesLifeCycle->FindOrLoad_Component("FactoryServer","Geometry");
+ myEnginesLifeCycle->FindOrLoad_Component("FactoryServer","GEOM");
GEOM::GEOM_Gen_var myGeomEngine = GEOM::GEOM_Gen::_narrow(geomEngine);
//***************
if (strcmp(name,"Hypothesis")==0) {
- double length,maxElementsArea;
+ double length,maxElementsArea,maxElementsVolume;
int numberOfSegments;
hdf_group[Tag_HypothesisRoot] = new HDFgroup(name,hdf_file);
sprintf(objectId,"%d",MEA->GetId());
_SMESHCorbaObj[string("Hypo_")+string(objectId)] = iorString;
}
+ else if (strcmp(aLine,"MaxElementVolume")==0) {
+ SMESH::SMESH_Hypothesis_var myHyp = this->CreateHypothesis(aLine,studyId);
+ SMESH::SMESH_MaxElementVolume_var MEV = SMESH::SMESH_MaxElementVolume::_narrow( myHyp );
+ fscanf(loadedFile,"%s",aLine);
+ maxElementsVolume = atof(aLine);
+ MEV->SetMaxElementVolume(maxElementsVolume);
+ string iorString = _orb->object_to_string(MEV);
+ sprintf(objectId,"%d",MEV->GetId());
+ _SMESHCorbaObj[string("Hypo_")+string(objectId)] = iorString;
+ }
}
int meshId = myNewMesh->GetId();
SMESH_Mesh_i* meshServant = myStudyContext->mapMesh_i[meshId];
::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
- Handle(SMESHDS_Mesh) mySMESHDSMesh = myLocMesh.GetMeshDS();
+ SMESHDS_Mesh* mySMESHDSMesh = myLocMesh.GetMeshDS();
DriverMED_R_SMESHDS_Mesh* myReader = new DriverMED_R_SMESHDS_Mesh;