scale when saving as .dxf

Asked by Karen Simmons

My drawing is done in inches, with both document preferences set to inches. When I save it as a .dxf, other programs read it much larger (25.4 x larger). can someone tell me what I am doing wrong?
I work on a mac, but I have access to a PC and downloaded the uniconverter to that and attempted to do my saving to .dxf (I also tried .hpgl) from there, but that is not working either.
The drawing is of a large pattern, and needs to be read accurately by a the manufacturers plotting program.
Thank you for your help.
Karen

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
su_v (suv-lp) said :
#1

You did save it as 'Desktop Cutting Plotter (R13) (*.dxf)'? If I remember correctly, in earlier tests I did this file type did keep the proper dimensions (verified with QCad, DraftSight and the SolidWorks eDrawings viewer), at least when using metric units in Inkscape (document page size, document default units).

Note: I'm asked about which file type you used because there's a second output extensions available - 'AutoCAD DXF (R12) (*.dxf)' - if Inkscape does find 'pstoedit' installed on your system, e.g. via MacPorts. This output format does rely on pstoedit to handle the units (or scale) of the DXF file, which takes a PostScript file generated on-the-fly by Inkscape as input. Possibly during this tool-chain the units as specified in Inkscape get lost or are interpreted differently. If you choose this file type when saving a copy in Inkscape, you could edit the shell script file which is called by the extension to execute pstoedit, and adjust the arguments for pstoedit if possible. Or save a copy as PostScript in Inkscape, and test the conversion to DXF with pstoedit yourself in the terminal, outside of Inkscape.

Revision history for this message
su_v (suv-lp) said :
#2

Ah, now I see that in Inkscape 0.48.1, the output extension 'Desktop Cutting Plotter (R13) (*.dxf)' has this note on the 'Help' tab:
- (…)
- assume dxf drawing is in mm.
- (…)

In the current development branch this was changed to allow to choose a unit for DXF output [1]. You might test with a recent development build downloaded from <http://inkscape.modevia.com/macosx-snap/?C=M;O=D> (you can keep the stable version 0.48.1 installed, and just drop the development version into a different folder, maybe rename the application there to e.g. 'Inkscape-devel' to not confuse it with the stable version) if you get better results and units are correctly transferred from the SVG file to the DXF file.

[1] <http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/9984#share/extensions/dxf_outlines.inx>

Revision history for this message
Karen Simmons (karenkhs) said :
#3

I did save with desktop cutting plotter (R13). It is the only .dxf option that is available to me with the drop down save as menu. I have tried switching the document environment to mm but that doesn't change the result...
When I use an old autosketch program on the PC to open the .dxf, it asks me if I want to open with the default (mm) and apply the conversion of 25.4:1. I select that default and the drawing is read accurately by autosketch, but when I save it as .skf and send it to my manufacturer, it is still oversized...

Revision history for this message
Karen Simmons (karenkhs) said :
#4

I'll try that. Thank you, I'll let you know but it might take me a minute.

Revision history for this message
Karen Simmons (karenkhs) said :
#5

I'll try that. Thank you, I'll let you know but it might take me a minute.

Revision history for this message
Karen Simmons (karenkhs) said :
#6

I think that worked! I won't be certain until I get to his plotter program, but it worked when read in autosketch, so I think that was the solution!Thank you
Karen

Revision history for this message
Karen Simmons (karenkhs) said :
#7

I am still struggling with Question #154558 which I thought was resolved when I downloaded the last development inkscape, but the drawing is still coming in wrong. I think my manufacturers software needs the R12 version .dxf, but though I see mentions of R12 in FAQ's I don't see a means of saving to that version. Is there?
The manufacturer thinks that though I built my model in inches, that the inches are being read by his program as mm . Is that possible?
Thank you

Revision history for this message
su_v (suv-lp) said :
#8

> I think my manufacturers software needs the R12 version .dxf,
> but though I see mentions of R12 in FAQ's I don't see a means
> of saving to that version. Is there?

To save a copy as DXF (R12), you need to have pstoedit [1] installed (available via MacPorts [2]), but I am not certain it would address the units question properly (a PostScript file is used as intermediary step for the conversion, and the command-line options for pstoedit could be adjusted in the shell script called by Inkscape when saving a copy as "AutoCAD DXF (R12) (*.dxf)" file.)

