From: azv Date: Fri, 23 Aug 2019 05:46:03 +0000 (+0300) Subject: Issue #2971: Naming issue in a group when loading a dump file X-Git-Tag: VEDF2019Lot4~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3ef09de855f92c864e6528ca40e599130dc72e79;p=modules%2Fshaper.git Issue #2971: Naming issue in a group when loading a dump file Fix for the nested sketch, which has custom face order. --- diff --git a/src/SketchAPI/SketchAPI_Sketch.cpp b/src/SketchAPI/SketchAPI_Sketch.cpp index f4d6f8bd3..722cbbaa7 100644 --- a/src/SketchAPI/SketchAPI_Sketch.cpp +++ b/src/SketchAPI/SketchAPI_Sketch.cpp @@ -254,6 +254,12 @@ void SketchAPI_Sketch::changeFacesOrder( // collect faces of the sketch ResultConstructionPtr aSketchResult = std::dynamic_pointer_cast(feature()->lastResult()); + if (!aSketchResult) { + // sketch is nested to a boolean operation, thus, it has no result yet. + feature()->execute(); + aSketchResult = + std::dynamic_pointer_cast(feature()->lastResult()); + } std::list aFaces; int aFacesNum = aSketchResult->facesNum(); for (int i = 0; i < aFacesNum; ++i)