PartDesign: Refactor single-solid rule enforcement
This refactors a single solid rule checking code from using the solid count directly to using well abstracted `isSingleSolidRuleSatisfied` method. This makes code easier to read and is the basis for next step which is allowing users to disable this checks.
This commit is contained in:
committed by
Adrián Insaurralde Avalos
parent
f937d4579a
commit
935bdf9a0f
@@ -153,8 +153,7 @@ App::DocumentObjectExecReturn *Boolean::execute()
|
||||
|
||||
result = refineShapeIfActive(result);
|
||||
|
||||
int solidCount = countSolids(result);
|
||||
if (solidCount > 1) {
|
||||
if (!isSingleSolidRuleSatisfied(result)) {
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user