Skip to content

Commit f5a5d78

Browse files
small bug
1 parent e32683d commit f5a5d78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tidy3d/components/grid/grid_spec.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,7 @@ def _resolve_gaps(self, structures: List, grid: Grid):
16841684
min_dx = np.min(h_cells_dx[h_cells_ij[:, 0] == ind_i])
16851685
max_dx = np.max(h_cells_dx[h_cells_ij[:, 0] == ind_i])
16861686
snapping_lines_x.append(x[ind_i] + 0.5 * (min_dx + max_dx))
1687-
detected_gap_width = min(detected_gap_width, max_dy - min_dy)
1687+
detected_gap_width = min(detected_gap_width, max_dx - min_dx)
16881688

16891689
return [Box.unpop_axis(X, (None, None), axis=tan_dims[0]) for X in snapping_lines_x] + [
16901690
Box.unpop_axis(Y, (None, None), axis=tan_dims[1]) for Y in snapping_lines_y
@@ -2158,7 +2158,7 @@ def make_grid(
21582158
lumped_elements=lumped_elements,
21592159
internal_override_structures=internal_override_structures,
21602160
internal_snapping_points=internal_snapping_points + snapping_lines,
2161-
min_dl_from_gaps=min_gap_width,
2161+
min_dl_from_gaps=0.5 * min_gap_width,
21622162
)
21632163

21642164
same = old_grid == new_grid

0 commit comments

Comments
 (0)