From a2ea4a0e801c4efe1d41e7ccc53f33b224173c7f Mon Sep 17 00:00:00 2001 From: Andy Date: Sun, 10 Jun 2018 14:33:17 -0700 Subject: [PATCH] fixed path curvature --- svgpathtools/path.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/svgpathtools/path.py b/svgpathtools/path.py index 2553903..1a8daf2 100644 --- a/svgpathtools/path.py +++ b/svgpathtools/path.py @@ -2124,8 +2124,8 @@ class Path(MutableSequence): (seg_idx + 1) % len(self._segments)] if not next_seg_in_path.joins_smoothly_with(seg): return float('inf') - dz = self.derivative(t) - ddz = self.derivative(t, n=2) + dz = self.derivative(T) + ddz = self.derivative(T, n=2) dx, dy = dz.real, dz.imag ddx, ddy = ddz.real, ddz.imag return abs(dx*ddy - dy*ddx)/(dx*dx + dy*dy)**1.5 @@ -2270,7 +2270,6 @@ class Path(MutableSequence): new_path.append(seg1.cropped(0, t_seg1)) return new_path - def radialrange(self, origin, return_all_global_extrema=False): """returns the tuples (d_min, t_min, idx_min), (d_max, t_max, idx_max) which minimize and maximize, respectively, the distance