The fixed portion of an in-progress route — start → each waypoint → the last waypoint — computed once and reused while only the cursor (head) moves. Split
out of RouteRequest::route so the live RouteTool preview recomputes only the
trailing head leg per frame. Read-only (no occupancy applied).
A route to lay out: its two endpoints and the waypoints in between (ids in
order, positions by id), plus whether each routed leg adds its own occupancy.
Route start → each waypoint (by id) → end on a ClosedRouter, resolving
waypoint positions through wp_positions. Adds NO geometry (channels were
seeded at build): each leg is routed with ClosedRouter::route_leg.
Occupy a completed route on a ClosedRouter by adding cost to the graph
edges each wire covers (the in-place analogue of the old segment-based occupancy).
Route the fixed start → … → last waypoint portion of an in-progress route.
Identical to the corresponding legs of RouteRequest::route with
SelfCost::Skip. wp_positions must contain every id in wp_ids.
Route one leg, but PREFER a straight axis-aligned segment whenever one is
legal: if a and b share a row or column and the direct wire neither crosses
nor hugs a block, take it — even if the pathfinder could find a lower-cost
detour around existing wires. Legs that are non-colinear, cross a block, or
would hug one (run alongside an edge within the routing gutter) fall back to
ClosedRouter::route_leg, which bows out into the gutter. This keeps a
hand-placed waypoint path literal: a straight run between two waypoints stays
straight.
Append the trailing head leg (fixed.tail → head) to the fixed legs — the only
part that changes as the cursor moves. head is typically not a graph node, so
this leg is the L-path fallback. Together with route_fixed_legs this equals
RouteRequest::route with SelfCost::Skip.