From d0faf4ffe6cab16d216ed981bfe77fd412730263 Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 3 Mar 2020 12:37:16 +0300 Subject: [PATCH] Continue fixing regression with incorrect order of inner wires (sort inner wires only). --- src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp index 94c7b7185..dff098d99 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp @@ -255,12 +255,17 @@ void GeomAlgoAPI_SketchBuilder::build( TopoDS_Face aNewFace; aBuilder.MakeFace(aNewFace, aPlane, Precision::Confusion()); - // sort wires according to the original edges as well as faces + // sort inner wires according to the original edges as well as faces TopTools_ListOfShape aWires; TopExp_Explorer aWireExp(aFace, TopAbs_WIRE); for (; aWireExp.More(); aWireExp.Next()) aWires.Append(aWireExp.Current()); - sortAreas(aWires, theEdges); + if (aWires.Size() > 2) { + TopoDS_Shape anOuterWire = aWires.First(); + aWires.RemoveFirst(); + sortAreas(aWires, theEdges); + aWires.Prepend(anOuterWire); + } // iterate on wires for (TopTools_ListIteratorOfListOfShape aWIt(aWires); aWIt.More(); aWIt.Next()) { -- 2.39.2