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.
This commit is contained in:
Kacper Donat
2025-08-14 14:28:38 +02:00
committed by Chris Hennes
parent 9fc40b33de
commit 947f1ca235

View File

@@ -35,6 +35,7 @@
#include <TopoDS_Iterator.hxx>
#include <Precision.hxx>
#include <FuzzyHelper.h>
#include <Base/Console.h>
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);