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

Bug #657289 reported by su_v on 2010-10-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
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>

su_v (suv-lp) on 2010-10-09
summary: - [dxf import] add support for basic SVG shapes like <rect>
+ [dxf export] add support for basic SVG shapes like <rect>
Alvin Penner (apenner) wrote :

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

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
Alvin Penner (apenner) wrote :

thanks for testing, ~suv, committed to rev 9968

Changed in inkscape:
status: In Progress → Fix Committed
su_v (suv-lp) on 2011-06-17
Changed in inkscape:
milestone: none → 0.49
tags: added: backport-proposed
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) on 2011-09-07
Changed in inkscape:
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

Bug attachments