From 20f2d387247715f4678638ae29cbf68f237d0dd5 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Wed, 21 May 2025 17:45:57 +0200 Subject: ensure start and end point for ripple lines (#3741) --- lib/stitches/ripple_stitch.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/stitches/ripple_stitch.py') diff --git a/lib/stitches/ripple_stitch.py b/lib/stitches/ripple_stitch.py index 231a70e1..804e5f15 100644 --- a/lib/stitches/ripple_stitch.py +++ b/lib/stitches/ripple_stitch.py @@ -106,6 +106,11 @@ def _get_staggered_stitches(stroke, lines, skip_start): else: # uses the guided fill alforithm to stagger rows of stitches points = list(apply_stitches(LineString(line), stitch_length, stroke.staggers, 0.5, i, tolerance).coords) + + # simplifying the path in apply_stitches could have removed the start or end point + # we can simply add it again, the minimum stitch length value will take care to remove possible duplicates + points = [line[0]] + points + [line[-1]] + stitched_line = [InkstitchPoint(*point) for point in points] if should_reverse and stroke.flip_copies: stitched_line.reverse() -- cgit v1.2.3