Skip to main content

backtracking_ordinals

Function backtracking_ordinals 

Source
pub fn backtracking_ordinals(
    waypoints: &[Waypoint],
    start: GridPoint,
    end: GridPoint,
) -> Vec<PathOrdinal>
Expand description

The corners a backtracking prune drops from the polyline running start → waypoints → end: a 180° kink the wire doubles back on, which strict waypoint routing leaves behind when a corner sits behind its neighbours. Iterative, because dropping one can expose a reversal between its former neighbours; ordinals name the survivors’ original positions, so the preview can route around exactly what the commit would remove. Locks do not protect a corner — a user bend that only makes the wire reverse is still a kink.