Hey, I've been working with a GCODE generator for Inkscape, it is called Laserengraver.
Find more about it here:
[
www.keerbot.com]
I've been changing the generator so it allows me to cut with a laser and adds in on/off pulses on line starts and ends etc. The whole thing is, there is a special gcode path generator built in, but it's all in python I believe so you might be able to dig into it's intestines and find out what does what
Hope I'm helping you further. Mind you, this is not for 3D-printing as it doesn't involve height calculations.
http://www.marinusdebeer.nl/