X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Mesh.cxx;h=9501c4d5d6edd25d43bd45464f1ce697960c7eae;hb=964af78757a5dece230f311beb4b1d92f1e8d8c3;hp=308456021be04dd5705e11f232379155f971161b;hpb=c38c10811a065cf5b13e8807ed71864d92ca7d80;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 308456021..9501c4d5d 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;