Skip to content

Autorouting

The schematic editor can draw routes for you. Routing is done by Playdough, which first lays down a manhattan path between the two ports and then — optionally — runs a finetune that slides the interior waypoints around to minimise a weighted sum of costs: collisions with other routes, collisions with obstacles, bend radii below the cross-section minimum, path-length spread across a bundle, and so on.

Everything is reachable from one split button in the schematic toolbar.

The route button

The left half of the split button is the action, and what it does follows your selection.

Nothing selected — route all unconnected

With nothing selected, the button routes every connection in the schematic that does not have a route yet. Unconnected pairs are drawn as a red dashed line, and the tooltip tells you how many there are before you click:

Auto-route unconnected connections

A connection counts as unconnected when it is a consecutive pair of ports on a net that is neither already routed nor butt-coupled. When there is nothing left to connect the button is greyed out.

Routes selected — reroute the selection

Select one or more routes and the same button regenerates them instead, again with the count in the tooltip:

Reroute the selected routes

!!! warning "Rerouting starts from scratch"

Rerouting a selected route **discards its existing waypoints**. It is a
complete regeneration from the two endpoints, not a refinement of the
geometry on screen. Any manual tweak — a detour you dragged around an
obstacle, a segment you nudged — is lost. Undo (`Ctrl+Z` / `Cmd+Z`) brings
it back.

The whole selection is sent to Playdough as a single request rather than one call per route. That matters: it lets the route_collision cost see the routes at the same time and hold the bundle apart, instead of each route being optimised in ignorance of its neighbours.

The dropdown

The caret on the right half of the split button opens the full command list:

Route dropdown menu

Item What it does
Route all unconnected Routes every unrouted pair, regardless of the current selection
Route selected Regenerates the selected routes from scratch
Route settings… Opens the router panel

Commands that have nothing to act on stay in the menu but are disabled, with the reason as a tooltip — so the list never changes shape under you. In the screenshot above, Route all unconnected is greyed out because everything in the schematic is already routed.

Route settings

Route settings… opens a floating panel over the canvas. Every routing command reads this panel at the moment it runs — none of them prompt, and there is no per-command configuration hiding elsewhere.

Router settings panel

!!! note "Settings are per-session"

The panel lives in memory for as long as the editor is open. It is not
written to the `.gsch` file, to your project settings, or anywhere else.
Close and reopen the schematic and you are back at Playdough's defaults.

Accept keeps the current values and closes the panel. Cancel restores whatever the panel held when you opened it.

Finetune

The master toggle. With Finetune off, you get the manhattan path and nothing else — fast, predictable, and it ignores every cost weight below. With it on, the optimiser runs for at most max steps iterations (2000 by default) or until the loss stops improving.

Turning Finetune off disables the entire rest of the panel, because every parameter under it is a field of Playdough's finetune configuration.

Path length matching

Drives every route in the request towards a common optical path length — the classic use case being an interferometer or a set of delay lines that have to arrive in phase.

Path-length-matched routes

There is no group editor. The group is whatever the command routes: the selection for Route selected, and every unrouted pair for Route all unconnected. A request with fewer than two routes declares no group at all, since a single route has nothing to match against. If you want two specific routes matched, select exactly those two and reroute them.

Three parameters sit under the toggle:

Control Meaning
match bend count Also equalise the number of bends per route, not just the length
bumps (0 = auto) Force this many excursions per route to absorb slack. 0 lets Playdough add them where they are needed
detour shape Choose a compact corner detour (+2 bends) or a loop on a straight segment (+4 bends). Auto tries both and keeps the better result
max bends (empty = auto) Limit the bends permitted while Playdough retries an unmatched group. Auto starts at the group's initial bend count plus four; setting it to the current count disables those retries

Matching only works with Finetune on — length matching is a cost weight, so with no optimiser running there is nothing for it to attach to.

Advanced

The Advanced section is a direct reference to Playdough's finetune configuration. It deliberately uses Playdough's field names. An empty numeric field is omitted from the request, so Playdough uses its own default; the placeholder shows that default.

Cost weights

A higher weight makes the optimiser favour that goal more strongly. The following defaults are Playdough defaults, not extra GF+ policy.

Setting Default Effect
length_matching 0 Pulls the routes in a length-matching group toward the same optical length. Enabling Path length matching supplies 4 unless you set another value here.
route_collision 1 Keeps routes apart from one another.
obstacle_collision 1 Keeps routes outside obstacle keep-out zones.
min_radius_violation 10 Penalises bends tighter than the requested minimum radius. Its relatively high default protects geometry that can actually be drawn.
lengthening 0 Prefers shorter routes.
uniformity 0 Evens the segment lengths within each route.
non_manhattan 2 Keeps segments axis-aligned. It has no effect while manhattan_constrained is on.
bending 0 Prefers fewer, gentler turns. It has no effect while manhattan_constrained is on.
radius_mismatch 0 Experimental. Pulls bends toward target_radius, rather than only enforcing min_radius.
route_ordering 0 Experimental. Preserves the original route order to discourage crossings and swaps.
anchor_proximity 0 Experimental. Pulls routes toward supplied anchors. Livewire does not currently supply anchors, so this setting has no effect.
port_straightening 0 Deprecated. Favours a longer straight run out of each port before the first bend. Avoid it in new work.

Optimizer

Setting Default Effect
manhattan_constrained on Keeps an axis-aligned route axis-aligned while tuning. Turn it off only when diagonal refinement is wanted or necessary.
ensure_min_dof auto Adds a synthetic detour to a route with no tunable interior section. Auto is on for router-generated routes and off for supplied polylines, such as routes passed to Match Length. Turning it on can add bends to a straight route.
internal_pivots auto Sets how many interior points the optimiser may move. It is disabled while manhattan_constrained is on, because those extra points would be collinear and collapsed.
lr 1.0 Optimizer step size. Lower it for a slower, steadier run when geometry oscillates.
optimizer adam Chooses adam or sgd.
tol 1e-6 Minimum improvement that counts as progress. It matters only with patience.
patience unset Number of consecutive non-improving steps allowed before stopping early. Leave empty to use all max_steps.
step_clip unset Maximum distance geometry may move in one step, in µm. Set it to tame an unstable run.
normalize_costs on Scales goals comparably, so a weight has roughly the same meaning across layouts.

One trap worth knowing: lengthening and length_matching pull against each other. lengthening penalises absolute path length, while length_matching works by lengthening the short routes in a bundle. Neither is clamped, so a large lengthening weight will happily produce routes that are short and not matched.

Known limitation: the right-click menu

The routing actions on the right-click context menu — Match Length, the per-route reroute, and Router Settings… — do not currently honour every setting in the router panel. Some of them fall back to a predefined preset rather than reading your configuration, so the result can differ from what the same command does from the toolbar.

!!! warning "Prefer the toolbar button until 2.1"

Until this is fixed in **2.1**, drive routing from the split button and its
dropdown. That path reads the panel in full, so what you configure is what
Playdough receives.