Skip to main content

extend

Function extend 

Source
pub fn extend(
    kept: &[Option<(f64, f64)>],
    edges: &[(usize, usize)],
    routes: &[Option<Route>],
) -> Schematic
Expand description

A schematic carried over an edit of what it draws: node i where kept[i] has it, edge k along the route and on the track routes[k] has for it, both in crate::layout::force’s units as octilinear gives them. Nothing kept moves. Each other node goes to the free lattice point nearest the middle of its placed neighbours, off the routes kept; one joined to nothing placed, in a row below the rest. Each other edge is routed as octilinear routes it, around what is drawn, beside an edge kept between the same nodes, and given the nearest free track.