From 80c110764cc19e1c484b66bc901b2454d6a9ee59 Mon Sep 17 00:00:00 2001 From: FEA-eng <59876896+FEA-eng@users.noreply.github.com> Date: Fri, 22 Aug 2025 20:29:50 +0200 Subject: [PATCH] PartDesign: Update error message about multiple solids (#23286) --- src/Mod/PartDesign/App/FeatureBoolean.cpp | 5 ++++- src/Mod/PartDesign/App/FeatureChamfer.cpp | 4 +++- src/Mod/PartDesign/App/FeatureDraft.cpp | 4 +++- src/Mod/PartDesign/App/FeatureExtrude.cpp | 2 +- src/Mod/PartDesign/App/FeatureFillet.cpp | 4 +++- src/Mod/PartDesign/App/FeatureGroove.cpp | 4 +++- src/Mod/PartDesign/App/FeatureHole.cpp | 4 +++- src/Mod/PartDesign/App/FeatureLoft.cpp | 4 +++- src/Mod/PartDesign/App/FeaturePipe.cpp | 4 +++- src/Mod/PartDesign/App/FeatureRevolution.cpp | 4 +++- src/Mod/PartDesign/App/FeatureTransformed.cpp | 4 +++- 11 files changed, 32 insertions(+), 11 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureBoolean.cpp b/src/Mod/PartDesign/App/FeatureBoolean.cpp index 1793357e4b..b2b42feebe 100644 --- a/src/Mod/PartDesign/App/FeatureBoolean.cpp +++ b/src/Mod/PartDesign/App/FeatureBoolean.cpp @@ -160,7 +160,7 @@ App::DocumentObjectExecReturn *Boolean::execute() result = refineShapeIfActive(result); if (!isSingleSolidRuleSatisfied(result.getShape())) { - return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body.")); } this->Shape.setValue(getSolid(result)); @@ -185,3 +185,6 @@ void Boolean::handleChangedPropertyName(Base::XMLReader &reader, const char * Ty } } + + + diff --git a/src/Mod/PartDesign/App/FeatureChamfer.cpp b/src/Mod/PartDesign/App/FeatureChamfer.cpp index dd289e160c..3b7ff2ba1a 100644 --- a/src/Mod/PartDesign/App/FeatureChamfer.cpp +++ b/src/Mod/PartDesign/App/FeatureChamfer.cpp @@ -171,7 +171,7 @@ App::DocumentObjectExecReturn *Chamfer::execute() this->rawShape = shape; shape = refineShapeIfActive(shape); if (!isSingleSolidRuleSatisfied(shape.getShape())) { - return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids:enable 'Allow Compounds' in the active body.")); } shape = getSolid(shape); @@ -261,3 +261,5 @@ static App::DocumentObjectExecReturn *validateParameters(int chamferType, double } + + diff --git a/src/Mod/PartDesign/App/FeatureDraft.cpp b/src/Mod/PartDesign/App/FeatureDraft.cpp index a4595346c1..1bc842c5ff 100644 --- a/src/Mod/PartDesign/App/FeatureDraft.cpp +++ b/src/Mod/PartDesign/App/FeatureDraft.cpp @@ -288,7 +288,7 @@ App::DocumentObjectExecReturn *Draft::execute() } if (!isSingleSolidRuleSatisfied(shape.getShape())) { - return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body.")); } this->Shape.setValue(getSolid(shape)); @@ -299,3 +299,5 @@ App::DocumentObjectExecReturn *Draft::execute() return new App::DocumentObjectExecReturn(e.GetMessageString()); } } + + diff --git a/src/Mod/PartDesign/App/FeatureExtrude.cpp b/src/Mod/PartDesign/App/FeatureExtrude.cpp index c009ca6be4..3cac3bd60f 100644 --- a/src/Mod/PartDesign/App/FeatureExtrude.cpp +++ b/src/Mod/PartDesign/App/FeatureExtrude.cpp @@ -812,7 +812,7 @@ App::DocumentObjectExecReturn* FeatureExtrude::buildExtrusion(ExtrudeOptions opt solRes = refineShapeIfActive(result); if (!isSingleSolidRuleSatisfied(solRes.getShape())) { - return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body.")); } this->Shape.setValue(getSolid(solRes)); } diff --git a/src/Mod/PartDesign/App/FeatureFillet.cpp b/src/Mod/PartDesign/App/FeatureFillet.cpp index c26c5486bc..98d104674e 100644 --- a/src/Mod/PartDesign/App/FeatureFillet.cpp +++ b/src/Mod/PartDesign/App/FeatureFillet.cpp @@ -116,7 +116,7 @@ App::DocumentObjectExecReturn *Fillet::execute() this->rawShape = shape; shape = refineShapeIfActive(shape); if (!isSingleSolidRuleSatisfied(shape.getShape())) { - return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body.")); } shape = getSolid(shape); @@ -145,3 +145,5 @@ void Fillet::handleChangedPropertyType(Base::XMLReader &reader, const char * Typ DressUp::handleChangedPropertyType(reader, TypeName, prop); } } + + diff --git a/src/Mod/PartDesign/App/FeatureGroove.cpp b/src/Mod/PartDesign/App/FeatureGroove.cpp index 72d7d35076..d7fd6521b6 100644 --- a/src/Mod/PartDesign/App/FeatureGroove.cpp +++ b/src/Mod/PartDesign/App/FeatureGroove.cpp @@ -193,7 +193,7 @@ App::DocumentObjectExecReturn *Groove::execute() this->rawShape = boolOp; boolOp = refineShapeIfActive(boolOp); if (!isSingleSolidRuleSatisfied(boolOp.getShape())) { - return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body.")); } boolOp = getSolid(boolOp); Shape.setValue(boolOp); @@ -384,3 +384,5 @@ void Groove::updateProperties(RevolMethod method) } + + diff --git a/src/Mod/PartDesign/App/FeatureHole.cpp b/src/Mod/PartDesign/App/FeatureHole.cpp index 7c2e3d5fc3..048aee49a0 100644 --- a/src/Mod/PartDesign/App/FeatureHole.cpp +++ b/src/Mod/PartDesign/App/FeatureHole.cpp @@ -2182,7 +2182,7 @@ App::DocumentObjectExecReturn* Hole::execute() if (!isSingleSolidRuleSatisfied(result.getShape())) { return new App::DocumentObjectExecReturn( - QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body.")); } this->Shape.setValue(result); @@ -2768,3 +2768,5 @@ int Hole::baseProfileOption_bitmaskToIdx(int bitmask) } // namespace PartDesign + + diff --git a/src/Mod/PartDesign/App/FeatureLoft.cpp b/src/Mod/PartDesign/App/FeatureLoft.cpp index 0d27b9c89f..dac76bac8d 100644 --- a/src/Mod/PartDesign/App/FeatureLoft.cpp +++ b/src/Mod/PartDesign/App/FeatureLoft.cpp @@ -274,7 +274,7 @@ App::DocumentObjectExecReturn *Loft::execute() if(base.isNull()) { if (!isSingleSolidRuleSatisfied(result.getShape())) { - return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body.")); } Shape.setValue(getSolid(result)); return App::DocumentObject::StdReturn; @@ -346,3 +346,5 @@ void Loft::handleChangedPropertyType(Base::XMLReader& reader, const char* TypeNa ProfileBased::handleChangedPropertyType(reader, TypeName, prop); } } + + diff --git a/src/Mod/PartDesign/App/FeaturePipe.cpp b/src/Mod/PartDesign/App/FeaturePipe.cpp index f2358cd0e0..5255ab94bd 100644 --- a/src/Mod/PartDesign/App/FeaturePipe.cpp +++ b/src/Mod/PartDesign/App/FeaturePipe.cpp @@ -402,7 +402,7 @@ App::DocumentObjectExecReturn *Pipe::execute() if (!isSingleSolidRuleSatisfied(boolOp.getShape())) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", - "Result has multiple solids: that is not currently supported.")); + "Result has multiple solids: enable 'Allow Compounds' in the active body.")); } // store shape before refinement @@ -637,3 +637,5 @@ void Pipe::handleChangedPropertyName(Base::XMLReader& reader, ProfileBased::handleChangedPropertyName(reader, TypeName, PropName); } } + + diff --git a/src/Mod/PartDesign/App/FeatureRevolution.cpp b/src/Mod/PartDesign/App/FeatureRevolution.cpp index e3fdf31575..352a21a208 100644 --- a/src/Mod/PartDesign/App/FeatureRevolution.cpp +++ b/src/Mod/PartDesign/App/FeatureRevolution.cpp @@ -229,7 +229,7 @@ App::DocumentObjectExecReturn* Revolution::execute() result = refineShapeIfActive(result); } if (!isSingleSolidRuleSatisfied(result.getShape())) { - return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body.")); } result = getSolid(result); this->Shape.setValue(result); @@ -415,3 +415,5 @@ void Revolution::updateProperties(RevolMethod method) } } + + diff --git a/src/Mod/PartDesign/App/FeatureTransformed.cpp b/src/Mod/PartDesign/App/FeatureTransformed.cpp index 2859530021..c74e7bb17c 100644 --- a/src/Mod/PartDesign/App/FeatureTransformed.cpp +++ b/src/Mod/PartDesign/App/FeatureTransformed.cpp @@ -410,7 +410,7 @@ App::DocumentObjectExecReturn* Transformed::execute() supportShape = refineShapeIfActive((supportShape)); if (!isSingleSolidRuleSatisfied(supportShape.getShape())) { - Base::Console().warning("Transformed: Result has multiple solids. Only keeping the first.\n"); + Base::Console().warning("Transformed: Result has multiple solids. Only keeping the first. Or enable 'Allow Compounds' in the active body.\n"); } this->Shape.setValue(getSolid(supportShape)); // picking the first solid @@ -440,3 +440,5 @@ TopoDS_Shape Transformed::getRemainingSolids(const TopoDS_Shape& shape) } } // namespace PartDesign + +