Move sphere along polyline

Since it is very easy to find closest point on a line and we want to allow some picking tolerance, we found that a fast and robust solution is to transform all the lines to display coordinates and find the closest line segment there: