DXF import: Some parts drawn mirrored, colors missing

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

Bug Description

First time i tried to import a DXF file and was surprised at all these problems:

- I drew a simple image in LibreCAD, saved it as DXF

- When imported in Inkscape 0.91, r13797 I found:

  -- some part were drawn mirrored (the original LibreCAD part was
    a block, which was mirrored in the actual drawing. I suspect
    Inkscape is ignoring a mirror instruction in the DXF

  -- A color, which in the original DXF was 'custom' defined as orange,
    was drawn by inkscape as black

  -- The arrows at the dimensions disappeared - replaced by slanted
    lines.

I was worried that maybe LibreCAD was generating errors in the DXF,
so I tried several other viewers (de-caf view, LibreOffice Draw import),
of which I attach screenshots (including the actual Inkscape screenshot
and the DXF file itself)

Tags: dxf importing

Related branches

Revision history for this message
John (john-jcoppens) wrote :
Revision history for this message
John (john-jcoppens) wrote :
Revision history for this message
John (john-jcoppens) wrote :
Revision history for this message
John (john-jcoppens) wrote :
su_v (suv-lp)
tags: added: importing
Revision history for this message
John (john-jcoppens) wrote :

Another issue: When importing DXF drawings with with AutoCAD 'Blocks', these
cannot be 'broken' into elements, either by 'ungrouping' or 'break apart'.

This also seems to mean, that the color of these blocks cannot be changed.
At least, I could not find any way to do it inside Inkscape. I had to change the
color in LibreCAD and then re-import the drawing.

I would suggest it would be useful to be able to break blocks into their
constituents...

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

a proposed fix for the mirror problem has been posted at the address:
https://bugs.launchpad.net/inkscape/+bug/1483807/comments/10
this new code allows for the possibility of mirroring a block as it is imported.

This can be tested by copying the file to the Inkscape\share\extensions\ directory. In Inkscape 0.91 you will also need to copy the new version of the dxf_input.inx file from the repository:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head:/share/extensions/

If testing under Inkscape 0.91 you may detect a slight scaling change due to the fact that the new code uses a default 96 dpi for scale conversions while Inkscape 0.91 uses a default 90 dpi.

<offtopic> with respect to the issue of breaking up blocks into elements, I would suggest that this be done in AutoCAD before saving the file, or in QCad, which supports a menu operation called Block->Explode.
</offtopic>

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

partial fix committed to rev 14312

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

Partial fix confirmed with Inkscape 0.91+devel r14313 on OS X 10.7.5.

Re blocks - AFAICT they are imported as SVG symbol elements. SVG symbols are instanced via <use> elements on-canvas (similar to clones in inkscape), and for editing can either be unlinked per individual instance (use 'Edit > Clone > Unlink'), or edited via Symbols dialog (new in Inkscape 0.91, not documented yet).

Coloring of instanced symbols (clones) depends on how the elements in the symbol definition are styled (similar to element of blocks in AutoCAD IIRC) - if a style attribute in the SVG symbol definition is 'undefined', it can be styled per individual instance, otherwise, the style property is inherited from the symbol definition and cannot be overridden (unless the instance is unlinked and turned into a regular object).

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

Partial fix from trunk r14312 backported to 0.91.x in rev 13834.

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.