[dxf export] add support for basic SVG shapes like <rect>

Bug #657289 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Wishlist
Alvin Penner

Bug Description

Follow-up report to Bug #656899 “DXF import/export empty”
<https://bugs.launchpad.net/inkscape/+bug/656899>

It seems that DXF export fails to support the rectangle shapes because Inkscape doesn't add the (redundant) 'd' path attribute like it does for the other parametrized shapes - the 'd' attribute is not needed because Inkscape uses the basic SVG shape for rectangles [1]. DXF export should not require rectangles to be converted to paths before export and instead directly parse the <rect> object.

Inkscape rectangle:

    <rect
       style="fill:#ff8080;fill-opacity:0.85098039;stroke:#000000;stroke-width:2;stroke-opacity:1"
       id="rect15890"
       width="130"
       height="90"
       x="20"
       y="20" />

Example from the SVG spec:

  <rect x="400" y="100" width="400" height="200"
        fill="yellow" stroke="navy" stroke-width="10" />

[1] <http://www.w3.org/TR/SVG11/shapes.html#RectElement>

Tags: dxf exporting
su_v (suv-lp)
summary: - [dxf import] add support for basic SVG shapes like <rect>
+ [dxf export] add support for basic SVG shapes like <rect>
Revision history for this message
Alvin Penner (apenner) wrote :

attached is a modified version of the file dxf_outlines.py, which will support the <rect> element.

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

Tested and confirmed with Inkscape 0.48+devel r9966 + the attached 'dxf_outlines.py' and QCad v2.0.5.0 (Community Edition), as well as reimported the DXF files into Inkscape.

Transformed (rotated, skewed) rectangles seem exported correctly.

Thx, Alvin :)

Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
status: New → In Progress
Revision history for this message
Alvin Penner (apenner) wrote :

thanks for testing, ~suv, committed to rev 9968

Changed in inkscape:
status: In Progress → Fix Committed
su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.49
tags: added: backport-proposed
Revision history for this message
jazzynico (jazzynico) wrote :

Backported to the branch, revision 9812.

Changed in inkscape:
milestone: 0.49 → 0.48.2
tags: removed: backport-proposed
Ted Gould (ted)
Changed in inkscape:
status: Fix Committed → Fix Released
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.