From 4bfc6a082aecea89f1ede957e13e4a222dc4ea72 Mon Sep 17 00:00:00 2001 From: 0penBrain <48731257+0penBrain@users.noreply.github.com> Date: Sun, 4 Sep 2022 15:18:58 +0200 Subject: [PATCH] PartDesign: improve offset handling of SubShapeBinder --- src/Mod/PartDesign/App/ShapeBinder.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/Mod/PartDesign/App/ShapeBinder.cpp b/src/Mod/PartDesign/App/ShapeBinder.cpp index 33adbcaec6..2d059cccf8 100644 --- a/src/Mod/PartDesign/App/ShapeBinder.cpp +++ b/src/Mod/PartDesign/App/ShapeBinder.cpp @@ -729,7 +729,20 @@ void SubShapeBinder::update(SubShapeBinder::UpdateOption options) { } } - if (!fused && result.hasSubShape(TopAbs_EDGE) + if (!fused && (MakeFace.getValue() || Offset.getValue() != 0.0) + && !result.hasSubShape(TopAbs_FACE) + && result.hasSubShape(TopAbs_EDGE)) + { + result = result.makeWires(); + if (MakeFace.getValue()) { + try { + result = result.makeFace(nullptr); + } + catch (...) {} + } + } + + if (!fused && result.hasSubShape(TopAbs_WIRE) && Offset.getValue() != 0.0) { try { result = result.makeOffset2D(Offset.getValue(), @@ -745,17 +758,6 @@ void SubShapeBinder::update(SubShapeBinder::UpdateOption options) { } } - if (!fused && MakeFace.getValue() - && !result.hasSubShape(TopAbs_FACE) - && result.hasSubShape(TopAbs_EDGE)) - { - result = result.makeWires(); - try { - result = result.makeFace(nullptr); - } - catch (...) {} - } - if (Refine.getValue()) result = result.makeRefine();