summaryrefslogtreecommitdiff
path: root/lib/stitches/auto_fill.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-09-12 21:32:15 -0400
committerGitHub <noreply@github.com>2018-09-12 21:32:15 -0400
commit7b8af2ed5731bc10b331db2b32dbce48f60c33a9 (patch)
treeac06f38cde84e676f8aa8e91f08b71d45b9f2642 /lib/stitches/auto_fill.py
parent3fd741a1a4218b6559184aaadcde8abca178bde2 (diff)
parentd30507171b04f37871db74609c0a521325bddbd1 (diff)
Merge pull request #301 from inkstitch/lexelby/bug-fixes
bug fixes
Diffstat (limited to 'lib/stitches/auto_fill.py')
-rw-r--r--lib/stitches/auto_fill.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/stitches/auto_fill.py b/lib/stitches/auto_fill.py
index e732c940..1660cd4e 100644
--- a/lib/stitches/auto_fill.py
+++ b/lib/stitches/auto_fill.py
@@ -472,7 +472,8 @@ def connect_points(shape, start, end, running_stitch_length, row_spacing):
# most cases. 1.4 is chosen as approximately the length of the
# stitch connecting two rows if the side of the shape is at a 45
# degree angle to the rows of stitches (sqrt(2)).
- if abs(end_projection - start_projection) < row_spacing * 1.4:
+ direct_distance = abs(end_projection - start_projection)
+ if direct_distance < row_spacing * 1.4 and direct_distance < running_stitch_length:
return [InkstitchPoint(end.x, end.y)]
# The outline path has a "natural" starting point. Think of this as