From e9278c55c34b72bb0beccf0d9b8bfe300aacac70 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sun, 27 Nov 2022 08:37:59 +0100 Subject: This and that (#1727) * dont fail on satin with fill * fill stitch error message * convert to satin mac issue * auto_satin: add rung for two node old style satins * avoid divide by zero in intersect_region_with_grating * fix for incorrect stagger in guided fill * better rail sectioning algorithm * fix #1780 * fix #1816 Co-authored-by: Lex Neva --- lib/stitches/fill.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/stitches/fill.py') diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py index 60a0cb7d..11c9259b 100644 --- a/lib/stitches/fill.py +++ b/lib/stitches/fill.py @@ -125,6 +125,9 @@ def intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing=Non end -= center.y height = abs(end - start) + if height == 0: + # return early to avoid divide-by-zero later + return [] # print >> dbg, "grating:", start, end, height, row_spacing, end_row_spacing -- cgit v1.2.3