From: jfa Date: Wed, 4 Oct 2006 13:15:19 +0000 (+0000) Subject: Fix bug with 2D algorithms, applied to shells (PAOUK). X-Git-Tag: V3_2_3pre1~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5ebb21356310e1308f14cfd71ba085306c50a0b6;p=modules%2Fsmesh.git Fix bug with 2D algorithms, applied to shells (PAOUK). --- diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 6413b8031..f2fbedfe3 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -482,9 +482,18 @@ bool SMESH_subMesh::IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis, switch ( theShapeType ) { case TopAbs_EDGE: case TopAbs_FACE: - case TopAbs_SHELL: case TopAbs_SOLID: return SMESH_Gen::GetShapeDim( theShapeType ) == theHypothesis->GetDim(); + + case TopAbs_SHELL: + // Special case for algorithms, building 2D mesh on a whole shell. + // Before this fix there was a problem after restoring from study, + // because in that case algorithm is assigned before hypothesis + // (on shell in problem case) and hypothesis is checked on faces + // (because it is 2D), where we have NO_ALGO state. + // Now 2D hypothesis is also applicable to shells. + return (theHypothesis->GetDim() == 2 || theHypothesis->GetDim() == 3); + // case TopAbs_WIRE: // case TopAbs_COMPSOLID: // case TopAbs_COMPOUND: