any progress on your code? I'm also writing a 2.5d cam program, and offsets have caused a lot of headaches. From a cursory look at libarea, they seem to be breaking the paths into points, and matching lines and circular arcs to the points?

The approach I've gone with is to approximate the path with biarcs and lines, and offsetting the resulting approximation. This makes things a lot simpler because unlike beziers, biarcs and lines have exact offsets.

The problem lies in eliminating self-intersections of the offset path. Right now I'm doing a brute force thing - find all intersections and eliminate segments based on the normal of the offset path, but clearly this is an O(n^2) operation and not optimal.

I wonder how commercial cam packages do it. I've read things about voronoi diagrams and distance maps, but the math is a bit over my head..

I'm also curious about efficient algorithms for computing path winding direction. I know about the point in polygon method, but what if you don't have a point? The method that comes to mind involves calculating the polygonal area and checking whether it's positive or negative. Is there a more efficient approach?