From 23d93e45ffce3598a6346a344ecaa450a42c3392 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 30 Jan 2025 16:47:56 +0100 Subject: [PATCH] PD: Correctly handle single solid rule for loft with and without base --- src/Mod/PartDesign/App/FeatureLoft.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureLoft.cpp b/src/Mod/PartDesign/App/FeatureLoft.cpp index ef7b3426af..becc62d406 100644 --- a/src/Mod/PartDesign/App/FeatureLoft.cpp +++ b/src/Mod/PartDesign/App/FeatureLoft.cpp @@ -234,6 +234,9 @@ App::DocumentObjectExecReturn *Loft::execute() result = shapes.front(); if(base.isNull()) { + if (!isSingleSolidRuleSatisfied(result.getShape())) { + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + } Shape.setValue(getSolid(result)); return App::DocumentObject::StdReturn; } @@ -258,11 +261,11 @@ App::DocumentObjectExecReturn *Loft::execute() catch(Standard_Failure&) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Failed to perform boolean operation")); } - boolOp = this->getSolid(boolOp); + TopoShape solid = getSolid(boolOp); // lets check if the result is a solid - if (boolOp.isNull()) + if (solid.isNull()) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid")); - + } // store shape before refinement this->rawShape = boolOp; boolOp = refineShapeIfActive(boolOp);