Hi Anton,
pleased that it's started to work for you. I played around a bit more after I did that post & found that by choosing the correct tool parameters & deleting a few moves the code started to look quite reasonable.
Jhowelb,
the Margin setting seems to mean tool clearance. Increasing this will give a greater clearance during rapids etc. Back Angle I haven't played with yet, but Max Penetration can have a big effect on the results. I think it is the distance the tool can project into the work before fouling occurs. I find that setting it to something like 10 or 15 (mm) often gets rid of uncut sections.
hope this helps,
Tony