Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

Export DXF with spline for Inkscape

Anonymous
11,673 Views
15 Replies
Message 1 of 16

Export DXF with spline for Inkscape

Anonymous
Not applicable

Hi,

I've been using a lot of ugly workarounds to avoid using splines since I've never been able to get them to play nice in inkscape. 

 

Situation:

I use Fusion360 to design all sorts of things to lasercut. Once I've designed something, I export everything in 2D (export sketch to DXF) and re-import it into inkscape to use in the laser cutter. This works perfectly for everything besides splines and I've been using circles and ellipses as a workaround but this just isn't cutting it (pun intended) anymore for me 🙂

 

Testfile:

My testfile is a simple square 50mm * 100mm with a spline running from one corner to the other (to make sure i can double check the size of the conversion alongside the actual spline). I've included my test.dxf file in attachment

 

My attempts:

I've googled this a lot an tried all of the accepted solutions for other people but they just don't seem to work for me (both on windows and on mac OS).

  •  I've tried plain inkscape open & import. No splines
  •  I've tried online converters dxf - svg. Only a couple work for splines but those mess up the size of the image. so they're out
  •  I've tried Kabeja... same result: a square without a spline
  •  I've tried the plugin "DXF spline to polyline" but that one doesn't work out of the box (i need an active sketch when it's allready active....) so I resorted to the github version that should work ... but that also results into nothing in inkscape.

I did get a little bit of success using the plugin when I do the following:

  •  export as dxf with splines as polyline. (this exported file does nothing for the spline in inkscape)
  •  import that dxf BACK into fusion360
  •  export that freshly imported dxf back out 
  •  importing that last exported dxf does contain the polyline!

 

My plea for help:

I'd really love to get this working so after a few months of trying and failing I'm hopping on the forum here hoping someone can tell me what I'm overlooking 🙂 Right now I've fallen back to the plugin method but that's a cumbersome approach as you can tell.

2 Likes
Accepted solutions (1)
11,674 Views
15 Replies
Replies (15)
Message 2 of 16

HughesTooling
Consultant
Consultant

How did you make the DXF file attached. When I import your file into Rhino3d I don't see the spline but if I make a new sketch in Fusion with a spline created in Fusion I can export as a DXF and open in Rhino OK. Is your DXF a projection from a face or the original sketch with a spline.

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes
Message 3 of 16

Anonymous
Not applicable
Hi,
I simply opened an empty fusion360 design (what you get when opening fusion360). Next I pressed add sketch in the toolbar, selected a plane and simply added a 2-point rectangle. Next a random spline I drew from left bottom to top right. Clicking the green check when done.

And then right click on the sketch and save as dxf

So no projections or anything. Just a simple sketch with a spline
0 Likes
Message 4 of 16

Anonymous
Not applicable

I've just done another minor test with some success.

I've uploaded that dxf file to the website convertio and converted it to svg. 

When I open that in inkscape i get the square with the spline inside (great) but as mentioned, the size is off by a given %. I've pinpointed that to 282,662%

 

I then basically scaled the svg up by that percentage and that seems to be fine. But still, not an elegant solution 🙂

0 Likes
Message 5 of 16

HughesTooling
Consultant
Consultant

Have you made any request to inkscape to fix their importer? As the file can be opened by Rhino, Fusion and I'd guess AutoCAD I'm not sure you stand much chance of getting a fix for something that's not really broken.

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes
Message 6 of 16

Anonymous
Not applicable

Hi,

 

I know. I'm more or less looking for the optimal way to do this instead of these workaround.

As for the inkscape importer, I don't know the specifics but the way I understood it, the spline used in fusion (and it's dxf file) is of type x (let's just say 5 for this example, I forgot the exact level/type). While the one inkscape uses is a simpler type (let's say 3). So inkscape just cannot read that spline without dumbing it down to it's level. This has been raised a lot in my quest for finding the proper way 🙂 don't shoot me on this explanation 😉

 

I have tried QCAD and yes, this works, just sadly only in the trail, not the free community edition.

 

But like you said, it ain't broken. I'm just looking for a better way of doing things 🙂

Many thanks for your help so far!

0 Likes
Message 7 of 16

HughesTooling
Consultant
Consultant

Found a thread in the API section where @ekinsb said he's investigating a SVG export add-in, it was a year ago so don't know if anything came of it.

 

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/export-to-svg-format/m-p/6700273#M2508

 

Also found an addin for SVG but only lines and arcs at the moment here.

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes
Message 8 of 16

Anonymous
Not applicable

Thanks for the assistance! I'm still looking at the best way.

I probably will create a new script/add-in to mass-export all sketches in the current component to a single directory

And maybe one for inkscape to import all of them 🙂

 

When / if i do, i'll be sure to mention it here !

0 Likes
Message 9 of 16

Anonymous
Not applicable

Just figured out that the API currently doesn't support saving a sketch as dxf. so that's a dead end 😞

It was the last piece missing in my code since I had a way of getting all selected sketches + a valid folder. just the final save as 😞

0 Likes
Message 10 of 16

Anonymous
Not applicable

Oh wait, I woke up at night remembering the dxf spline to polyline adding ... which does save as dxf ! So it is possible!

Back on the job!

0 Likes
Message 11 of 16

Anonymous
Not applicable
Accepted solution

I've created a "mass DXF export" addin for fusion 360. You can find it here: Fusion360-DXFexporter

1 Like
Message 12 of 16

spa8inf
Community Visitor
Community Visitor

So the mass dxf export add-in doesn't fix the spline to polyline problem?

0 Likes
Message 13 of 16

Anonymous
Not applicable

Correct, it doesn't fix the spline issue only offers a handy way to export lots of dxf's at once. This converter does work but messes with the dimension scaling https://convertio.co/dxf-svg/

 

0 Likes
Message 14 of 16

rschoenmJ9QJH
Observer
Observer

I am having the same problem. Here is another work-around that seems to be reliable to create dxf or svg files from sketches.

(1) In Fusion 360, extrude a sketch to a shallow body (even if you don't need 3D), or use any body in your design.

(2) Create a new drawing from design and scale properly.

(3) Save drawing as pdf.

(4) Import pdf into Inkscape.

(5) Ungroup and remove frame and text boxes.

(5) Using the node editor in Inkscape select the splines and choose Path -> Simplify

(6) Select all paths and lines and use: Path -> Combine

(7) Save as dxf or svg for laser cutting

 

A little cumbersome, but it has worked well for me.

 

0 Likes
Message 15 of 16

Anonymous
Not applicable

there is free addin for fusion

https://apps.autodesk.com/FUSION/en/Detail/Index?id=7634902334100976871&appLang=en&os=Mac

 

it traces a countour from your model and saves to dxf for laser cutter

maybe it will be more useful for you

0 Likes
Message 16 of 16

snelson5254
Community Visitor
Community Visitor

I had the same issue. The workaround I came up with was to use the 'offset' tool on the splines with a tiny value (0.00001 mm or so). Might cause some janky problems later, but it worked for me.

2 Likes