From 385e4df10cb4f5069c1198636527eadf5ed7f719 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 16 Nov 2020 14:45:55 +0100 Subject: [PATCH] PartDesign: [skip ci] fixes #0004494: Error "Result is empty" for Pads and Pockets with non zero Offset --- src/Mod/PartDesign/App/FeaturePad.cpp | 6 ++++-- src/Mod/PartDesign/App/FeaturePocket.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Mod/PartDesign/App/FeaturePad.cpp b/src/Mod/PartDesign/App/FeaturePad.cpp index c7a4576f51..2d260ca7ec 100644 --- a/src/Mod/PartDesign/App/FeaturePad.cpp +++ b/src/Mod/PartDesign/App/FeaturePad.cpp @@ -273,7 +273,8 @@ App::DocumentObjectExecReturn *Pad::execute(void) return new App::DocumentObjectExecReturn("Pad: Up to face: Could not extrude the sketch!"); prism = PrismMaker.Shape(); #else - generatePrism(prism, method, base, sketchshape, supportface, upToFace, dir, 2, 1); + Standard_Integer fuse = fabs(Offset.getValue()) > Precision::Confusion() ? 1 : 2; + generatePrism(prism, method, base, sketchshape, supportface, upToFace, dir, fuse, Standard_True); #endif base.Nullify(); } else { @@ -298,7 +299,8 @@ App::DocumentObjectExecReturn *Pad::execute(void) return new App::DocumentObjectExecReturn("Pad: Up to face: Could not extrude the sketch!"); prism = PrismMaker.Shape(); #else - generatePrism(prism, method, base, sketchshape, supportface, upToFace, dir, 2, 1); + Standard_Integer fuse = fabs(Offset.getValue()) > Precision::Confusion() ? 1 : 2; + generatePrism(prism, method, base, sketchshape, supportface, upToFace, dir, fuse, Standard_True); #endif } } else { diff --git a/src/Mod/PartDesign/App/FeaturePocket.cpp b/src/Mod/PartDesign/App/FeaturePocket.cpp index 4e1ddfa6fd..d1080019ae 100644 --- a/src/Mod/PartDesign/App/FeaturePocket.cpp +++ b/src/Mod/PartDesign/App/FeaturePocket.cpp @@ -188,7 +188,7 @@ App::DocumentObjectExecReturn *Pocket::execute(void) TopoDS_Shape prism = PrismMaker.Shape(); #else TopoDS_Shape prism; - generatePrism(prism, method, base, profileshape, supportface, upToFace, dir, 0, 1); + generatePrism(prism, method, base, profileshape, supportface, upToFace, dir, 0, Standard_True); #endif // And the really expensive way to get the SubShape...