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:
committed by
Chris Hennes
parent
ab5e9e0ded
commit
6c9c5127a6
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user