Closed shapes with mix of curves and straights are messed up by DXF exporter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
If I create a closed shape in Inkscape with a mix of curved and straight lines - then SaveAs DXF, the resulting shape contains additional lines that should not be present in the output.
I've attached an example of a file that fails. When you export as DXF (with default settings), you get an additional horizontal line cutting across the "tabs" along the bottom edge of the left-hand shape and the top edge of the right-hand shape. Since I'm using this for laser-cutting, the result is a disaster!
Unchecking the "use LWPOLYLINE type of line output" option (which is checked by default) seems to work around the bug.
I'm not a DXF expert and I'm not familiar with Inkscape internals - but what I *SUSPECT* is happening is this:
* SVG supports both curved lines and straight lines within
the same underlying structure...and it knows when a shape
is "closed" or "open".
* DXF has DIFFERENT underlying structures for splines,
straight lines and collections-
* So the DXF exporter breaks apart SVG shapes into curves and
straight lines and puts them into different DXF structures.
* When "use LWPOLYLINE" is selected, the exporter seems to collect
all of the straight lines into one DXF structure...a polyline.
Otherwise each line goes into a separate DXF object.
* What it SHOULD do is to realize that in breaking up a
single SVG shape into multiple DXF shapes, it has to convert
from a "closed" shape into several "open" shapes.
* It looks like LWPOLYLINE option incorrectly sets the
resulting polyline shape to "closed" - when in fact it's now
"open" because we removed the curves from the original SVG shape.
If my guess is right then this should be an easy fix - but if not, then someone should remove the "use LWPOLYLINE" option until the bug can be properly tracked down and fixed.
Thanks guys! Inkscape rocks! You do a great job.
summary: |
- Closed shapes with mix of curves and straights are messed up + Closed shapes with mix of curves and straights are messed up by DXF + exporter |
Here is the broken DXF file generated by exporting the SVG file that's attached to the bug report with default export options.