From 9f787a661efd2f4336cef0233ee5a2046eb96dd3 Mon Sep 17 00:00:00 2001 From: George Steel Date: Sun, 22 Jan 2023 19:54:57 -0500 Subject: add missing bounds check --- lib/stitches/running_stitch.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/stitches/running_stitch.py') diff --git a/lib/stitches/running_stitch.py b/lib/stitches/running_stitch.py index 49d29c72..66f903e0 100644 --- a/lib/stitches/running_stitch.py +++ b/lib/stitches/running_stitch.py @@ -209,6 +209,8 @@ def stitch_curve_even(points: typing.Sequence[Point], stitch_length: float, tole def path_to_curves(points: typing.List[Point]): # split a path at obvious corner points so that they get stitched exactly + if len(points) < 3: + return [points] curves = [] last = 0 last_seg = points[1] - points[0] -- cgit v1.2.3