Leave fine-pitch pins straight and let rip-up reach a pin's way out
A 1.0 mm trace from a 1.27 mm pitch pin (the RN2483 row on the TTN Enschede mote) has to stay within 0.06 mm of the pin's centreline until it is past the neighbouring pads. No grid column is that close, and the router could not get there: - A stub ran as one slanted segment to its cell centre. The exact check sees that as its bounding box, which lands on the next pad. Orthogonal stubs now leave straight along the pin's axis and jog to the cell only at the end. - End nodes were chosen as in free space even in the rip-up search, so once another net crossed a pin's only exit, the pin had no end left and rip-up could never take the exit back. In rip-up mode those cells and stubs are now enterable at the rip penalty, and routes on a stub are ripped along with the ones the path crosses. - Two neighbouring pins' stubs each claim the cells a centred trace would crowd, so their claims overlapped well before their copper did. Stub against stub is now checked on the copper. - Escapes also look one column either side, so two pins leaving the same way can jog apart. TTN Enschede mote, exact engine with --shove: 12 unrouted before, 0 after; KiCad DRC on the result has no clearance violations and no unconnected items. The 0.5 mm pitch row test at resolution 1 now routes all 5 pins (it pinned 2).
This commit is contained in:
@@ -51,19 +51,22 @@ def test_routes_keep_edge_clearance_at_a_rounded_corner():
|
||||
assert outline.edge_distance(p) >= half + 500 * scale - 1
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("resolution", "escape"), [(1, 2), (4, 5)])
|
||||
def test_every_pin_of_a_half_millimetre_pitch_row_escapes(resolution, escape):
|
||||
@pytest.mark.parametrize("resolution", [1, 4])
|
||||
def test_every_pin_of_a_half_millimetre_pitch_row_escapes(resolution):
|
||||
# Five 0.3 mm pads at 0.5 mm pitch, each wired to its own pad 8 mm away.
|
||||
# Between two neighbours a trace's centre has a legal band only 0.15 mm
|
||||
# wide. At resolution 1 the 0.4 mm grid misses most bands; at 4 its
|
||||
# 0.1 mm columns cannot, and every pin gets out, as the JAR manages.
|
||||
# wide. At resolution 4 the 0.1 mm columns cannot miss it. At resolution
|
||||
# 1 the 0.4 mm grid misses most bands, but a stub leaves its pin straight
|
||||
# along the band and jogs to the column only past the pads, so every pin
|
||||
# gets out there too, as the JAR manages (only 2 did before).
|
||||
places = " ".join(f"(place R{i} {6000 + 500 * i} -6000 front 0)" for i in range(5))
|
||||
places += " " + " ".join(f"(place F{i} {6000 + 500 * i} -14000 front 0)" for i in range(5))
|
||||
nets = " ".join(f"(net N{i} (pins R{i}-1 F{i}-1))" for i in range(5))
|
||||
result, _, _ = route_dsn_board_exact(
|
||||
parse_dsn(_dsn(f"(component P {places})", nets)), resolution=resolution
|
||||
)
|
||||
assert len(result.routed_net_numbers) == escape
|
||||
assert len(result.routed_net_numbers) == 5
|
||||
assert result.drc_clean
|
||||
|
||||
|
||||
def test_resolution_one_has_no_halo_so_the_grid_is_unchanged():
|
||||
|
||||
Reference in New Issue
Block a user