inire/README.md

50 lines
1.8 KiB
Markdown
Raw Normal View History

# inire
2026-03-07 08:26:29 -08:00
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.
2026-03-07 08:26:29 -08:00
<a id="develop-inire"></a>
[User guide](DOCS.md) · [Developer guide](docs/development.md) · [Benchmarks](docs/benchmarks.md)
## Install
2026-03-07 08:26:29 -08:00
From a checkout with Python 3.11 or newer, run `pip install .`. For development, `uv sync` also installs the test and lint tools.
2026-03-07 08:26:29 -08:00
## Route a net
2026-03-07 08:26:29 -08:00
```python
from inire import (
NetSpec, Port, RoutingProblem,
route,
)
2026-03-07 08:26:29 -08:00
start = Port(50, 100, 0)
target = Port(250, 100, 0)
net = NetSpec("input", start, target)
2026-03-30 15:32:29 -07:00
problem = RoutingProblem(
bounds=(0, 0, 1000, 1000),
nets=(net,),
clearance=2,
2026-03-08 23:34:18 -07:00
)
2026-03-07 08:26:29 -08:00
run = route(problem)
result = run.results_by_net["input"]
if result.is_valid:
print(result.report.total_length)
else:
print(result.outcome)
2026-03-07 08:26:29 -08:00
```
![A short solid waveguide connects the start at (50, 100) and target at (250, 100). Both port arrows point east.](docs/figures/first-route.png)
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](docs/user/tune-and-troubleshoot.md#read-the-result)
2026-03-30 15:32:29 -07:00
## Route your own layout
2026-03-08 14:40:36 -07:00
- [Define your ports and keepouts](docs/user/route-a-layout.md), including access to preplaced crossing cells.
- [Choose what to try after a partial route](docs/user/tune-and-troubleshoot.md#why-a-net-stopped-short).
- [Browse visual examples](examples/README.md) of multi-net routing, locked paths, and bend geometry.
2026-03-08 23:34:18 -07:00
2026-03-07 08:26:29 -08:00
## License
GNU Affero General Public License v3. [License text](LICENSE.md)