X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Hypothesis.cxx;h=268581791170f4134cbd12309f7dfe2118f5bb2d;hp=0d61a5f52eefc1db745c75da57e40b73786ec04c;hb=4ff5bd61540272713e48de1eee75625028c32155;hpb=4791f5b30ea7a9c1247aa551750dc71cb83b99aa diff --git a/src/SMESH/SMESH_Hypothesis.cxx b/src/SMESH/SMESH_Hypothesis.cxx index 0d61a5f52..268581791 100644 --- a/src/SMESH/SMESH_Hypothesis.cxx +++ b/src/SMESH/SMESH_Hypothesis.cxx @@ -30,6 +30,7 @@ using namespace std; using namespace std; #include "SMESH_Hypothesis.hxx" #include "SMESH_Gen.hxx" +#include "SMESH_subMesh.hxx" #include "utilities.h" //============================================================================= @@ -48,8 +49,8 @@ SMESH_Hypothesis::SMESH_Hypothesis(int hypId, StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId); myStudyContext->mapHypothesis[_hypId] = this; _type = PARAM_ALGO; -// _shapeType = -1; // to be set by algo with TopAbs_Enum _shapeType = 0; // to be set by algo with TopAbs_Enum + _param_algo_dim = -1; // to be set by algo parameter } //============================================================================= @@ -69,14 +70,16 @@ SMESH_Hypothesis::~SMESH_Hypothesis() */ //============================================================================= -int SMESH_Hypothesis::GetDim() +int SMESH_Hypothesis::GetDim() const { - int dim = -1; + int dim = 0; switch (_type) { case ALGO_1D: dim = 1; break; case ALGO_2D: dim = 2; break; case ALGO_3D: dim = 3; break; + case PARAM_ALGO: + dim = ( _param_algo_dim < 0 ) ? -_param_algo_dim : _param_algo_dim; break; } return dim; } @@ -87,7 +90,7 @@ int SMESH_Hypothesis::GetDim() */ //============================================================================= -int SMESH_Hypothesis::GetShapeType() +int SMESH_Hypothesis::GetShapeType() const { return _shapeType; } @@ -98,7 +101,7 @@ int SMESH_Hypothesis::GetShapeType() */ //============================================================================= -int SMESH_Hypothesis::GetStudyId() +int SMESH_Hypothesis::GetStudyId() const { return _studyId; } @@ -122,14 +125,40 @@ void SMESH_Hypothesis::NotifySubMeshesHypothesisModification() itm++) { SMESH_Mesh* mesh = (*itm).second; - const list& subMeshes = - mesh->GetSubMeshUsingHypothesis(this); + mesh->NotifySubMeshesHypothesisModification( this ); +// const list& subMeshes = +// mesh->GetSubMeshUsingHypothesis(this); - //for all subMeshes using hypothesis +// //for all subMeshes using hypothesis - list::const_iterator its; - for (its = subMeshes.begin(); its != subMeshes.end(); its++) - (*its)->ComputeStateEngine(SMESH_subMesh::MODIF_HYP); +// list::const_iterator its; +// for (its = subMeshes.begin(); its != subMeshes.end(); its++) +// (*its)->ComputeStateEngine(SMESH_subMesh::MODIF_HYP); } } +//============================================================================= +/*! + * + */ +//============================================================================= + +const char* SMESH_Hypothesis::GetLibName() const +{ +// MESSAGE("SMESHDS_Hypothesis::GetLibName"); +// SCRUTE(_LibName); +// SCRUTE(&_LibName); + return _libName.c_str(); +} + +//============================================================================= +/*! + * + */ +//============================================================================= + +void SMESH_Hypothesis::SetLibName(const char* theLibName) +{ +// MESSAGE("SMESHDS_Hypothesis::SetLibName"); + _libName = string(theLibName); +}