SVG basic shape <line> not supported in DXF export

Bug #1474347 reported by Derei on 2015-07-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Wishlist
Alvin Penner

Bug Description

I tried to export a SVG to DXF in order to import it in SketchUp (i needed the lines, or outline, or whatever it would provide). But upon import in SU, nothing was imported. I tried to view the contents with this Autodesk viewer https://360.autodesk.com/viewer , it said there is nothing yo display.

So, from my point of view, DXF export is faulty. Should be checked what's wrong.

OS: Windows 7 Pro x64 (OEM)
Inkscape version: 0.91
I tried to import in SU2015 (but also the autodesk online viewer failed to show me anything - it can show only lines, if drawing has no faces, should at least show edges)

I could successfully import it in Blender, but again, the COLLADA/OBJ export from blender wasn't readable by any software...

Attached archive with both SVG and DXF file.

Thank you.

Related branches

Derei (derei.uk) wrote :
su_v (suv-lp) wrote :

Please add information about OS/platform and Inkscape version to the bug description, thank you.

Changed in inkscape:
status: New → Incomplete
Derei (derei.uk) on 2015-07-14
description: updated
su_v (suv-lp) on 2015-07-14
Changed in inkscape:
status: Incomplete → New
Alvin Penner (apenner) wrote :

unfortunately the svg file you are working with contains the svg entity 'line', which the dxf export routine does not currently recognize. The dxf output will use only the two tag types 'path' and 'rect'. However your file can be converted. Using Inkscape 0.91, I selected the object, and chose the menu item Path->Object to Path. Then export to dxf to get the attached dxf file, which appears to be okay.

Derei (derei.uk) wrote :

Thank you. Much appreciated solution. Indeed it works perfectly.
Still one small issue: after I do Object to Path, If I want to export it as outline, I will have to do Stroke to Path. But then I will get some extra nodes. This is not an issue, but would be nice to know a cleaning method (simplify will mess with the shapes). Something to remove the collinear nodes that are not needed (those who don't do junctions or corners).

Alvin Penner (apenner) wrote :

hi,
    just offhand, I am not sure if there is any good way of reversing the effects of the Object to Path operation. I think what I would recommend is not to save the svg file after you have performed this operation. In other words, do the Object to path, then do the dxf export and then exit without saving the svg file.

Alvin Penner (apenner) wrote :

actually I may have misunderstood what you said about Stroke to Path, can you provide an example, perhaps with a before and after picture,

su_v (suv-lp) wrote :

AFAICT the question from comment #4 is unrelated to the current report (can we close it BTW? - basic SVG shapes like for example <line> elements in Inkscape in general are only supported for rendering - Inkscape does not create such elements, nor can they be node-edited without converting to path first - this is tracked in older reports already) about the nodes of the stroke caps when converting stroke to path (the <line> elements use square caps for the stroke, which result in an "extra" node in the outlined stroke where the outlined cap joins the outline line segment itself).

Thank you very much. Yes, we could consider this post closed.

On Thu, Jul 16, 2015 at 8:19 AM, ~suv <email address hidden> wrote:

> AFAICT the question from comment #4 is unrelated to the current report
> (can we close it BTW? - basic SVG shapes like for example <line>
> elements in Inkscape in general are only supported for rendering -
> Inkscape does not create such elements, nor can they be node-edited
> without converting to path first - this is tracked in older reports
> already) about the nodes of the stroke caps when converting stroke to
> path (the <line> elements use square caps for the stroke, which result
> in an "extra" node in the outlined stroke where the outlined cap joins
> the outline line segment itself).
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1474347
>
> Title:
> DXF Export - Can't see the content graphics
>
> Status in Inkscape:
> New
>
> Bug description:
> I tried to export a SVG to DXF in order to import it in SketchUp (i
> needed the lines, or outline, or whatever it would provide). But upon
> import in SU, nothing was imported. I tried to view the contents with
> this Autodesk viewer https://360.autodesk.com/viewer , it said there
> is nothing yo display.
>
> So, from my point of view, DXF export is faulty. Should be checked
> what's wrong.
>
> OS: Windows 7 Pro x64 (OEM)
> Inkscape version: 0.91
> I tried to import in SU2015 (but also the autodesk online viewer failed
> to show me anything - it can show only lines, if drawing has no faces,
> should at least show edges)
>
> I could successfully import it in Blender, but again, the COLLADA/OBJ
> export from blender wasn't readable by any software...
>
>
> Attached archive with both SVG and DXF file.
>
> Thank you.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/1474347/+subscriptions
>

fix committed to rev 14338

This implements support for the line element. This code can be tested by copying the files dxf_outlines.py and dxf_outlines.inx to the Inkscape\share\extensions\ directory. The 2 files can be downloaded 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.

Changed in inkscape:
status: New → Fix Committed
assignee: nobody → Alvin Penner (apenner)
su_v (suv-lp) on 2015-09-01
summary: - DXF Export - Can't see the content graphics
+ SVG basic shape <line> not supported in DXF export
Changed in inkscape:
importance: Undecided → Wishlist
milestone: none → 0.92
su_v (suv-lp) wrote :

The fix in r14338 for <line> support was backported to 0.91.x in rev 13810 (along with the other changes for bug #1489320).

Changed in inkscape:
milestone: 0.92 → 0.91.1
jazzynico (jazzynico) on 2017-01-28
Changed in inkscape:
milestone: 0.91.1 → 0.92
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers