From d81196316d1a215f3a9395170479ab9ecf3dac81 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 20 May 2020 16:27:59 +0200 Subject: [PATCH] Alternative implementation to #801 --- src/ifcgeom/IfcGeomWires.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index d74bd361e3..6a3dc63745 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -558,7 +558,8 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcTrimmedCurve* l, TopoDS_Wire& flts[1] -= M_PI / 2.; } } - if ( isConic && ALMOST_THE_SAME(fmod(flts[1]-flts[0],M_PI*2.),0.) ) { + // Fix from @sanderboer to compare using model tolerance: + if (isConic && ALMOST_THE_SAME(fmod(flts[1]-flts[0],M_PI*2.), 0., getValue(GV_PRECISION))) { e = BRepBuilderAPI_MakeEdge(curve).Edge(); } else { BRepBuilderAPI_MakeEdge me (curve,flts[0],flts[1]);