I wrote my own pre-svg builder "iPath" in javascript mainly to replace the d attribute of the svg path element. This allows for more detailed path creation:
var freeForm = new iPath().line(20,30).bezier(20,20, 40,40, 50,50).line(30,30);
You can use it in the svg element, for example:
<path class="clazzz" d="#{freeForm.dPath(3)}"/>
Using the Stani library mentioned in the previous answer and Manfred Moitzi dxfwrite I implemented the dxf exporter for iPath. Use it as:
freeForm.dxf()
some more examples (still working on documentation) on iScriptDesign and experimenting with animation on stretchsketch
dr jerry
source share