From 98d8a3477dffc64753d6ec24a7b0dc413839cd28 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sun, 12 Jan 2020 15:17:48 +0100 Subject: [PATCH] Limit max angle for trimmed curve approx --- src/ifcgeom/IfcGeomWires.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index e160df60af..48724117e9 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -575,7 +575,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcTrimmedCurve* l, TopoDS_Wire& // The formula in deflection_for_approximating_circle() is for circles, but probably good enough radius = Handle(Geom_Ellipse)::DownCast(crv)->MajorRadius(); } - if (radius > 0. && deflection_for_approximating_circle(radius, b - a) < 100 * getValue(GV_PRECISION)) { + if (radius > 0. && deflection_for_approximating_circle(radius, b - a) < 100 * getValue(GV_PRECISION) && std::abs(b-a) < M_PI/4.) { TopoDS_Vertex v0, v1; TopExp::Vertices(e, v0, v1); e = TopoDS::Edge(BRepBuilderAPI_MakeEdge(v0, v1).Edge().Oriented(e.Orientation()));