Skip to content

Commit 3520429

Browse files
weiliangjin2021momchil-flex
authored andcommitted
Fix potential self-intersection polygon in Scene._filter_structures_plane
1 parent aa1d50c commit 3520429

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tidy3d/components/scene.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ def _filter_structures_plane(
637637
if _shape.is_empty or not shape.intersects(_shape):
638638
continue
639639

640-
diff_shape = _shape - shape
640+
diff_shape = (_shape - shape).buffer(0)
641641

642642
# different prop, remove intersection from background shape
643643
if prop != _prop and len(diff_shape.bounds) > 0:

0 commit comments

Comments
 (0)