Wave-router: Auto-router for photonic and RF waveguides
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-26 21:14:29 -08:00
docs Separate user guides, benchmarks, and routing internals 2026-11-26 21:14:29 -08:00
examples Separate user guides, benchmarks, and routing internals 2026-11-26 21:14:29 -08:00
inire Preserve probe budgets for alternate bend proxies 2026-11-26 20:21:22 -08:00
scripts Separate user guides, benchmarks, and routing internals 2026-11-26 21:14:29 -08:00
.gitignore Separate user guides, benchmarks, and routing internals 2026-11-26 21:14:29 -08:00
.python-version Initial buildout 2026-03-07 08:26:29 -08:00
DOCS.md Separate user guides, benchmarks, and routing internals 2026-11-26 21:14:29 -08:00
LICENSE.md initial commit 2026-03-06 18:48:04 -08:00
pyproject.toml Complete feasible stress layouts with verified routing fallbacks 2026-11-26 15:23:24 -08:00
README.md Separate user guides, benchmarks, and routing internals 2026-11-26 21:14:29 -08:00
uv.lock initial pass on examples 2026-03-08 14:40:36 -07:00

inire

Use Inire to connect fixed ports on a photonic or RF layout with straight segments, 90-degree bends, and S-bends. Supply the device placement, keepouts, and allowed bend radii. The router checks the finished geometry for clearance and returns partial paths to help you diagnose unfinished nets.

User guide · Developer guide · Benchmarks

Install

From a checkout with Python 3.11 or newer, run pip install .. For development, uv sync also installs the test and lint tools.

Route a net

from inire import (
    NetSpec, Port, RoutingProblem,
    route,
)

start = Port(50, 100, 0)
target = Port(250, 100, 0)
net = NetSpec("input", start, target)
problem = RoutingProblem(
    bounds=(0, 0, 1000, 1000),
    nets=(net,),
    clearance=2,
)

run = route(problem)
result = run.results_by_net["input"]
if result.is_valid:
    print(result.report.total_length)
else:
    print(result.outcome)

A short solid waveguide connects the start at (50, 100) and target at (250, 100). Both port arrows point east.

The example prints 200.0 in the layout's coordinate unit. Both ports have heading 0 because the path travels east at departure and arrival. The plot shows the area around the first route. Read the result

Route your own layout

License

GNU Affero General Public License v3. License text