You are currently viewing a single post of this guestblog.

Click here to go back the complete page. I would be glad to hear your comments, so don’t hesitate to leave me your feedback below. It will appear on the main guestblog page.

in categories  freecad  opensource  permalink:  250   posted on 29.11.2010 22:58
From Yorik

Outputting 2D dxf through FreeCAD itself

Last couple of days Dan Falck and I were chatting about how convenient it would be to be able to output flat, 2D dxf files from any 3D-to-2D process like FreeCAD's drawing module. I've been since then experimenting with that, mainly using Inkscape as a convertor, since FreeCAD outputs 2D drawings in svg format. Inkscape is capable of outputting dxf files, but the quality is not very good.

The other day a much better idea stroke me: The Draft module of FreeCAD is itself capable of reading svg and writing dxf! So I did some new experiments (and a lot of bugfixing) and the result is definitely not that bad.

This is the base file I used for testing:

I then produced a 2D Drawing from the objects in the scene:

This is the scene objects, without passing through the Drawing module, simply exported as svg directly from the 3D scene, then reimported into freecad:

This is the 2D Drawing module output, reimported into FreeCAD:

And this is the same one, exported as dxf (and opened in Caduntu):

Of course the result is stil far from perfect (although much better than last time). The main problem is with the dimensions, which get converted to dummy wires (and have some artifacts too, some bug I must solve). SVG format doesn't support dimension objects. So the thing is, how to do that? Create a new svg tag? I'll have a look around, if other people already thought about that problem...

First and foremost, your name:

And your message:

To publish it, just press this ...