summaryrefslogtreecommitdiff
path: root/lib/stitches
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stitches')
-rw-r--r--lib/stitches/fill.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py
index d134be32..21e35d83 100644
--- a/lib/stitches/fill.py
+++ b/lib/stitches/fill.py
@@ -143,8 +143,8 @@ def intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing=Non
res = grating_line.intersection(shape)
- if (isinstance(res, shapely.geometry.MultiLineString)):
- runs = [line_string.coords for line_string in res.geoms]
+ if (isinstance(res, shapely.geometry.MultiLineString) or isinstance(res, shapely.geometry.GeometryCollection)):
+ runs = [line_string.coords for line_string in res.geoms if isinstance(line_string, shapely.geometry.LineString)]
else:
if res.is_empty or len(res.coords) == 1:
# ignore if we intersected at a single point or no points