From 46654775ebae851bc90749bd9797ee9e91543f2e Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 20 May 2013 09:11:12 +0000 Subject: [PATCH] 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) --- src/SMESH/SMESH_Mesh.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 )