- MESSAGE("SMESH_Mesh::AddHypothesis");
-
- StudyContextStruct* sc = _gen->GetStudyContext(_studyId);
- if (sc->mapHypothesis.find(anHypId) == sc->mapHypothesis.end())
- {
- MESSAGE("Hypothesis ID does not give an hypothesis");
- SCRUTE(_studyId);
- SCRUTE(anHypId);
- throw SALOME_Exception(LOCALIZED("hypothesis does not exist"));
- }
-
- SMESH_subMesh* subMesh = GetSubMesh(aSubShape);
- SMESH_Hypothesis* anHyp = sc->mapHypothesis[anHypId];
- int event;
-
- // shape
-
- if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO)
- event = SMESH_subMesh::ADD_HYP;
- else
- event = SMESH_subMesh::ADD_ALGO;
- int ret = subMesh->AlgoStateEngine(event, anHyp);
-
- // subShapes (only when shape is mainShape)
- TopoDS_Shape mainShape = _myMeshDS->ShapeToMesh();
- if (aSubShape.IsSame(mainShape))
- {
- if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO)
- event = SMESH_subMesh::ADD_FATHER_HYP;
- else
- event = SMESH_subMesh::ADD_FATHER_ALGO;
- subMesh->SubMeshesAlgoStateEngine(event, anHyp);
- }
-
- subMesh->DumpAlgoState(true);
- //SCRUTE(ret);
- return ret;
+ MESSAGE("SMESH_Mesh::AddHypothesis");
+
+ StudyContextStruct *sc = _gen->GetStudyContext(_studyId);
+ if (sc->mapHypothesis.find(anHypId) == sc->mapHypothesis.end())
+ {
+ MESSAGE("Hypothesis ID does not give an hypothesis");
+ SCRUTE(_studyId);
+ SCRUTE(anHypId);
+ throw SALOME_Exception(LOCALIZED("hypothesis does not exist"));
+ }
+
+ SMESH_subMesh *subMesh = GetSubMesh(aSubShape);
+ SMESH_Hypothesis *anHyp = sc->mapHypothesis[anHypId];
+ int event;
+
+ // shape
+
+ if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO)
+ event = SMESH_subMesh::ADD_HYP;
+ else
+ event = SMESH_subMesh::ADD_ALGO;
+ int ret = subMesh->AlgoStateEngine(event, anHyp);
+
+ // subShapes (only when shape is mainShape)
+ TopoDS_Shape mainShape = _myMeshDS->ShapeToMesh();
+ if (aSubShape.IsSame(mainShape))
+ {
+ if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO)
+ event = SMESH_subMesh::ADD_FATHER_HYP;
+ else
+ event = SMESH_subMesh::ADD_FATHER_ALGO;
+ subMesh->SubMeshesAlgoStateEngine(event, anHyp);
+ }
+
+ subMesh->DumpAlgoState(true);
+ //SCRUTE(ret);
+ return ret;