From d713b7e06a58947e717ef374e61e38c3d7fb9c8b Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 25 Apr 2017 12:43:29 +0200 Subject: [PATCH] Limit retries for boolean op on OCCT 6.9 and higher --- src/ifcgeom/IfcGeomFunctions.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 71c742a155..422bec41ad 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -2554,7 +2554,10 @@ bool IfcGeom::Kernel::boolean_operation(const TopoDS_Shape& a, const TopTools_Li } delete builder; if (!success) { - return boolean_operation(a, b, op, result, fuzziness * 10.); + const double new_fuzziness = fuzziness * 10.; + if (new_fuzziness + 1e-15 <= getValue(GV_PRECISION) * 1000.) { + return boolean_operation(a, b, op, result, new_fuzziness); + } } return success; }