From b341dd1e64f6637f06b129613f60a89a3af23c75 Mon Sep 17 00:00:00 2001 From: Florian Foinant-Willig Date: Mon, 11 Nov 2024 17:48:18 +0100 Subject: [PATCH] Fix revolution with ShapeBinder profile (#17489) * Fix revolution with ShapeBinder profile * Remove log level init --------- Co-authored-by: Chris Hennes --- src/Mod/PartDesign/App/FeatureRevolution.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureRevolution.cpp b/src/Mod/PartDesign/App/FeatureRevolution.cpp index 1b518a5c2a..a3aba83360 100644 --- a/src/Mod/PartDesign/App/FeatureRevolution.cpp +++ b/src/Mod/PartDesign/App/FeatureRevolution.cpp @@ -96,13 +96,7 @@ App::DocumentObjectExecReturn* Revolution::execute() double angle2 = Base::toRadians(Angle2.getValue()); - TopoShape sketchshape; - try { - sketchshape = getTopoShapeVerifiedFace(); - } - catch (const Base::Exception& e) { - return new App::DocumentObjectExecReturn(e.what()); - } + TopoShape sketchshape = getTopoShapeVerifiedFace(); // if the Base property has a valid shape, fuse the AddShape into it TopoShape base; @@ -160,7 +154,14 @@ App::DocumentObjectExecReturn* Revolution::execute() // Create a fresh support even when base exists so that it can be used for patterns TopoShape result(0); - TopoShape supportface = getSupportFace(); + TopoShape supportface(0); + try { + supportface = getSupportFace(); + } + catch(...) { + //do nothing, null shape is handle below + } + supportface.move(invObjLoc); if (method == RevolMethod::ToFace || method == RevolMethod::ToFirst