From: mpv Date: Tue, 31 Mar 2020 06:40:50 +0000 (+0300) Subject: Fix for the #21 note from issue 3134: X-Git-Tag: V9_5_0a2~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2cd567a9bb29c14e377e934b4f312030b589e375;p=modules%2Fshaper.git Fix for the #21 note from issue 3134: - Import the flight_solid.brep from the SAMPLES of Salome. - In SMESH, create a mesh with CADSurf - In SHAPER, create a group of one face - In SMESH, create the corresponding group on geometry - In SHAPER, create another goup on another face => In SMESH, the mesh is notified that the shape has changed. I have to compute the mesh again to create a new group. --- diff --git a/src/GeomAPI/GeomAPI_Shape.cpp b/src/GeomAPI/GeomAPI_Shape.cpp index 6d5649a75..9482a1bcb 100644 --- a/src/GeomAPI/GeomAPI_Shape.cpp +++ b/src/GeomAPI/GeomAPI_Shape.cpp @@ -645,6 +645,11 @@ std::string GeomAPI_Shape::getShapeStream(const bool theWithTriangulation) const if (!theWithTriangulation) { // make a copy of shape without triangulation BRepBuilderAPI_Copy aCopy(aShape, Standard_False, Standard_False); const TopoDS_Shape& aCopyShape = aCopy.Shape(); + // make all faces unchecked to make the stream of shapes the same + TopExp_Explorer aFaceExp(aCopyShape, TopAbs_FACE); + for(; aFaceExp.More(); aFaceExp.Next()) { + aFaceExp.Current().TShape()->Checked(Standard_False); + } BRepTools::Write(aCopyShape, aStream); } else { BRepTools::Write(aShape, aStream);