summaryrefslogtreecommitdiff
path: root/lib/stitches/fill.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2022-01-23 08:36:07 +0100
committerGitHub <noreply@github.com>2022-01-23 08:36:07 +0100
commit3514f878ee495e87a4f44cc971de242640fab3d4 (patch)
treeb0fc4b7c585525cea856d88cd7dd8890d96cf5aa /lib/stitches/fill.py
parent9a48fff9813b6538702e8761b2239d6d848e5ac7 (diff)
multipart geometry in intersect region (#1475)
Diffstat (limited to 'lib/stitches/fill.py')
-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