Correction. Allows to fix the problem with shell meshing.

This commit is contained in:
mzn 2006-10-30 08:53:15 +00:00
parent 7490467772
commit 6952c46a03

View File

@ -359,21 +359,17 @@ SMESH_Hypothesis::Hypothesis_Status
// shape // shape
int event; bool isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO );
if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO) int event = isAlgo ? SMESH_subMesh::ADD_ALGO : SMESH_subMesh::ADD_HYP;
event = SMESH_subMesh::ADD_HYP;
else
event = SMESH_subMesh::ADD_ALGO;
SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp); SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp);
// subShapes // subShapes
if (!SMESH_Hypothesis::IsStatusFatal(ret) && 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 = isAlgo ? SMESH_subMesh::ADD_FATHER_ALGO : SMESH_subMesh::ADD_FATHER_HYP;
event = SMESH_subMesh::ADD_FATHER_HYP;
else
event = SMESH_subMesh::ADD_FATHER_ALGO;
SMESH_Hypothesis::Hypothesis_Status ret2 = SMESH_Hypothesis::Hypothesis_Status ret2 =
subMesh->SubMeshesAlgoStateEngine(event, anHyp); subMesh->SubMeshesAlgoStateEngine(event, anHyp);
if (ret2 > ret) if (ret2 > ret)
@ -444,14 +440,12 @@ SMESH_Hypothesis::Hypothesis_Status
SMESH_Hypothesis *anHyp = sc->mapHypothesis[anHypId]; SMESH_Hypothesis *anHyp = sc->mapHypothesis[anHypId];
int hypType = anHyp->GetType(); int hypType = anHyp->GetType();
if(MYDEBUG) SCRUTE(hypType); if(MYDEBUG) SCRUTE(hypType);
int event;
// shape // shape
if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO) bool isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO );
event = SMESH_subMesh::REMOVE_HYP; int event = isAlgo ? SMESH_subMesh::REMOVE_ALGO : SMESH_subMesh::REMOVE_HYP;
else
event = SMESH_subMesh::REMOVE_ALGO;
SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp); SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp);
// there may appear concurrent hyps that were covered by the removed hyp // there may appear concurrent hyps that were covered by the removed hyp
@ -462,12 +456,10 @@ SMESH_Hypothesis::Hypothesis_Status
// subShapes // subShapes
if (!SMESH_Hypothesis::IsStatusFatal(ret) && 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 = isAlgo ? SMESH_subMesh::REMOVE_FATHER_ALGO : SMESH_subMesh::REMOVE_FATHER_HYP;
event = SMESH_subMesh::REMOVE_FATHER_HYP;
else
event = SMESH_subMesh::REMOVE_FATHER_ALGO;
SMESH_Hypothesis::Hypothesis_Status ret2 = SMESH_Hypothesis::Hypothesis_Status ret2 =
subMesh->SubMeshesAlgoStateEngine(event, anHyp); subMesh->SubMeshesAlgoStateEngine(event, anHyp);
if (ret2 > ret) // more severe if (ret2 > ret) // more severe