]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2971: Naming issue in a group when loading a dump file
authorazv <azv@opencascade.com>
Fri, 23 Aug 2019 05:46:03 +0000 (08:46 +0300)
committerazv <azv@opencascade.com>
Fri, 23 Aug 2019 05:46:46 +0000 (08:46 +0300)
Fix for the nested sketch, which has custom face order.

src/SketchAPI/SketchAPI_Sketch.cpp

index f4d6f8bd3fb329d010a800339cb514f5bdb95e71..722cbbaa77e40782003c6940d9f14d61f867801a 100644 (file)
@@ -254,6 +254,12 @@ void SketchAPI_Sketch::changeFacesOrder(
   // collect faces of the sketch
   ResultConstructionPtr aSketchResult =
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(feature()->lastResult());
+  if (!aSketchResult) {
+    // sketch is nested to a boolean operation, thus, it has no result yet.
+    feature()->execute();
+    aSketchResult =
+        std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(feature()->lastResult());
+  }
   std::list<GeomFacePtr> aFaces;
   int aFacesNum = aSketchResult->facesNum();
   for (int i = 0; i < aFacesNum; ++i)