53 lines
1.8 KiB
Markdown
53 lines
1.8 KiB
Markdown
# 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.
|
|
|
|
## Install
|
|
|
|
From a checkout with Python 3.11 or newer, run `pip install .`.
|
|
|
|
## Route a net
|
|
|
|
```python
|
|
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)
|
|
```
|
|
|
|

|
|
|
|
The example prints `200.0` in the layout's coordinate unit. Both ports have heading 0 because the path travels east as it leaves the source and enters the target.
|
|
|
|
## Route your own layout
|
|
|
|
- [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.
|
|
|
|
For the full workflow and API reference, start with the [user guide](DOCS.md).
|
|
|
|
## Develop Inire
|
|
|
|
- To set up the development environment and find the relevant routing code, use the [developer guide](docs/development.md).
|
|
- To measure routing coverage, cost, or runtime, run the [routing benchmarks](docs/benchmarks.md).
|
|
|
|
## License
|
|
|
|
Inire is distributed under the [GNU Affero General Public License v3](LICENSE.md).
|