]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0021843: [CEA 658] Segmentation fault when using GHS3D on a 2D group
authoreap <eap@opencascade.com>
Fri, 7 Sep 2012 08:00:48 +0000 (08:00 +0000)
committereap <eap@opencascade.com>
Fri, 7 Sep 2012 08:00:48 +0000 (08:00 +0000)
  correct fillAncestorsMap() not to miss COMPOUNDs inside a COMPOUND

src/SMESH/SMESH_Mesh.cxx

index 4e12bc9c140155eed9e214bc9053e771f9d83a53..da8e83e2ce7e8485798b9f76e09b8abaadeb809d 100644 (file)
@@ -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() );
+  }
 }
 
 //=============================================================================