fixed path curvature

pull/60/head
Andy 2018-06-10 14:33:17 -07:00
parent fd95b5609f
commit a2ea4a0e80
1 changed files with 2 additions and 3 deletions

View File

@ -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