From: eap Date: Mon, 20 May 2013 09:11:12 +0000 (+0000) Subject: In GetSubMesh(), assure calling fillAncestorsMap() for each compound X-Git-Tag: V7_3_0a1~434 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=46654775ebae851bc90749bd9797ee9e91543f2e In GetSubMesh(), assure calling fillAncestorsMap() for each compound (take into account that a compound can be added to SMESHDS_Mesh at creation of group on geometry) --- diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index b43a41961..22fd2e44e 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -918,10 +918,9 @@ SMESH_subMesh *SMESH_Mesh::GetSubMesh(const TopoDS_Shape & aSubShape) if ( it.More() ) { index = _myMeshDS->AddCompoundSubmesh( aSubShape, it.Value().ShapeType() ); - if ( index > _nbSubShapes ) _nbSubShapes = index; // not to create sm for this group again - // fill map of Ancestors - fillAncestorsMap(aSubShape); + while ( _nbSubShapes < index ) + fillAncestorsMap( _myMeshDS->IndexToShape( ++_nbSubShapes )); } } // if ( !index )