From 795df7e315c3d691717f8b077d4668e5ef31ac64 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Tue, 4 Jul 2023 06:27:33 +0200 Subject: avoid error message on small contour fill with single or double spiral (#2403) --- 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 29e2547d..b6262a45 100644 --- a/lib/stitches/running_stitch.py +++ b/lib/stitches/running_stitch.py @@ -249,6 +249,8 @@ def path_to_curves(points: typing.List[Point], min_len: float): def running_stitch(points, stitch_length, tolerance): # Turn a continuous path into a running stitch. + if not points: + return stitches = [points[0]] for curve in path_to_curves(points, 2 * tolerance): # segments longer than twice the tollerance will usually be forced by it, so set that as the minimum for corner detection -- cgit v1.2.3