Skip to main content

orthogonal_path

Function orthogonal_path 

Source
pub fn orthogonal_path(start: Position, end: Position) -> String
Expand description

Subway-style orthogonal routing: exit the source horizontally, turn at the mid-x, run vertically to the target’s row, then enter the target horizontally — with small rounded corners (quadratic turns). Reads as right-angle “subway map” wiring rather than bezier curves.

This is the LOCAL fallback for a single pair of points (drafts, dangling stubs). Real connections are routed as a batch by crate::subway, which also steers around nodes and separates shared corridors.