Incorrect convert DXF to SVG.

Bug #1168498 reported by TrotsAS
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

Hello. There is a problem to save the file DXF to SVG. The resulting file SVG is opened correctly in only Opera. In other browsers there is only a blank sheet. Incscape opens the file normally. I send you the files DXF and SVG.
(Inkscape 0.48.4 r9939, Windows 7 Professional SP1)

Tags: dxf importing
Revision history for this message
TrotsAS (trotsenko93) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

I am unable to extract the 7z file above. When I try to extract it, I get messages saying "unsupported compression method"

Could you attach the original dxf and svg files?

Revision history for this message
su_v (suv-lp) wrote :
tags: added: dxf importing
Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

thanks for the files, ~suv

There appears to be a scaling problem of some sort, and possibly a clipping problem, related to the use of the 'use' command and the 'xlink:href' references. I was not able to get reasonable results using the automatic scaling feature of the dxf import. In one case it also appeared that IE8 had actually clipped off about a third of the image, I don't know why.

The best I was able to do is the attached svg file, which views correctly in IE8 and IE9. This was done using recent trunk version, with manual scaling, and scale factor = 2, y-origin = -100 mm. The latest version of the import code can be obtained by downloading the files dxf_input.py and dxf_input.inx from the site:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head:/share/extensions/
and saving them in the directory \Inkscape\share\extensions\

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Alvin Penner (apenner) wrote :

sorry, I misspoke myself. The failure of the automatic scaling formula is not related in any way to the use of xlink:href or the 'use' elements. Automatic scaling is determined exclusively just by EXTMIN and EXTMAX which in this case are -0.5 and 5.0, which leads to very large scaleup of the drawing.

keeping this open to deal specifically just with the automatic scaling issue, cannot deal with any differences that may exist between different browsers, Inkscape versus IE9 versus Opera.

Revision history for this message
Alvin Penner (apenner) wrote :

@TrotsAS - could you indicate what software was used to make this drawing?

From the version number, AC1021, I see that it is quite recent. probably AutoCAD 2007.
However, I cannot determine what the size of the drawing is. According to the variable INSUNITS, the drawing units are in mm, as is normal. When I load it into QCAD, I see that the size of the object is about 75 mm by 30 mm.

However, when I interrogate it in QCAD, using Edit->Current Drawing Preferences, it says that Paper Size is 5.5 by 5.5 mm. These two numbers are consistent with the variables EXTMIN and EXTMAX, which are currently being used to do the automatic scaling of the drawing size. However these numbers are not consistent with the above drawing size of 75 by 30 mm. The only way to resolve the discrepancy would be if the 5.5 by 5.5 Paper Size was meant to be in inches or something like that; however, I have not been able to find any indication in the file that this is the case.

Any information on the source of the drawing, or the drawing size, would be helpful, otherwise I do not think it will be possible to resolve this issue.

Changed in inkscape:
status: Confirmed → Incomplete
Revision history for this message
TrotsAS (trotsenko93) wrote :

I understood that the problem is in the size of the drawing. I make this in UGS NX 7.5 x64. Indeed, the height and length of 5.5. NX also it shows in different drawings. Everywhere 5.5. Strange.

Revision history for this message
Alvin Penner (apenner) wrote :

most software will support the idea of specifying the page size somewhere. You may need to go into a menu item like Edit or File and look for Drawing Preferences. If that does not work, then you will need to use manual scaling, as I did.
Can you indicate whether the manually scaled dxf import attached above is rendering correctly in IE8 or whatever browser you are using?

Revision history for this message
TrotsAS (trotsenko93) wrote :

Attached above test.svg opened correctly in IE8, Opera, Chrome and FireFox.

Revision history for this message
Alvin Penner (apenner) wrote :

glad to hear it. If there is no objection, I am going to close this bug report. The purpose of the report was to see if the automatic scaling feature could be improved to deal with the attached dxf file. Since there does not appear to be enough info in the dxf file to do automatic scaling, I do not think this issue can be resolved.

Please feel free to reopen the report if you do not agree with this conclusion.

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