"cutter" DXF export not including objects

Bug #167768 reported by Bug Importer
4
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Aaron C Spike

Bug Description

I tried the "Desktop Cutting Plotter" DXF export.

I tried viewing it in several viewers and manually
interpreting the file (using AutoDesk's documentation).
It only drew the outline of the canvas - none of the
shapes in the drawing.

I am attaching the DXF file and a test SVG.

Inkscape 0.44 on Mandriva 2006 and Windows XP

Tags: dxf extensions
Revision history for this message
Bug Importer (bug-importer) wrote :
Revision history for this message
Bug Importer (bug-importer) wrote :

Was unable to upload a second file.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://web.resource.org/cc/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"

xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="744.09448819"
   height="1052.3622047"
   id="svg2"
   sodipodi:version="0.32"
   inkscape:version="0.44"
   sodipodi:docbase="C:\Program Files\Inkscape\drawings"
   sodipodi:docname="cutterTest.svg">
  <defs
     id="defs4" />
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     gridtolerance="10000"
     guidetolerance="10"
     objecttolerance="10"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="0.35"
     inkscape:cx="375"
     inkscape:cy="520"
     inkscape:document-units="px"
     inkscape:current-layer="layer1"
     inkscape:window-width="853"
     inkscape:window-height="569"
     inkscape:window-x="154"
     inkscape:window-y="154" />
  <metadata
     id="metadata7">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type

rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1">
    <rect

style="fill:yellow;fill-opacity:0.45061729;stroke:black;stroke-opacity:1"
       id="rect1890"
       width="137.14285"
       height="108.57143"
       x="77.14286"
       y="83.790756" />
    <path
       sodipodi:type="arc"

style="fill:lime;fill-opacity:0.45061729;stroke:black;stroke-opacity:1"
       id="path1892"
       sodipodi:cx="311.42856"
       sodipodi:cy="383.79074"
       sodipodi:rx="151.42857"
       sodipodi:ry="62.857143"
       d="M 462.85713 383.79074 A 151.42857 62.857143 0 1 1
 159.99998,383.79074 A 151.42857 62.857143 0 1 1 462.85713
383.79074 z" />
  </g>
</svg>

Revision history for this message
Aaron C Spike (acspike) wrote :

Originator: NO

This is a known issue. The desktop cutting plotter dxf output extension
requires all objects that are not currently inkscape path objects to be
converted to paths. This is required for text. This is required for
rectangles (which inkscape represents as an svg <rect /> element). And it
is also required for inkscape's ellipse objects. Even though the svg
representation of the ellipse objects is a <path /> it uses the ArcTo path
operator which exactly represents elliptical arcs and the extension is not
able to convert this to a NURB for dxf representation.

There are at least two possible fixes.
1) alter simplepath.py to optionally approximate ArcTo operators with
CurveTo operators. (This will allow processing of many more path/@d
attribute elements, though inexactly.)
2) add special cases in the dxf output extension to output rectangles and
ellipses without converting them to pure <path />s

Note to bug tracker maintainers:
I'd like to change the summary of this but to something like
"simplepath.py doesn't handle ArcTo operators" but I've resisted for the
moment because the poster did not use a sf.net account or leave an email.
Perhaps leaving the summary field will help them to find this answer in the
rare case that they check back in to see the bug status. Perhaps the
summary could be changed after a month to help us better manage the bug and
more easily attract fixes.

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

    This svg can be converted to DXF as follows. First use the menu item Edit | Select All, then use the item Path | Objects to Path, then use the method proposed in Bug 192923 to convert it to DXF.
    The resulting dxf file is attached. It is readable in Voloview Express 2.01. It consists of 4 LINE elements and 4 SPLINE elements, which form a rectangle and an ellipse, respectively.

Revision history for this message
ChrisRS (cstevens) wrote :

     I tried the fix given at http://www.bobcookdev.com/inkscape/inkscape-dxf.html.
This works, but free fore lines circles, etc are converted to phort line segments. COntinuouls polylines and acrs or circles would be better.

Is there someting else I should pursue?

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

could you submit a sample .svg file that you would like to convert?

Revision history for this message
ChrisRS (cstevens) wrote :

Thank you. Sample1.svg is attached. I am using Inscape 4.6 built April 1 2008 (per about Inkscape)

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

thanks for the file, I am attaching the dxf export I obtained.
In order to do this I used the following two menu procedures before performing the export :
- Edit | Select All
- Path | Object to Path
- then export to dxf.
I would recommend doing this on all dxf exports, in case there are any rectangles or text in the drawing.

Revision history for this message
ChrisRS (cstevens) wrote :

Thanks. The output file you sent looks great. I have followed the steps you suggested, (Edit | Select all, Path | Object to path then save as desktop cutting plotter (dxf))

I get a very different DXF file than the one you sent. I have attacehd my SVG file (saved after doing object to path) and the resulting DXF file. (Zipped)

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

- good to hear,
- yes, looking at your dxf file, I can see that this is the original from Inkscape0.46. There have been some changes since then, Bug 192923 and Bug 255157 ,
- if your dxf file is viewable, then these changes probably won't affect you, the changes relate mostly to the issue of making the files viewable by a wider variety of viewers.

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

With respect to the rendering of the elliptical arc, the problem lay in the scaling of the rx and ry (radius) parameters.

This has been fixed in svn rev 20648.
If there is no objection, I am going to mark this as Fix Released.

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