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.
This commit is contained in:
Kacper Donat
2025-08-13 20:53:14 +02:00
committed by Chris Hennes
parent e6dcbe66de
commit 09b199d879

View File

@@ -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: