Confidence is that feeling you get just before you understand the problem

I did it in C#. You stitch everything together, separate bulges from pockets, identify islands and you have an outline. Then you offset those outlines to create a tool path. Everything goes swimmingly until the tool size becomes relatively large to the shapes. Suddenly pockets divide in to sub-pockets, parts of the outline disappear all together, different parts depending on where you start. Outlines completed you hit waste removal