diff options
| author | George Steel <george.steel@gmail.com> | 2023-01-22 03:23:03 -0500 |
|---|---|---|
| committer | George Steel <george.steel@gmail.com> | 2023-01-22 03:23:03 -0500 |
| commit | 19c31d2ad59ba8e6653dce60ec81ccba5fed677f (patch) | |
| tree | 69e52bf9751268dc9d30bde343f41ccfc7995e96 /lib/stitches | |
| parent | 9ca70886513b1d91bcdb7276bc8bc7b24ebc6091 (diff) | |
fix 3.8 error
Diffstat (limited to 'lib/stitches')
| -rw-r--r-- | lib/stitches/running_stitch.py | 5 |
1 files changed, 1 insertions, 4 deletions
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 |
