Scaling on DXF export

Bug #1480414 reported by Mähnß, Jürgen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

On exporting DXF (save copy as) the scaling is not correct. The wrong scaling depends on the computer used: different computer with same os and inscape version gives different scaling.
I use Inscape 0.91 on both win7pro and win8.1pro.
testfiles attached: rect.svg, rect.dxf

Tags: dxf exporting
Revision history for this message
Mähnß, Jürgen (juergen-maehnss) wrote :
Revision history for this message
su_v (suv-lp) wrote :

On 2015-07-31 19:56 (+0200), Mähnß, Jürgen wrote:
> The wrong scaling depends on the computer used: different computer
> with same os and inscape version gives different scaling.

Please provide details about the DXF export settings used on each computer (e.g. base units), and attach the DXF file exported on either system.

Which software was used to verify / measure the dimensions of the exported rectangle?

Changed in inkscape:
status: New → Incomplete
Revision history for this message
Mähnß, Jürgen (juergen-maehnss) wrote :

Sorry for a wrong explanation: Testing the same svg on different systems gives the same scaling. Nevertheless the box of 100mm*20mm in my svg exports to 19,75mm*99,75mm. Verified with babacad (http://www.babacad.com/index.html). I tried with different contour thicknesses but that has no effect. The offset of 0,25mm stays the same.
Document units: mm
Export units: mm
Setting both units the same (mm, px, pt, ...) gives the same failure. Mixed settings lead to scalings as expected.

su_v (suv-lp)
Changed in inkscape:
status: Incomplete → New
Revision history for this message
Alvin Penner (apenner) wrote :

The discrepancy is due to the fact that Inkscape presents two different types of reports, one of which is a visual box which includes the effect of stroke width, and one is a geometric box which does not include stroke width. In your case, if you hit the Select tool, F1, the size will be reported as 100 x 20 mm, which is the visual size. If you hit the rectangle tool , F4, the size will be reported as 99.746 x 19.746 mm. This is the geometric size, which is what the dxf file will see. The difference is the stroke width, which is .254 mm, which can be seen in the Fill & Stroke dialog, under Stroke Style.

Revision history for this message
su_v (suv-lp) wrote :

On 2015-08-01 13:21 (+0200), Alvin Penner wrote:
> Inkscape presents two different types of reports, one of which is a
> visual box which includes the effect of stroke width, and one is a
> geometric box which does not include stroke width.

@Jürgen - for more information about the two bounding box modes in Inkscape, see also:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Transforms.html#BoundingBox

Proposing to close the report - AFAIU it is more a question about general usage (neither limited to nor directly related to DXF export): the width and height fields in the select tool controls bar refer to the dimensions of bounding box of the current selection (can be one or more objects), based on current bounding box mode (default: visual). The shape and path tools otoh operate on the selected object's geometry). Inkscape's distinct bounding box modes are “a feature, not a bug”.

Revision history for this message
Mähnß, Jürgen (juergen-maehnss) wrote :

Thanks for that hint. I tried and now the scaling with one rectangular is perfect. When I tried to export a more complicated file I could find an unexpected behavior again. So I tried to simplify an found the same behavior, when I export simply two rectangulars. You find the files below.

I found a second strange behavior (may be I don't really understand the concept of Inkscape): When I select both rects with the mouse it tells me that there are two objects. On selection by "<ctrl> a" there are suddenly 3 objects reported. Why?

Export: I selected nothing and just asked to copy as dxf.
Two dxf viewers report the height of the rects as 564.44.

Win7pro32
Inkscape 0.91
Dimensions both mm
DXF viewers:
Babacad (http://www.babacad.com/index.html)
Brava! (http://www.bravaviewer.com/free-dwg-viewer): English units have to be selected

Revision history for this message
Mähnß, Jürgen (juergen-maehnss) wrote :

The export seems to depend on the document size: When I rescale the Page size as fitting to the object (leaving 10 mm space around) as well the single rect height is reported as 564.44.

Revision history for this message
Mähnß, Jürgen (juergen-maehnss) wrote :

Completely confused: Noe nothing is as before: Even without rescaling of page wrong dimensions. Sorry for this mess. I try to find out the reason behind. May be the viewers change something which I can't see. I will come back later with more precise analysis.

Revision history for this message
Mähnß, Jürgen (juergen-maehnss) wrote :

OK, there seems to be an error in my files:
When I export dxf from an original inkscape created file it works perfect.
The error occurs when I use Libre office: I create the same rectangular. Export to svg. Open in svg. Set document dimensions to mm (not needed, just for comparison of both files). Export to dxf. Now the former 20mm height exports to 564mm. There must be a confusing part in the svg exported from LO which leads to this strange behaviour.

Environment used:
Win7pro32, win8.1enterprise64
Inkscape0.91
LibreOffice4.4.4
Babacad, Brava! Free DWG Viewer

Attached: zip archive dxf-export-3.zip containing
Inkscape rect and export: rect1-ink.*
Draw rect, exported svg and dxf: rect1-draw.*

Revision history for this message
Mähnß, Jürgen (juergen-maehnss) wrote :

Two questions:
1 What can I do with the exported File from LO (see #9) to bring it into good shape? I will report this then as well to the LO team as a bugfix.
2 Do you have an explanation to the starnge selection behaviour described in #6?

Revision history for this message
su_v (suv-lp) wrote :

Closing (see comments - original report is a question about usage (different bbox modes in Inkscape are a feature, not a bug).

The remaining follow-up questions about other usage details and about compatibility with third-party SVG files (e.g. generated by LO) might get answered as time and availability of bug team members permits.

Changed in inkscape:
status: New → Invalid
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.