Add shove-in-rooms and gate-placement fixtures and tests
rooms_shove_channel is the headline density win: a sealed NET_A wall leaves no top<->bottom door, so plain room routing drops NET_C; with shove=True NET_A is nudged aside and both nets route, DRC-clean and deterministic. rooms_wide_door seats two nets through one wide gap at distinct projected gate points with no shove. Cover the occupancy-aware projection math directly, assert the four foundation fixtures stay byte-identical under shove=True (shoves==0), and extend the room DRC-clean parametrize with both new fixtures.
This commit is contained in:
@@ -26,6 +26,8 @@ SIMPLE = FIXTURES / "simple_2net.dsn"
|
||||
CROSSING = FIXTURES / "crossing_2net.dsn"
|
||||
KICAD = FIXTURES / "kicad_routable.dsn"
|
||||
NARROW = FIXTURES / "narrow_channel.dsn"
|
||||
SHOVE_CHANNEL = FIXTURES / "rooms_shove_channel.dsn"
|
||||
WIDE_DOOR = FIXTURES / "rooms_wide_door.dsn"
|
||||
|
||||
|
||||
def _clearance(dsn, scale):
|
||||
@@ -37,7 +39,7 @@ def _clearance(dsn, scale):
|
||||
# --- DRC-clean invariant (same non-negotiable as the exact track) -----------
|
||||
|
||||
|
||||
@pytest.mark.parametrize("fixture", [SIMPLE, CROSSING, KICAD, NARROW])
|
||||
@pytest.mark.parametrize("fixture", [SIMPLE, CROSSING, KICAD, NARROW, SHOVE_CHANNEL, WIDE_DOOR])
|
||||
def test_room_router_output_is_drc_clean(fixture):
|
||||
dsn = parse_dsn(fixture.read_text())
|
||||
rooms, scale, _ = route_dsn_board_rooms(dsn)
|
||||
|
||||
Reference in New Issue
Block a user