summaryrefslogtreecommitdiff
path: root/lib/stitches/ripple_stitch.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2025-05-21 17:45:57 +0200
committerGitHub <noreply@github.com>2025-05-21 17:45:57 +0200
commit20f2d387247715f4678638ae29cbf68f237d0dd5 (patch)
tree7a5c7acbf768ced6867ec1a9f5360fb9ec48950b /lib/stitches/ripple_stitch.py
parent7374f7e90afaeb190c783fd68286ff466821de6f (diff)
ensure start and end point for ripple lines (#3741)
Diffstat (limited to 'lib/stitches/ripple_stitch.py')
-rw-r--r--lib/stitches/ripple_stitch.py5
1 files changed, 5 insertions, 0 deletions
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()