summaryrefslogtreecommitdiff
path: root/lib/stitches/running_stitch.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2025-04-18 07:39:15 +0200
committerGitHub <noreply@github.com>2025-04-18 07:39:15 +0200
commit8137481953398b22f6eb9c2f7497102f82ccee0b (patch)
tree48beb04fc73921f69d3f71cdaa16acc98e998fbc /lib/stitches/running_stitch.py
parent37f3c57b9522f779a36e9e9a8d1f93db8f43e6fd (diff)
Disconnect stroke and fill pull compensation param (#3670)
* make stroke pull compensation a sided property
Diffstat (limited to 'lib/stitches/running_stitch.py')
-rw-r--r--lib/stitches/running_stitch.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/stitches/running_stitch.py b/lib/stitches/running_stitch.py
index a773fa9a..0b7a672d 100644
--- a/lib/stitches/running_stitch.py
+++ b/lib/stitches/running_stitch.py
@@ -379,8 +379,8 @@ def zigzag_stitch(stitches, zigzag_spacing, stroke_width, pull_compensation):
# of points in turn, and move perpendicular to them,
# alternating left and right.
- stroke_width = stroke_width + pull_compensation
- offset = stroke_width / 2.0
+ offset1 = stroke_width / 2 + pull_compensation[0]
+ offset2 = stroke_width / 2 + pull_compensation[1]
for i in range(len(stitches) - 1):
start = stitches[i]
@@ -393,8 +393,8 @@ def zigzag_stitch(stitches, zigzag_spacing, stroke_width, pull_compensation):
zigzag_direction = segment_direction.rotate_left()
if i % 2 == 1:
- zigzag_direction *= -1
-
- stitches[i] += zigzag_direction * offset
+ stitches[i] += zigzag_direction * -offset1
+ else:
+ stitches[i] += zigzag_direction * offset2
return stitches