HI All
I have had a cursory look at the problem (still trying to add a cancel button to the collision detector) and I'm afraid I'm not multitasking so I'll look deeper when that's finished.
So what did I find, well the cnctoolkit uses "spline morphing" which is a 3D built in function of Gmax to make the roughing tool paths. This is akin to the lofting function in cad programs. This is the function that makes the tool paths by morphing the stock shape into the work piece shape.
CB doesn't have this function so it has to be made first. This is not a trivial matter.
I cast around for a library to do this and OpenCv has it, But it may be difficult to integrate.
CB uses OpenGL from which a morphing function could be made, and I found a German Uni site where they have done something similar for Images.
This is the site on the page about half way down you can see what I mean.
Look for B spline warping. Images
http://cg.cs.uni-bonn.de/project-pages/imogl/If a library or function could be made from their work (It's Open Source) then you would be More than half way there.
I think this needs to be a collaborative work with at least two or more people working on it to make it happen quickly. There are other ways to get the job done (by slicing the work piece up, rotating 90 deg and applying a profile mop and then remapping the tool paths back to the correct position) This is not truly 4 Axis tool paths
in the strict sense of the meaning. But may be a quick alternative when all else fails!.
Dave