Convert svg 2 dxf

I would like to know where I can find a reliable tool / library for converting svg to dxf. Between formats is also allowed as long as the dxf output is an exact copy of svg. Thus, this means transforming paths (and, in particular, bezier-free curves and arcs). I looked at exporting svg2dxf to inkscape, but at what cutting angles (literally, this is that it draws straight lines between some curved end points). A library should be preferred in java, perl or python since I am most familiar with these languages. I would also like to spend a small amount on a commercial product. I did some searches, but it’s rather strange that most of the records are older than 5 years. I am also interested in the more readable dxf specification, since the autocad published on the website is not very verbose.

Regards, Jeroen.

+6
svg dxf
source share
3 answers

There is a Stani DXF library and batik you can join these two together.

+3
source share

Try Inkscape ; open svg, then use "save copy" to save the dxf file.

+1
source share

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

0
source share

All Articles