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)
This commit is contained in:
eap 2013-05-20 09:11:12 +00:00
parent e69867dda8
commit 46654775eb

View File

@ -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 )