From 98ad123d219869746f1c0da86bb8ebae382bf47c Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 7 Sep 2012 08:00:48 +0000 Subject: [PATCH] 0021843: [CEA 658] Segmentation fault when using GHS3D on a 2D group correct fillAncestorsMap() not to miss COMPOUNDs inside a COMPOUND --- src/SMESH/SMESH_Mesh.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 4e12bc9c1..da8e83e2c 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -1984,6 +1984,13 @@ void SMESH_Mesh::fillAncestorsMap(const TopoDS_Shape& theShape) (TopAbs_ShapeEnum) ancType, _mapAncestors ); } + // visit COMPOUNDs inside a COMPOUND that are not reachable by TopExp_Explorer + if ( theShape.ShapeType() == TopAbs_COMPOUND ) + { + for ( TopoDS_Iterator sIt(theShape); sIt.More(); sIt.Next() ) + if ( sIt.Value().ShapeType() == TopAbs_COMPOUND ) + fillAncestorsMap( sIt.Value() ); + } } //============================================================================= -- 2.39.2