Skip to main content

reroute

Function reroute 

Source
pub fn reroute(
    indexed: &IndexedDocument<'_>,
    route: RouteId,
    solved: &[(RouteId, Vec<Waypoint>)],
    builder: &mut CommitBuilder,
)
Expand description

Inventory row “Reroute Wire / Block”: drop the user’s corners on route and let the router solve afresh. Under the log the clear and the re-promotion are one write of the solved list; a route the solver left out is the bare clear.

One wire per call, deliberately: the block-wide form is Drawing::reroute_block, which picks the wires drawn on the level being viewed and calls this for each. Deliberately not every wire ending on the block: those drawn a level down have nothing re-laying them, so a document-wide rule would disagree with what the user is looking at.