summaryrefslogtreecommitdiff
path: root/lib/stitches/fill.py
diff options
context:
space:
mode:
authorGeorge Steel <george.steel@gmail.com>2022-12-10 19:27:20 -0500
committerGeorge Steel <george.steel@gmail.com>2022-12-10 19:29:01 -0500
commit2cec72cbbd73b2dece5d15715e2ab8bddd417c69 (patch)
treeaff4569cb68f626e05489a86511fbd4be8325e17 /lib/stitches/fill.py
parent495a22ea55234e032ac526450fd7969d9aa799c8 (diff)
parente52f889bb0cb208685b3f3ef8271f63ecd318af1 (diff)
Merge branch 'george-steel/expose-trim-after'
Diffstat (limited to 'lib/stitches/fill.py')
-rw-r--r--lib/stitches/fill.py3
1 files changed, 3 insertions, 0 deletions
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