From 3ef09de855f92c864e6528ca40e599130dc72e79 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 23 Aug 2019 08:46:03 +0300 Subject: [PATCH] Issue #2971: Naming issue in a group when loading a dump file Fix for the nested sketch, which has custom face order. --- src/SketchAPI/SketchAPI_Sketch.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.39.2