From: mzn Date: Mon, 30 Oct 2006 08:53:15 +0000 (+0000) Subject: Correction. Allows to fix the problem with shell meshing. X-Git-Tag: V3_2_3pre1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6952c46a03cfa0a7fff84d98f9220444be3690bc;p=modules%2Fsmesh.git Correction. Allows to fix the problem with shell meshing. --- diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index a56b7a826..a2cbb8e3c 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -359,21 +359,17 @@ SMESH_Hypothesis::Hypothesis_Status // shape - int event; - if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO) - event = SMESH_subMesh::ADD_HYP; - else - event = SMESH_subMesh::ADD_ALGO; + bool isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO ); + int event = isAlgo ? SMESH_subMesh::ADD_ALGO : SMESH_subMesh::ADD_HYP; + SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp); // subShapes if (!SMESH_Hypothesis::IsStatusFatal(ret) && - !subMesh->IsApplicableHypotesis( anHyp )) // is added on father + anHyp->GetDim() <= SMESH_Gen::GetShapeDim(aSubShape)) // is added on father { - if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO) - event = SMESH_subMesh::ADD_FATHER_HYP; - else - event = SMESH_subMesh::ADD_FATHER_ALGO; + event = isAlgo ? SMESH_subMesh::ADD_FATHER_ALGO : SMESH_subMesh::ADD_FATHER_HYP; + SMESH_Hypothesis::Hypothesis_Status ret2 = subMesh->SubMeshesAlgoStateEngine(event, anHyp); if (ret2 > ret) @@ -444,14 +440,12 @@ SMESH_Hypothesis::Hypothesis_Status SMESH_Hypothesis *anHyp = sc->mapHypothesis[anHypId]; int hypType = anHyp->GetType(); if(MYDEBUG) SCRUTE(hypType); - int event; // shape - if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO) - event = SMESH_subMesh::REMOVE_HYP; - else - event = SMESH_subMesh::REMOVE_ALGO; + bool isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO ); + int event = isAlgo ? SMESH_subMesh::REMOVE_ALGO : SMESH_subMesh::REMOVE_HYP; + SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp); // there may appear concurrent hyps that were covered by the removed hyp @@ -462,12 +456,10 @@ SMESH_Hypothesis::Hypothesis_Status // subShapes if (!SMESH_Hypothesis::IsStatusFatal(ret) && - !subMesh->IsApplicableHypotesis( anHyp )) // is removed from father + anHyp->GetDim() <= SMESH_Gen::GetShapeDim(aSubShape)) // is removed from father { - if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO) - event = SMESH_subMesh::REMOVE_FATHER_HYP; - else - event = SMESH_subMesh::REMOVE_FATHER_ALGO; + event = isAlgo ? SMESH_subMesh::REMOVE_FATHER_ALGO : SMESH_subMesh::REMOVE_FATHER_HYP; + SMESH_Hypothesis::Hypothesis_Status ret2 = subMesh->SubMeshesAlgoStateEngine(event, anHyp); if (ret2 > ret) // more severe