summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaalleen <reni@allenka.de>2023-05-13 12:24:48 +0200
committerKaalleen <reni@allenka.de>2023-05-13 12:24:48 +0200
commit3a441427da441e1c13c349453ae642de9fdc7ab2 (patch)
tree17284f72a13e2922b91e57786cdc11ed7b8586cd
parent3574f0e17958b83b07854b7ee857aee06f38d5a8 (diff)
ripple constant end position
-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 4e1c563e..dc85445a 100644
--- a/lib/stitches/ripple_stitch.py
+++ b/lib/stitches/ripple_stitch.py
@@ -103,6 +103,11 @@ def _get_satin_line_count(stroke, pairs):
if shortest_line_len == 0 or length < shortest_line_len:
shortest_line_len = length
num_lines = ceil(shortest_line_len / stroke.min_line_dist)
+ # we want the line count to be constantly even or odd (even if the design is resized
+ # so the stitch plan can be carefully planed connecting the end point to the following object
+ if stroke.line_count % 2 != num_lines % 2:
+ num_lines -= 1
+ # for flat join styles we need to add an other line
if stroke.join_style == 1:
num_lines += 1
return num_lines