From 594010d9f081c84659986a4308239bf64efda557 Mon Sep 17 00:00:00 2001 From: Eric Price Date: Fri, 27 Sep 2024 17:53:49 +0200 Subject: [PATCH] PadDesign: Work around issue 16690 This is a stopgap measure, I don't know if the underlying issue is fully understood - but this prevents it from happening in the given test case. By overriding the base for the pocket prism, which is a trick also applied by TopoShape::makeElementPrismUntil() if the prism creation fails on first try, the bug where said prism goes to the wrong shape is avoided - this on its own would however break a pad in the inverse case, so we only do that when pocketing --- src/Mod/PartDesign/App/FeatureExtrude.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/PartDesign/App/FeatureExtrude.cpp b/src/Mod/PartDesign/App/FeatureExtrude.cpp index d0ea1a748c..db941b6f39 100644 --- a/src/Mod/PartDesign/App/FeatureExtrude.cpp +++ b/src/Mod/PartDesign/App/FeatureExtrude.cpp @@ -684,7 +684,11 @@ App::DocumentObjectExecReturn* FeatureExtrude::buildExtrusion(ExtrudeOptions opt return App::DocumentObject::StdReturn; } try { - prism.makeElementPrismUntil(base, + TopoShape _base; + if (addSubType!=FeatureAddSub::Subtractive) { + _base=base; // avoid issue #16690 + } + prism.makeElementPrismUntil(_base, sketchshape, supportface, upToShape,