From: jfa Date: Mon, 1 Feb 2021 10:54:18 +0000 (+0300) Subject: bos #20546: EDF 22644 - Offset not closed. X-Git-Tag: V9_7_0a1~54 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4958e9d785874ce1f24de49a56b53e9bee11bd65;p=modules%2Fshaper.git bos #20546: EDF 22644 - Offset not closed. --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_WireBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_WireBuilder.cpp index 2a6c42497..a7b313945 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_WireBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_WireBuilder.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -164,8 +165,15 @@ GeomAlgoAPI_WireBuilder::GeomAlgoAPI_WireBuilder(const ListOfShape& theShapes, setImpl(aWireBuilder); setBuilderType(OCCT_BRepBuilderAPI_MakeShape); - // split the result wire + // fix edges order (bos #20546) TopoDS_Wire aWire = aWireBuilder->Wire(); + Handle(ShapeFix_Wire) aFW = new ShapeFix_Wire; + aFW->Load(aWire); + aFW->FixReorder(); + if (aFW->StatusReorder(ShapeExtend_DONE)) + aWire = aFW->WireAPIMake(); + + // split the result wire if (isSplitWire && BRep_Tool::IsClosed(aWire)) { TopoDS_Wire aNewWire; BRep_Builder aBuilder; @@ -285,4 +293,4 @@ bool GeomAlgoAPI_WireBuilder::isSelfIntersected(const GeomShapePtr& theWire) } return false; -} \ No newline at end of file +}