From: eap Date: Fri, 7 Sep 2012 08:00:48 +0000 (+0000) Subject: 0021843: [CEA 658] Segmentation fault when using GHS3D on a 2D group X-Git-Tag: V6_6_0a1~129 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=98ad123d219869746f1c0da86bb8ebae382bf47c 0021843: [CEA 658] Segmentation fault when using GHS3D on a 2D group correct fillAncestorsMap() not to miss COMPOUNDs inside a COMPOUND --- 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() ); + } } //=============================================================================