From 1e305d4d3b27cc42878edb08af9db414cd24c670 Mon Sep 17 00:00:00 2001 From: flex-Alec <139144665+alec-flexcompute@users.noreply.github.com> Date: Fri, 28 Jul 2023 14:29:37 -0700 Subject: [PATCH] Updated Geometry.intersections_2dbox updated changelog --- CHANGELOG.md | 1 + tidy3d/components/geometry.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f8548098..efd292102 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ A convenience function `Simulation.perturbed_mediums_copy` is added to class `Si ### Fixed - Adjoint plugin import failures after `jax.numpy.DeviceArray` -> `jax.Array` in jax 0.4.14. +- Fixed definition of shapely box bounds in Geometry.intersections_2dbox() ## [2.3.2] - 2023-7-21 diff --git a/tidy3d/components/geometry.py b/tidy3d/components/geometry.py index 7e1ef3c9d..7bf80f016 100644 --- a/tidy3d/components/geometry.py +++ b/tidy3d/components/geometry.py @@ -222,7 +222,7 @@ def intersections_2dbox(self, plane: Box) -> List[Shapely]: # intersect all shapes with the input plane bs_min, bs_max = [plane.pop_axis(bounds, axis=normal_ind)[1] for bounds in plane.bounds] - shapely_box = box(minx=bs_min[0], miny=bs_min[0], maxx=bs_max[1], maxy=bs_max[1]) + shapely_box = box(minx=bs_min[0], miny=bs_min[1], maxx=bs_max[0], maxy=bs_max[1]) shapely_box = plane.evaluate_inf_shape(shapely_box) return [plane.evaluate_inf_shape(shape) & shapely_box for shape in shapes_plane]