From: azv Date: Tue, 3 Mar 2020 09:37:16 +0000 (+0300) Subject: Continue fixing regression with incorrect order of inner wires (sort inner wires... X-Git-Tag: V9_5_0a2~62 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d0faf4ffe6cab16d216ed981bfe77fd412730263;p=modules%2Fshaper.git Continue fixing regression with incorrect order of inner wires (sort inner wires only). --- 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()) {