TopoNaming: restore defenses against multisolids when enabled
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user