Skip to main content

intercept

Function intercept 

Source
pub fn intercept(
    axes: &[AxisInfo],
    from: &[f64],
    va: &[f64],
    target: &[f64],
    vb: &[f64],
) -> Option<(f64, Move)>
Expand description

The shortest time T in which the tool, at from with velocity va, meets a target that is at target now and moves with vb, arriving with its velocity: T, and the move to Q = target + T (vb - va) / 2 that the belt term goes on top of (see the module). Searched by bisection on T, since the move’s limits depend on T; at once where va == vb. None where no T up to 1000 s fits, or the belt term alone breaks an axis’s limits.