summaryrefslogtreecommitdiff
path: root/lib/stitches
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2024-07-09 18:26:47 +0200
committerGitHub <noreply@github.com>2024-07-09 18:26:47 +0200
commit6c9b902d15dbe2415d25e3c5aeb120f502f03548 (patch)
tree785a6e890058ebb4bfbbce35ef8b563d2bb0ed52 /lib/stitches
parent22920f5c511b2d206820613d939f5672767e58c8 (diff)
Skip stitch zero length row (#3054)
* fix #3052 * add one stitch for zero length row
Diffstat (limited to 'lib/stitches')
-rw-r--r--lib/stitches/fill.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py
index 8480ea0b..8d592c54 100644
--- a/lib/stitches/fill.py
+++ b/lib/stitches/fill.py
@@ -54,6 +54,10 @@ def adjust_stagger(stitch, angle, row_spacing, max_stitch_length, staggers):
def stitch_row(stitches, beg, end, angle, row_spacing, max_stitch_length, staggers, skip_last,
enable_random_stitch_length, random_sigma, random_seed):
+ if end == beg:
+ stitches.append(Stitch(*beg, tags=('fill_row_start',)))
+ return
+
beg = Stitch(*beg, tags=('fill_row_start',))
end = Stitch(*end, tags=('fill_row_start',))
stitches.append(beg)