From 4ac7f57ac47d17a21cabe484732860cd3d49fb8d Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 28 Jan 2025 01:46:38 +0100 Subject: [PATCH] PD: Use isSingleSolidRuleSatisfied() for pipe feature This fixes issue 18977 Fixes: 935bdf9a0f1a ("PartDesign: Refactor single-solid rule enforcement") --- src/Mod/PartDesign/App/FeaturePipe.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Mod/PartDesign/App/FeaturePipe.cpp b/src/Mod/PartDesign/App/FeaturePipe.cpp index 08c4077948..f2358cd0e0 100644 --- a/src/Mod/PartDesign/App/FeaturePipe.cpp +++ b/src/Mod/PartDesign/App/FeaturePipe.cpp @@ -400,8 +400,7 @@ App::DocumentObjectExecReturn *Pipe::execute() if (boolOp.isNull()) return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid")); - int solidCount = countSolids(boolOp.getShape()); - if (solidCount > 1) { + if (!isSingleSolidRuleSatisfied(boolOp.getShape())) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); } @@ -422,8 +421,7 @@ App::DocumentObjectExecReturn *Pipe::execute() if (boolOp.isNull()) return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid")); - int solidCount = countSolids(boolOp.getShape()); - if (solidCount > 1) { + if (!isSingleSolidRuleSatisfied(boolOp.getShape())) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); }