diff --git a/src/Mod/PartDesign/App/FeatureChamfer.cpp b/src/Mod/PartDesign/App/FeatureChamfer.cpp index c2833871b5..29771edfc0 100644 --- a/src/Mod/PartDesign/App/FeatureChamfer.cpp +++ b/src/Mod/PartDesign/App/FeatureChamfer.cpp @@ -198,6 +198,9 @@ App::DocumentObjectExecReturn *Chamfer::execute() shape = refineShapeIfActive(shape); shape = getSolid(shape); } + if (!isSingleSolidRuleSatisfied(shape.getShape())) { + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + } this->Shape.setValue(shape); if (failed) { return new App::DocumentObjectExecReturn( diff --git a/src/Mod/PartDesign/App/FeatureExtrude.cpp b/src/Mod/PartDesign/App/FeatureExtrude.cpp index 02f73792a1..e93cce5107 100644 --- a/src/Mod/PartDesign/App/FeatureExtrude.cpp +++ b/src/Mod/PartDesign/App/FeatureExtrude.cpp @@ -717,8 +717,10 @@ App::DocumentObjectExecReturn* FeatureExtrude::buildExtrusion(ExtrudeOptions opt return new App::DocumentObjectExecReturn( QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid")); } - solRes = refineShapeIfActive(solRes); + if (!isSingleSolidRuleSatisfied(solRes.getShape())) { + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + } this->Shape.setValue(getSolid(solRes)); } else if (prism.hasSubShape(TopAbs_SOLID)) { @@ -726,10 +728,17 @@ App::DocumentObjectExecReturn* FeatureExtrude::buildExtrusion(ExtrudeOptions opt prism.makeElementFuse(prism.getSubTopoShapes(TopAbs_SOLID)); } prism = refineShapeIfActive(prism); - this->Shape.setValue(getSolid(prism)); + prism = getSolid(prism); + if (!isSingleSolidRuleSatisfied(prism.getShape())) { + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + } + this->Shape.setValue(prism); } else { prism = refineShapeIfActive(prism); + if (!isSingleSolidRuleSatisfied(prism.getShape())) { + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + } this->Shape.setValue(prism); } diff --git a/src/Mod/PartDesign/App/FeatureFillet.cpp b/src/Mod/PartDesign/App/FeatureFillet.cpp index bf4d1e7453..032a523e2d 100644 --- a/src/Mod/PartDesign/App/FeatureFillet.cpp +++ b/src/Mod/PartDesign/App/FeatureFillet.cpp @@ -114,6 +114,9 @@ App::DocumentObjectExecReturn *Fillet::execute() shape = refineShapeIfActive(shape); shape = getSolid(shape); } + if (!isSingleSolidRuleSatisfied(shape.getShape())) { + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + } this->Shape.setValue(shape); if (failed) { diff --git a/src/Mod/PartDesign/App/FeatureGroove.cpp b/src/Mod/PartDesign/App/FeatureGroove.cpp index f77e6a84b7..8245452a2f 100644 --- a/src/Mod/PartDesign/App/FeatureGroove.cpp +++ b/src/Mod/PartDesign/App/FeatureGroove.cpp @@ -352,7 +352,11 @@ App::DocumentObjectExecReturn *Groove::execute() return new App::DocumentObjectExecReturn("Resulting shape is not a solid"); boolOp = refineShapeIfActive(boolOp); - Shape.setValue(getSolid(boolOp)); + boolOp = getSolid(boolOp); + if (!isSingleSolidRuleSatisfied(boolOp.getShape())) { + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + } + Shape.setValue(boolOp); return App::DocumentObject::StdReturn; } catch (Standard_Failure& e) { diff --git a/src/Mod/PartDesign/App/FeatureLoft.cpp b/src/Mod/PartDesign/App/FeatureLoft.cpp index 121d294db7..2a3612d3ba 100644 --- a/src/Mod/PartDesign/App/FeatureLoft.cpp +++ b/src/Mod/PartDesign/App/FeatureLoft.cpp @@ -532,7 +532,11 @@ App::DocumentObjectExecReturn *Loft::execute(void) return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid")); boolOp = refineShapeIfActive(boolOp); - Shape.setValue(getSolid(boolOp)); + boolOp = getSolid(boolOp); + if (!isSingleSolidRuleSatisfied(boolOp.getShape())) { + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + } + Shape.setValue(boolOp); return App::DocumentObject::StdReturn; } catch (Standard_Failure& e) {