From 47a49cfd8c898a575c3a919a0c993c6ebfed29a8 Mon Sep 17 00:00:00 2001 From: Martin Renold Date: Sun, 12 Aug 2018 13:38:18 +0200 Subject: [PATCH] fix arc bug in svg path reader (found by Christian Walther) to reproduce, import this file: https://log2.ch/misc/laser/bug--arc-looks-different-in-inkscape.svg --- backend/jobimport/svg_path_reader.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/jobimport/svg_path_reader.py b/backend/jobimport/svg_path_reader.py index 3342d18..5eaa970 100644 --- a/backend/jobimport/svg_path_reader.py +++ b/backend/jobimport/svg_path_reader.py @@ -377,6 +377,7 @@ def addArc(self, subpath, x1, y1, rx, ry, phi, large_arc, sweep, x2, y2): # plus some recursive sugar for incrementally refining the # arc resolution until the requested tolerance is met. # http://www.w3.org/TR/SVG/implnote.html#ArcImplementationNotes + phi = phi / 360.0 * 2*math.pi cp = math.cos(phi) sp = math.sin(phi) dx = 0.5 * (x1 - x2)