From: eap Date: Fri, 24 Jun 2005 11:11:56 +0000 (+0000) Subject: PAL8196. Do not operate with hypothesis for a geom group member which is not a sub... X-Git-Tag: T2_2_5a~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e958f3ed7d1e650853420aa5eb9d172f01adc9da;p=modules%2Fsmesh.git PAL8196. Do not operate with hypothesis for a geom group member which is not a sub-shape of the main shape --- diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 06dd09d73..dec29df45 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -267,14 +267,17 @@ SMESH_Hypothesis::Hypothesis_Status SMESH_subMesh *subMesh = GetSubMesh(aSubShape); SMESHDS_SubMesh *subMeshDS = subMesh->GetSubMeshDS(); - if ( subMeshDS && subMeshDS->IsComplexSubmesh() ) + if ( subMeshDS && subMeshDS->IsComplexSubmesh() ) // group of sub-shapes and maybe of not sub- { + MESSAGE("AddHypothesis() to complex submesh"); // return the worst but not fatal state of all group memebers SMESH_Hypothesis::Hypothesis_Status aBestRet, aWorstNotFatal, ret; aBestRet = SMESH_Hypothesis::HYP_BAD_DIM; aWorstNotFatal = SMESH_Hypothesis::HYP_OK; for ( TopoDS_Iterator itS ( aSubShape ); itS.More(); itS.Next()) { + if ( !GetMeshDS()->ShapeToIndex( itS.Value() )) + continue; // not sub-shape ret = AddHypothesis( itS.Value(), anHypId ); if ( !SMESH_Hypothesis::IsStatusFatal( ret ) && ret > aWorstNotFatal ) aWorstNotFatal = ret; @@ -380,6 +383,8 @@ SMESH_Hypothesis::Hypothesis_Status aWorstNotFatal = SMESH_Hypothesis::HYP_OK; for ( TopoDS_Iterator itS ( aSubShape ); itS.More(); itS.Next()) { + if ( !GetMeshDS()->ShapeToIndex( itS.Value() )) + continue; // not sub-shape ret = RemoveHypothesis( itS.Value(), anHypId ); if ( !SMESH_Hypothesis::IsStatusFatal( ret ) && ret > aWorstNotFatal ) aWorstNotFatal = ret;