From 09b199d879004dcfe63ff5fb6471b88d12a69a1e Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Wed, 13 Aug 2025 20:53:14 +0200 Subject: [PATCH] Part: Fix 2D Offset of Face With TNP mitigation implementation handling of TopAbs_FACE was changed in the method computing 2D offset of shape. It used to be very simple iteration over face wires and it was instead changed to much more complicated splitWires method. The intent of that change was to ensure stability of the result, but it breaks existing models. The problem is caused by OCC bug within offseting mechanism that is dependent on wire order. Here the outer wire is moved to the end which can cause issues. Another issue is that for some reason, if circle is enclosed by other shape the offset does not create proper 2D offset but moves the circle in Z direction. --- src/Mod/Part/App/TopoShapeExpansion.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/Part/App/TopoShapeExpansion.cpp b/src/Mod/Part/App/TopoShapeExpansion.cpp index efd3e4b6c1..b8215827c3 100644 --- a/src/Mod/Part/App/TopoShapeExpansion.cpp +++ b/src/Mod/Part/App/TopoShapeExpansion.cpp @@ -2747,8 +2747,9 @@ TopoShape& TopoShape::makeElementOffset2D(const TopoShape& shape, haveWires = true; break; case TopAbs_FACE: { - auto outerWire = s.splitWires(&sourceWires); - sourceWires.push_back(outerWire); + std::ranges::copy(s.getSubTopoShapes(TopAbs_WIRE), + std::back_inserter(sourceWires)); + haveFaces = true; } break; default: