I can't answer whether Cut3d will do exactly what you're asking, but you can download a trial version good for 30 days. It won't output any code other than for their tutorial parts, but you could see if the desired functionality is in it and I suppose you could simulate the cuts.