Optimization overhaul
Optimization overhaul

Check that prev_tc's final velocity is reachable from the previous and
current segments, so that we never ask for a velocity higher than we can
reach at any time.

Also, bound the segment velocity in the optimizer itself to ensure that
we don't overshoot too much.

Unfortunately, the optimizer and arc blend planner have grown somewhat
organically over the past few weeks, and will need a design review soon.

ikcalB/linuxcnc-mirror,ikcalB/linuxcnc-mirror,bmwiedemann/linuxcnc-mirror,bmwiedemann/linuxcnc-mirror,bmwiedemann/linuxcnc-mirror,ikcalB/linuxcnc-mirror,ikcalB/linuxcnc-mirror,ikcalB/linuxcnc-mirror,ikcalB/linuxcnc-mirror,bmwiedemann/linuxcnc-mirror,ikcalB/linuxcnc-mirror,bmwiedemann/linuxcnc-mirror,bmwiedemann/linuxcnc-mirror,bmwiedemann/linuxcnc-mirror