TopoNaming: restore defenses against multisolids when enabled

This commit is contained in:
bgbsww
2024-05-21 21:42:05 -04:00
parent febe5c3d9e
commit 12619b2c2d
5 changed files with 27 additions and 4 deletions
+11 -2
View File
@@ -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);
}