summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLex Neva <github@lexneva.name>2016-02-28 14:02:57 -0500
committerLex Neva <github@lexneva.name>2016-02-28 14:02:57 -0500
commitffea1d2bc1978051b671f790608ba33f302ba27f (patch)
tree4f96b02791b35553aa8523b4af25eff9870b3db5
parent43b16936be6a49c014d4e444cc52212ab7c45028 (diff)
fix: stitches appearing outside fill in case of very short rows
-rw-r--r--embroider.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/embroider.py b/embroider.py
index 4ef9925a..7ec9d245 100644
--- a/embroider.py
+++ b/embroider.py
@@ -722,13 +722,10 @@ class Embroider(inkex.Effect):
offset = (first_stitch - beg).length()
- while True:
+ while offset < segment_length:
patch.addStitch(beg + offset * row_direction)
offset += max_stitch_len_px
- if offset > segment_length:
- break
-
if (end - patch.stitches[-1]).length() > 0.1 * pixels_per_millimeter:
patch.addStitch(end)