Keep route placement at the layout writer boundary

Use the effective net, seed, and search settings as the placement recipe. Remove the export-grid, whole-layer, and CPW mask assembly helpers and cover replay from resolved ports.
This commit is contained in:
Jan Petykiewicz 2026-11-29 16:36:32 -08:00
commit 42e1de9884

View file

@ -1,7 +1,6 @@
from dataclasses import replace
from inire import FixedRoute, NetSpec, ObjectiveWeights, Port, RoutingOptions, RoutingProblem, SearchOptions, TopologyOptions, route
from inire.layout import verify_export_grid
from inire.utils.visualization import plot_routing_results
@ -26,9 +25,11 @@ def main() -> None:
print("Routing detour net around locked path...")
remaining = replace(problem, nets=(detour_net,), fixed_routes=(FixedRoute.from_result(fixed),))
run = route(remaining, options=options)
export = verify_export_grid(remaining, run.results_by_net, grid=1)
if not export.is_valid:
raise ValueError(export.reports_by_net)
detour = run.results_by_net[detour_net.net_id]
if not detour.is_valid:
raise ValueError(detour.report)
print("Detour net", detour.effective_net)
print("Placement recipe", detour.as_seed())
fig, _ax = plot_routing_results({fixed.net_id: fixed, **run.results_by_net}, [], bounds)
fig.savefig("examples/03_locked_paths.png")