On the other hand, once you have pstoedit installed, you can test easily by saving a copy as PostScript in Inkscape, and then use pstoedit in the terminal to convert the PostScript file to DXF (R12) testing the various options as described in the pstoedit manual [3].

Another alternative would possibly be to use QCad (the free community version [4]) and save the DXF (R13) as R12 version in QCad.

[1] <http://www.pstoedit.net/pstoedit>
[2] <http://www.macports.org/>
[3] <http://www.helga-glunz.homepage.t-online.de/pstoedit/pstoedit.htm#section_49>
[4] <http://www.ribbonsoft.com/qcad.html>
   prebuilt packages of the community edition for OS X:
   Qt3: <http://hans.fugal.net/blog/2008/03/26/qcad-on-leopard/>
   Qt4: <http://sourceforge.net/projects/librecad/>

Revision history for this message
Alvin Penner (apenner) said :
#9

Hi,

two replies:
>> When I save it as a .dxf, other programs read it much larger (25.4 x larger). can someone tell me what I am doing wrong?

yes, this would be the default behaviour for the Desktop Cutting Plotter output. The dxf output assumes that the Inkscape drawing is in pixels at 90 dpi. And it converts to mm in the dxf file. (This is the old behaviour, before the choice of units was available.) This means that on dxf output all the numbers are multiplied by a factor of 25.4/90. (However, if you had set your Inkscape screen to read inches, then the dxf file numbers would be 25.4 times higher than your screen coordinates.)

around December 27, 2010, a new option was added to allow choice of output units. The output dialog will show 3 questions, one for RoboMaster, one for LWPOLYLINE, and one for Units. If you choose mm as output units, then you'll get the same behaviour as above. If you choose 'px' as units then the numerical value of the dxf output file coordinates will be the same as the svg file. (That's not precisely true, the y axis will be upside down, but the numerical distances in the dxf file will be the same as the svg file)

Revision history for this message
Alvin Penner (apenner) said :
#10

just 2 more random thoughts:
- the Desktop Cutting Plotter dxf output doesn't use uniconvertor
- the default units for a hpgl file are 1/40 of a mm, roughly one-thousandth of an inch, for reasons that have probably long been forgotten, I assume that at some point people thought that no plotter would ever be able to plot more precisely than that.

Revision history for this message
Karen Simmons (karenkhs) said :
#11

Thank you both, Alvin and Suv,
I downloaded qcad so that I could save as R12. I don't actually know if that is the problem, but it was a hypothesis, so I tried it. The pstoedit option is above my skill level, I think...
Thank you for the analysis of the units. I had downloaded the last development inkscape, with the unit option, but of course chose inches and mm instead of pixels: I can only try this for sure when I get back to the manufacturers software, but in Qcad it seems to work to select px and read in mm.
Can you tell me what the Robomaster and LWPOLYLINE options are? Should I deselect them?
Also, because we were having trouble I got rid of the layer with notes on it because his software was turning the notes into a series of separate shapes. I did download a program called "better dxf" to try to fix that: Do you know anything about it?
Thank you
Karen

Revision history for this message
Alvin Penner (apenner) said :
#12

- with respect to the difference between R12 and R13, it is not likely that this will affect the scaling of the drawing. Most likely what will happen is that some objects will be missing entirely if the Release number is not appropriate for your software.
- I would not use the RoboMaster option unless you are using RoboMaster, this is a customized spline that may not be readable by other software.
- I would use the LWPOLYLINE option unless your software refuses to draw these elements. This is a Release 13 feature. It allows polylines to be rendered as a single object so they can be edited without breaking apart.
- with respect to 'better dxf', if I remember correctly I believe this is aimed specifically at CNC machines, so if you're using one you may want to investigate this. CNC machines sometimes have the property of not accepting splines at all, but requiring that they instead be converted to multilines where each segment has very short length.

Revision history for this message
Karen Simmons (karenkhs) said :
#13

Thank you! That really helps: I did not realize that these were program differences. I really appreciate your help

Can you help with this problem?

Provide an answer of your own, or ask Karen Simmons for more information if necessary.

To post a message you must log in.