7.6 KiB
Advanced routing examples
Compare the input board and the calculated routes on layouts with tight turns, shared openings, or preplaced crossing cells. The layouts come from Inire's stress tests and the nine-net Terminal-Bench cases.
- Competing passages for different guide widths and routes travelling in both directions.
- Bend and return room for alternating detours, short shifts, and branches.
- Placed crossings for access slots and external detours.
- Nine-net Terminal-Bench board for fixed and inferred headings on the same input.
Run a layout
Select a case by its name below. Repeat --case to draw several layouts, or omit it to draw all twelve.
python examples/advanced_layouts.py \
--case stress-crossings-shared-outside-detour \
--case terminal-bench \
--output-dir /tmp/inire-advanced-routes
The layout data lists board bounds, polygon keepouts in well-known text (WKT), clearance, and allowed radii. Each net row contains its ID, source port, target port, and width. A port is [x, y, heading_in_degrees], with the target heading giving the direction of arrival. The example script turns the data into a RoutingProblem and routes it automatically.
In the figures, gray shapes are keepouts. Open circles mark sources and filled squares mark targets. Arrows indicate the direction of travel at those ports. The result panel draws the physical waveguides and reports the number of nets that passed verification.
Competing passages
Mixed widths at a slit
In stress-passage-width-key, the 2-unit-wide guide fits through the 14-unit lower slit with the required clearance of 5 on each side. The upper opening carries the other five routes, some eastbound and some westbound.
Staggered openings and one shared passage
In stress-passage-split-merge, three routes use each of the first wall's two openings. Their turns between the walls bring all six routes into one opening in the second wall, with clearance between the guides.
Bend and return room
Alternating doglegs
In stress-refine-alternating-doglegs, three eastbound nets pass above a wall rising from the bottom and then below a wall hanging from the top. The staggered turns preserve clearance for three different guide widths.
Folded return near a shelf
In stress-refine-return-shelf, the folded return starts and finishes heading east, even though its target lies west of its source. It loops below two nearby routes before turning east to enter its target.
Trunk that detours around branches
In stress-retry-straight-decoy, a straight route between the trunk's ports would cross both vertical branches. The routed trunk passes below the lower end of each branch and above the bottom route.
Short shifts on separate rows
In stress-retry-compact-shift-bank, walls divide the board into four rows. The lowest net has only 66 units of forward travel for an 85-unit lateral shift. Its turns fit beside the keepout on that row.
Mixed port bank
In stress-retry-mixed-port-bank, the two short routes connect offset ports on opposite sides of the board. One launches east and the other west. The route starting near the bottom turns from northbound to eastbound, and the top route runs straight west.
Placed crossings
The crossing cells are already placed. The board supplies keepouts with slots at their ports, and each routed net represents an external connection. To set up the keepouts for your own devices, follow the placed crossing walkthrough.
Opposed S-bends beside a crossing
In stress-sbend-competing-slots, the two left-hand routes each shift sideways by 20 units. The eastbound route bends past the right end of the small keepout, and the westbound route bends past its left end. Two other routes connect to the north and south ports of the crossing.
Odd offset and a short launch pocket
In stress-crossing-off-lattice-slot, the west approach shifts 17 units north with two 90-degree bends and still arrives heading east. The route leaving the crossing's north port bends around the keepout above it.
Two crossings with an outside detour
In stress-crossings-shared-outside-detour, a straight external waveguide joins the two crossing cells. The long eastbound route detours below the horizontal keepout and the two short links to the south ports.
Nine-net Terminal-Bench board
Nine closely spaced source ports on the left feed routes around seven keepouts. Both examples use guides 2 units wide, a clearance of 6 units, and a radius of 50 units for bends and S-bends. For the original board data and the waypoint export command, see the Terminal-Bench fixture guide.
To follow how the router builds and checks the paths in these figures, read the Terminal-Bench walkthrough.
Fixed eastbound headings
In terminal-bench, all routes must leave and arrive heading east. Follow net_08 from the bottommost source around the board. Near the top edge, it turns back to approach its target from the west.
Point terminals
In terminal-bench-point-terminals, the coordinates are the same and infer_terminal_headings=True lets the planner choose directions. The setup shows just the port positions. In the result, net_08 enters its target from the east and avoids the final turnaround.











