From 947f1ca23589e046c73c88ef910b57aba42a89f7 Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Thu, 14 Aug 2025 14:28:38 +0200 Subject: [PATCH] Part: Relax boolean requirements The current solution checked shapes before allowing boolean operation to happend. That meant that even small error with model in an unrelated place could prevent the boolean from being computed, even if it would compute fine and create valid shape. This commit changes that behaviour so the tool at least tries to compute the results. --- src/Mod/Part/App/FCBRepAlgoAPI_BooleanOperation.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Mod/Part/App/FCBRepAlgoAPI_BooleanOperation.cpp b/src/Mod/Part/App/FCBRepAlgoAPI_BooleanOperation.cpp index decee22b2b..3a5e6bd879 100644 --- a/src/Mod/Part/App/FCBRepAlgoAPI_BooleanOperation.cpp +++ b/src/Mod/Part/App/FCBRepAlgoAPI_BooleanOperation.cpp @@ -35,6 +35,7 @@ #include #include #include +#include FCBRepAlgoAPI_BooleanOperation::FCBRepAlgoAPI_BooleanOperation() { @@ -48,12 +49,14 @@ FCBRepAlgoAPI_BooleanOperation::FCBRepAlgoAPI_BooleanOperation(const TopoDS_Shap const BOPAlgo_Operation theOperation) : BRepAlgoAPI_BooleanOperation(theS1, theS2, theOperation) { - if (!BRepCheck_Analyzer(theS1).IsValid()){ - Standard_ConstructionError::Raise("Base shape is not valid for boolean operation"); + if (!BRepCheck_Analyzer(theS1).IsValid()) { + Base::Console().warning("Base shape is not valid for boolean operation"); } - if (! BRepCheck_Analyzer(theS2).IsValid()){ - Standard_ConstructionError::Raise("Tool shape is not valid for boolean operation"); + + if (!BRepCheck_Analyzer(theS2).IsValid()) { + Base::Console().warning("Tool shape is not valid for boolean operation"); } + setAutoFuzzy(); SetRunParallel(Standard_True); SetNonDestructive(Standard_True);