Skip to content

Commit 0164e48

Browse files
committed
Extra check to avoid a shapely warning when .intersects an empty shape
1 parent 0cba6a4 commit 0164e48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tidy3d/components/simulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,7 @@ def _filter_structures_plane( # pylint:disable=too-many-locals
18371837
continue
18381838

18391839
# look more closely to see if intersected.
1840-
if not shape.intersects(_shape):
1840+
if _shape.is_empty or not shape.intersects(_shape):
18411841
continue
18421842

18431843
diff_shape = _shape - shape

0 commit comments

Comments
 (0)