Reorder routing examples around user workflows
This commit is contained in:
parent
ab97281df3
commit
0755612723
2 changed files with 19 additions and 31 deletions
3
DOCS.md
3
DOCS.md
|
|
@ -43,5 +43,4 @@ If you're new to Inire, start with the [single-net quick start](README.md#route-
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
- See how port headings, fixed routes, and competing connections affect the result in the [basic examples](examples/README.md).
|
See a first connection, a verified nine-net layout, and workflows for reusing completed geometry or diagnosing a partial path in the [examples guide](examples/README.md).
|
||||||
- Compare the boards, ports, and verified results for multi-net layouts in the [advanced examples](examples/advanced.md).
|
|
||||||
|
|
|
||||||
|
|
@ -1,47 +1,36 @@
|
||||||
# Routing examples
|
# Routing examples
|
||||||
|
|
||||||
After [installing Inire](../README.md#install), run the scripts from the repository root. They save PNGs in `examples/` by default. Arrows at ports show the direction the route leaves its source or enters its target.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
python examples/01_simple_route.py
|
|
||||||
```
|
|
||||||
|
|
||||||
## Start with a connection
|
## Start with a connection
|
||||||
|
|
||||||
| Script | What to look for | Preview |
|
The [quick start](../README.md#route-a-net) uses one call to `route()` to connect two ports 200 units apart.
|
||||||
| --- | --- | --- |
|
|
||||||
| [Simple route](01_simple_route.py) | A straight waveguide connects two eastbound ports 80 units apart. | [Straight connection](01_simple_route.png) |
|
|
||||||
| [Port headings](05_orientation_stress.py) | Two routes connect ports just 20 units apart. The lower route departs east and arrives west. The middle route departs north and arrives south. Both need room to turn. | [Two heading reversals and a straight route](05_orientation_stress.png) |
|
|
||||||
|
|
||||||
## Route around fixed geometry
|

|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The first call routes a straight waveguide. The second uses its polygons as keepouts, so the new northbound connection passes to the left of the fixed route. Run [`03_locked_paths.py`](03_locked_paths.py) to reproduce the detour. To hold a route fixed in your own design, follow the [route reuse workflow](../docs/user/route-a-layout.md#reuse-an-existing-route).
|
|
||||||
|
|
||||||
## Fit bends to available room
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Run [`04_sbends_and_radii.py`](04_sbends_and_radii.py) to compare a 5-unit shift made with an S-bend and an 80-unit shift made with two 90-degree bends. Both routes leave and arrive heading east. The two 90-degree turns use radius 10 from the allowed radii of 10 and 30.
|
|
||||||
|
|
||||||
| Script | What to look for | Preview |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| [Bend proxies](06_bend_collision_models.py) | Compare three separate runs. The middle route has round physical bends and uses rectangles to check for collisions during search. The bottom route uses a right-angle polygon for both. | [Arc, box proxy, and custom bend](06_bend_collision_models.png) |
|
|
||||||
| [Custom bends](08_custom_bend_geometry.py) | Two runs connect the same ports. Compare the standard arc with the custom right-angle bend. The shaded box at the turn shows the custom bend's search proxy. | [Two bends at the same corner](08_custom_bend_geometry.png) |
|
|
||||||
|
|
||||||
The dashed outlines show the shapes used for collision checks during search. The solid outlines show the physical waveguides.
|
|
||||||
|
|
||||||
## Diagnose congestion or an incomplete route
|
|
||||||
|
|
||||||
| Script | What to look for | Preview |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| [Congestion resolution](02_congestion_resolution.py) | The eastbound route bends around the lower ends of two straight vertical routes. | [Detour around vertical routes](02_congestion_resolution.png) |
|
|
||||||
| [Best-effort result](09_unroutable_best_effort.py) | At `node_limit=3`, the route stops after its first turn with outcome `partial`. At 500 it reaches the target heading west. | [Three versus 500 nodes](../docs/user/tune-and-troubleshoot.md#why-a-net-stopped-short) |
|
|
||||||
| [Fan-out](07_large_scale_routing.py) | Ten routes pass through one opening in a wall and spread out to widely spaced targets on the right. | [Ten routes through one opening](07_large_scale_routing.png) |
|
|
||||||
|
|
||||||
The fan-out script includes a callback that can adjust the search weight for later iterations. With these settings, the automatically generated starting paths already pass verification. For a multi-net example built on the public API, try the [two-crossing layout](advanced.md#two-crossings-with-an-outside-detour).
|
|
||||||
|
|
||||||
## Route a challenging layout
|
## Route a challenging layout
|
||||||
|
|
||||||
Compare each board's inputs with its verified routes in the [advanced gallery](advanced.md). It covers mixed widths, competing passages, preplaced crossings, and both heading configurations of the nine-net Terminal-Bench board.
|

|
||||||
|
|
||||||
|
Inire verifies all nine connections on this board. One waveguide links the two preplaced crossings, and the long lower route passes beneath both south approaches. For the runnable setup and more boards, see the [advanced gallery](advanced.md).
|
||||||
|
|
||||||
|
## Optional workflows
|
||||||
|
|
||||||
|
After [installing Inire](../README.md#install), run the example scripts with Python from the repository root. Each saves a PNG in `examples/`.
|
||||||
|
|
||||||
|
### Route around fixed geometry
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The first call routes a straight waveguide. The second uses its polygons as keepouts, so the new connection passes to the left of the fixed route. Run [`03_locked_paths.py`](03_locked_paths.py) to reproduce the detour. To hold a route fixed in your own design, follow the [route reuse workflow](../docs/user/route-a-layout.md#reuse-an-existing-route).
|
||||||
|
|
||||||
|
<a id="fit-bends-to-available-room"></a>
|
||||||
|
|
||||||
|
### Set the bend geometry
|
||||||
|
|
||||||
|
- **Choose allowed radii and offsets.** The [radii and S-bends example](04_sbends_and_radii.py) supplies two 90-degree bend radii and a 5-unit S-bend offset.
|
||||||
|
- **Supply a custom bend shape.** The [custom bends example](08_custom_bend_geometry.py) sets a physical polygon for the waveguide and a separate box for collision checks during search. The [bend proxy comparison](06_bend_collision_models.py) shows how the same circular bend can use different shapes for collision checks.
|
||||||
|
|
||||||
|
<a id="diagnose-congestion-or-an-incomplete-route"></a>
|
||||||
|
|
||||||
|
### Inspect an incomplete route
|
||||||
|
|
||||||
|
In the [best-effort example](09_unroutable_best_effort.py), the path stops after its first turn at `node_limit=3` and reaches its target at 500. Compare the two paths to see [where the node budget matters](../docs/user/tune-and-troubleshoot.md#why-a-net-stopped-short).
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue