From 8ffc12e6cd5cb93430f055370ba0c80f84789c6b Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 8 May 2018 09:41:19 +0200 Subject: [PATCH] Reduce radius on wire intersections --- src/ifcgeom/IfcGeomFunctions.cpp | 2 +- src/ifcgeom/IfcGeomWires.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 4957bf40db..f0401ad7fd 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -2863,7 +2863,7 @@ bool IfcGeom::Kernel::wire_intersections(const TopoDS_Wire& wire, TopTools_ListO if (i == n - 1 && j == 0) continue; bool unbounded_intersects; - const double eps = getValue(GV_PRECISION) * 10.; + const double eps = getValue(GV_PRECISION) * 2.; double u11, u12, u21, u22, U1, U2; GeomAPI_ExtremaCurveCurve ecc( diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index e1e2ed4781..935aeedfd6 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -397,7 +397,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcPolyline* l, TopoDS_Wire& resu polygon.Append(pnt); } - const double eps = getValue(GV_PRECISION) * 10; + const double eps = getValue(GV_PRECISION) * 2.; const bool closed_by_proximity = polygon.Length() >= 2 && polygon.First().Distance(polygon.Last()) < eps; if (closed_by_proximity) { // tfk: note 1-based @@ -439,7 +439,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcPolyLoop* l, TopoDS_Wire& resu } // Remove points that are too close to one another - const double eps = getValue(GV_PRECISION) * 10; + const double eps = getValue(GV_PRECISION) * 2.; remove_duplicate_points_from_loop(polygon, true, eps); int count = polygon.Length();