From b12bcc5889ced49b9d7a7c60dff2b97cca4fa334 Mon Sep 17 00:00:00 2001 From: phkahler <14852918+phkahler@users.noreply.github.com> Date: Sun, 18 Oct 2020 17:05:02 -0400 Subject: [PATCH] Fix some IDF file curves. --- src/importidf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/importidf.cpp b/src/importidf.cpp index c1e2e331..c9ce7ec6 100644 --- a/src/importidf.cpp +++ b/src/importidf.cpp @@ -241,7 +241,6 @@ static void MakeBeziersForArcs(SBezierList *sbl, Vector center, Vector pa, Vecto if(angle == 360.0) { thetaa = 0; thetab = 2*PI; - dtheta = 2*PI; } else { Point2d c2 = center.Project2d(u, v); Point2d pa2 = (pa.Project2d(u, v)).Minus(c2); @@ -249,8 +248,9 @@ static void MakeBeziersForArcs(SBezierList *sbl, Vector center, Vector pa, Vecto thetaa = atan2(pa2.y, pa2.x); thetab = atan2(pb2.y, pb2.x); - dtheta = thetab - thetaa; } + dtheta = angle * PI/180; + int i, n; if(dtheta > (3*PI/2 + 0.01)) { n = 4;