From 19c31d2ad59ba8e6653dce60ec81ccba5fed677f Mon Sep 17 00:00:00 2001 From: George Steel Date: Sun, 22 Jan 2023 03:23:03 -0500 Subject: fix 3.8 error --- lib/stitches/running_stitch.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/stitches') diff --git a/lib/stitches/running_stitch.py b/lib/stitches/running_stitch.py index a9bed228..42bb04bc 100644 --- a/lib/stitches/running_stitch.py +++ b/lib/stitches/running_stitch.py @@ -151,13 +151,10 @@ def cut_segment_with_circle(origin: Point, r: float, a: Point, b: Point) -> Poin return a + d*t -def take_stitch(start: Point | None, points: typing.Sequence[Point], idx: int, stitch_length: float, tolerance: float): +def take_stitch(start: Point, points: typing.Sequence[Point], idx: int, stitch_length: float, tolerance: float): # Based on a single step of the Zhao-Saalfeld curve simplification algorithm. # https://cartogis.org/docs/proceedings/archive/auto-carto-13/pdf/linear-time-sleeve-fitting-polyline-simplification-algorithms.pdf # Adds early termination condition based on stitch length. - if not start and idx < len(points): - start = points[idx] - idx += 1 if idx >= len(points): return None, None -- cgit v1.2.3