SVG files from LibreOffice opened in Inkscape export to dxf at incorrect scale.

Bug #1640624 reported by TylerDurden
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

SVG files from LibreOffice opened in Inkscape export to dxf at incorrect scale.

When I open an svg exported from LibreOffice calc in Inkscape, and then save-copy-as dxf, the scale is off by a factor of ~28.22, despite showing the correct scale in Inkscape.

But, when I copy and paste the drawing objects from the LO file (opened in Inkscape) into a new Inkscape document, that exported dxf scale is correct. Similarly, when importing the svg from LO into Inkscape (rather than directly opening) exported dxf objects are the correct scale.

e.g. Using Inkscpae for opening and "exporting" (save a copy as dxf) an LO line object measuring 10 inches results in a dxf measuring 282.2223 inches. Copy and paste the LO svg object opened in Inkscape into a new Inkscape document and an exported dxf object is 10 inches. (Examples attached.)

These files/objects were opened/exported in Inkscape 0.91, (0.91 r13725), win8.1 64bit. They were exported using save-copy-as dxf with inches as the base units and no checkboxes selected. The document default units were set to inches. Similar results obtained using the 32bit version of Inkscape 0.91 r13725 on winXP.

The dxf files were examined in MOI3D, SheetCam, Geomagic Design and Inkscape, with complete consistency (all programs showed the issue).

Zip file attached has a number of files for testing.

Interestingly, the line svg file from LO *Draw* opens and imports into Inkscape a 10" line object at 282.233" (once ungrouped and unclipped ad-nauseum), but a circle from LO opens at correct scale (but exports incorrectly).

Thanks for any insight,
TD

Tags: dxf exporting
Revision history for this message
TylerDurden (8thrule) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

I would suggest using px (not inches) as the base unit when saving a file as dxf. The terminology in this area is unfortunately very confusing, but the default unit in Inkscape is px and should normally be used as a first try.

Using Inkscape 0.92pre1 (Nov 4 2016) I get the following result. (My results will be slightly different from yours because the default resolution has been changed from 90 dpi to 96 dpi.)

- load the file LOCircle.svg, note that the size of the circle is 192px, which is 50.8 mm at a resolution of 96dpi.

- save as dxf using Base unit px, to get the attached dxf file. The size of the dxf image is 5081 mm as expected. The reason for the factor of 100 is due to the viewbox in the svg file. The svg file has a viewbox defined by

width="50.8mm" height="50.8mm" viewBox="7349 8493 5080 5080"

jazzynico (jazzynico)
tags: added: dxf exporting
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.