From 2e62ba7926a19e2952148c6ced3b6ebf1a96d78a Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sat, 6 May 2023 18:31:54 +0200 Subject: Avoid duplicated points in make_spiral (#2268) * avoid duplicated points in make_spiral * circular fill: add end_row_spacing, repeats and bean repeats * fix circular fill if original shape is a circle --- lib/stitches/contour_fill.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/stitches/contour_fill.py') diff --git a/lib/stitches/contour_fill.py b/lib/stitches/contour_fill.py index f5f2a3ee..2ea61afb 100644 --- a/lib/stitches/contour_fill.py +++ b/lib/stitches/contour_fill.py @@ -574,6 +574,10 @@ def _make_spiral(rings, stitch_length, starting_point): check_stop_flag() spiral_part = _interpolate_linear_rings(ring1, ring2, stitch_length, starting_point) - path.extend(spiral_part.coords) + # skip last to avoid duplicated points + path.extend(spiral_part.coords[:-1]) + + # at the end add last point + path.append(spiral_part.coords[-1]) return path -- cgit v1.2.3