dxf export

Post questions on how to use or achieve an effect in Inkscape.
m 8urt0n
Posts: 4
Joined: Fri May 02, 2014 12:42 am

dxf export

Postby m 8urt0n » Fri May 02, 2014 1:02 am

Why when I draw a circle (or other shapes and/or lines), then save as dxf, does it not preserve the original format. My example to this is if I draw a circle, then save as dxf, when I open in my CAD I have 4 splines instead of a circle. Also my only options are old dxf formats i.e. R12 which is even worse because this only seems to save as straight line segments, and R14 which is what I have the above issue with. Is there any plan to improve the dxf export function and/or am I doing something wrong? I am using inkscape for design of items that I am cutting out with a cnc plasma and sometimes need to modify/add/change things in cad prior to cutting. This is necessary to get exact dimensions. (0.000 accuracy)

Any input is greatly appreciated.
Attachments
circle.png
circle.png (4.19 KiB) Viewed 4684 times
circle.svg
(1.85 KiB) Downloaded 185 times

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: dxf export

Postby tylerdurden » Fri May 02, 2014 3:53 am

I don't think Inkscape offers other options at the moment.

When you revise in CAD, your cad program may provide inference lines from the spline control points, to locate the center of a new circle that you might use to replace the splines.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

m 8urt0n
Posts: 4
Joined: Fri May 02, 2014 12:42 am

Re: dxf export

Postby m 8urt0n » Fri May 02, 2014 4:55 am

Does anyone know if there are plans to improve the DXF output? Or is there someone willing to write new code for a donation?

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: dxf export

Postby ragstian » Fri May 02, 2014 11:46 pm

Hi

Have a look at this blog; Will's Blog

As this is a shell script made for the *NIX (Linux, Mac, Unix) world it would have to be converted to a batch file for use on Windows systems.

In essence the script is doing three things;

    First it uses Inkscape in command line mode to make a encapsulated postscript file (eps)
    Second it uses the pstoedit' program to convert the eps file to dxf.
    Third it deletes the eps file.

These steps can be done manually as well.
For your circle.svg file;
    1. Save as Circle.eps (in Inkscape)
    2. Run the following command from a 'Dos window'; pstoedit -dt -f dxf:-polyaslines dxf:-mm circle.eps circle.dxf >log.txt
    3. Optional; del circle.eps
The result in zipped format (as the forum does not accept dxf files.);
circle.zip
(1.08 KiB) Downloaded 200 times


Chime back if more help is needed.

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

m 8urt0n
Posts: 4
Joined: Fri May 02, 2014 12:42 am

Re: dxf export

Postby m 8urt0n » Sat May 03, 2014 5:55 am

Thanks for looking into this with me. Your file is almost exactly the same as if you save as R12 dxf. It appears to be many short straight lines. Also I am using linux and i believe that pstoedit is what inkscape is using to be compatable with different file types.

Thanks again,

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: dxf export

Postby Lazur » Sat May 03, 2014 6:59 am

Hi.

Didn't try that myself as I'm not using a cad program to see if the dxf is right, but blender has an option to export to dxf format too.
You can import svg-s by default and export to dxf as described here:
http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/DXF_Exporter

Might worth a try.

m 8urt0n
Posts: 4
Joined: Fri May 02, 2014 12:42 am

Re: dxf export

Postby m 8urt0n » Mon May 05, 2014 6:05 am

This is a quote from an e-mail I sent to the lead dev of pstoedit:

Hi,

not easily. pstoedit currently retrieves quite low level primitives from ghostscript and by the "high level" information about what constitutes a circle is lost.
There are two approaches that come to my mind:
a) pstoedit could try to rebuild circles out of the lower level primitives. Or
b) pstoedit would need to retrieve higher level primitives like "arc" and "arcto" from ghostscript.

Another problem then is what to do with circles which are transformed by a transformation matrix, e.g. look like ellipsis or even rotated ellipsis. Can DXF handle those? I think not.

BR
Wolfgang


Return to “Help with using Inkscape”