diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-06-23 13:59:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-23 13:59:20 +0200 |
| commit | 2281130ab7c034354e6a333f0d6b303f2a4a9e54 (patch) | |
| tree | 5f2acc8d81a8b5c934d8678650b54617a07c1eca /lib/stitch_plan | |
| parent | 7a856a77e4d36a077cb1a5a1c50831463a6692a0 (diff) | |
Various fixes (#3011)
* change satin underlay stitch length default for real
* fix zero length lock stitch
* fix typos
Diffstat (limited to 'lib/stitch_plan')
| -rw-r--r-- | lib/stitch_plan/lock_stitch.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/stitch_plan/lock_stitch.py b/lib/stitch_plan/lock_stitch.py index 1a8923af..9d720146 100644 --- a/lib/stitch_plan/lock_stitch.py +++ b/lib/stitch_plan/lock_stitch.py @@ -85,12 +85,15 @@ class RelativeLock(LockStitchDefinition): to_previous = stitches[1] - stitches[0] length = to_previous.length() + if length == 0: + direction = Stitch(0, 0.5) + else: + direction = to_previous.unit() + # travel at least 0.5 and at most 1.5 length = max(length, 0.5 * PIXELS_PER_MM) length = min(length, 1.5 * PIXELS_PER_MM) - direction = to_previous.unit() - # Travel back one stitch, stopping halfway there. # Then go forward one stitch, stopping halfway between # again. |
