2026-11-26 20:25:20 -08:00
# inire
2026-03-07 08:26:29 -08:00
2026-11-29 23:12:28 -08:00
Inire routes photonic and RF layouts with straights, 90-degree bends, and S-bends.
2026-03-07 08:26:29 -08:00
2026-11-26 20:25:20 -08:00
## Install
2026-03-07 08:26:29 -08:00
2026-12-01 22:30:29 -08:00
From a checkout with Python 3.11 or newer, run `pip install .` . Inire requires Shapely 2.1 or newer and checks at import that Shapely is linked against GEOS 3.10 or newer.
2026-03-07 08:26:29 -08:00
2026-11-26 20:25:20 -08:00
## Route a net
2026-03-07 08:26:29 -08:00
```python
2026-11-26 21:14:29 -08:00
from inire import (
NetSpec, Port, RoutingProblem,
route,
)
2026-03-07 08:26:29 -08:00
2026-11-26 21:14: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),
2026-11-26 21:14:29 -08:00
nets=(net,),
2026-11-26 20:25:20 -08:00
clearance=2,
2026-03-08 23:34:18 -07:00
)
2026-03-07 08:26:29 -08:00
2026-11-26 20:25:20 -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
```
2026-12-02 17:16:34 -08:00

2026-11-26 11:57:49 -08:00
2026-11-29 23:12:28 -08:00
The example prints `200.0` . Heading `0` is east at both ports.
2026-03-30 15:32:29 -07:00
2026-11-26 20:44:18 -08:00
## Route your own layout
2026-03-08 14:40:36 -07:00
2026-12-02 17:16:34 -08:00
- [Layout inputs ](https://mpxd.net/code/jan/inire/src/branch/topo/docs/user/route-a-layout.md#user-content-define-the-inputs )
- [Partial routes ](https://mpxd.net/code/jan/inire/src/branch/topo/docs/user/tune-and-troubleshoot.md#user-content-why-a-net-stopped-short )
- [Placement recipes ](https://mpxd.net/code/jan/inire/src/branch/topo/docs/user/route-a-layout.md#user-content-save-a-placement-recipe )
- [User guide ](https://mpxd.net/code/jan/inire/src/branch/topo/DOCS.md )
2026-11-26 22:03:08 -08:00
## Develop Inire
2026-12-02 17:16:34 -08:00
- [Developer guide ](https://mpxd.net/code/jan/inire/src/branch/topo/docs/development.md )
- [Routing benchmarks ](https://mpxd.net/code/jan/inire/src/branch/topo/docs/benchmarks.md )
2026-11-26 22:03:08 -08:00
2026-03-07 08:26:29 -08:00
## License
2026-12-02 17:16:34 -08:00
Inire is distributed under the [GNU Affero General Public License v3 ](https://mpxd.net/code/jan/inire/src/branch/topo/LICENSE.md ).