Skip to content

Commit 13de5f2

Browse files
committed
Making normal requirement for tilted plane intersections less stringent
1 parent 3366a71 commit 13de5f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tidy3d/components/geometry/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,8 +1686,8 @@ def intersections_tilted_plane(
16861686
"""
16871687

16881688
# Check if normal is a special case, where the normal is aligned with an axis.
1689-
if normal.count(0.0) == 2:
1690-
axis = np.nonzero(normal)[0][0]
1689+
if np.sum(np.isclose(normal, 0.0)) == 2:
1690+
axis = np.argmax(np.abs(normal)).item()
16911691
coord = "xyz"[axis]
16921692
kwargs = {coord: origin[axis]}
16931693
section = self.intersections_plane(**kwargs)

0 commit comments

Comments
 (0)