From a59b3899bf14066d10f7a7dda84f9ce722f23ca9 Mon Sep 17 00:00:00 2001 From: Weiliang Jin Date: Thu, 14 Nov 2024 11:29:13 -0800 Subject: [PATCH] Fix potential self-intersection polygon in Scene._filter_structures_plane --- tidy3d/components/scene.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidy3d/components/scene.py b/tidy3d/components/scene.py index 11ca0a3ee..9751e8572 100644 --- a/tidy3d/components/scene.py +++ b/tidy3d/components/scene.py @@ -654,7 +654,7 @@ def _filter_structures_plane( if _shape.is_empty or not shape.intersects(_shape): continue - diff_shape = _shape - shape + diff_shape = (_shape - shape).buffer(0) # different prop, remove intersection from background shape if prop != _prop and len(diff_shape.bounds) > 0: