From 532f1294580080c0e075859262629ddcadabd2f5 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 4 Jun 2019 14:24:19 +0200 Subject: [PATCH] Tolerance tweaks on unification prior to boolean ops --- src/ifcgeom/IfcGeomFunctions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 0909d4917e..e673cf673d 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -461,10 +461,11 @@ namespace { } TopoDS_Shape unify(const TopoDS_Shape& s, double tolerance) { + tolerance = (std::min)(min_edge_length(s) / 2., tolerance); ShapeUpgrade_UnifySameDomain usd(s); usd.SetSafeInputMode(true); usd.SetLinearTolerance(tolerance); - usd.SetAngularTolerance(tolerance * 100.); + usd.SetAngularTolerance(1.e-3); usd.Build(); return usd.Shape(); }