summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-09-10 23:04:08 -0400
committerLex Neva <github.com@lexneva.name>2018-09-10 23:04:08 -0400
commit944022ee53d97af451e810f3b98ff077f77e13dc (patch)
tree7e34c0417580f2015b90e3145dd0ec1b7ad81097 /lib
parentb437b8403c4758813c780b16cebe8357e95a8746 (diff)
proper running stitch for big row spacing
Diffstat (limited to 'lib')
-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