@Joel-Bodenmann Two points: 1. You can decompose the path to get each element and work on those independently. 2. You must contend with lines, polylines, ellipses and Bezier splines. Closes point on a line is simply a vector projection. Bezier splines are more complex. For an approximation you can get polyline approximation to the remainder using parametric equations, then use the same technique for lines. I am writing a book on this subject. By the way, I recall seeing an article on the method you propose.