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:
Kacper Donat
2024-05-11 13:35:18 +02:00
committed by Adrián Insaurralde Avalos
parent f937d4579a
commit 935bdf9a0f
15 changed files with 43 additions and 44 deletions

View File

@@ -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."));
}