How do I export a DXF of a model?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: How do I export a DXF of a model?

Post by quick61 »

NormandC wrote:
quick61 wrote:Edit - OK, now I'm not so sure as with 0.17.7835 when I go to export, it automatically downloaded the DXF libs, so? :? At the risk of slight embarrassment, just how does one know for sure which one is being used?
That one is for Yorik I'd say, but if you see the python libs being downloaded in the report view, it seems to me that they are the ones used? :?
Maybe or maybe not? They could be downloading because there were none there, but could still be using the internal one because I have all the legacy options disabled. But at this point, I have no clue my own self, Yorik?

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
yorik
Founder
Posts: 13597
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: How do I export a DXF of a model?

Post by yorik »

quick61 wrote:Maybe or maybe not? They could be downloading because there were none there, but could still be using the internal one because I have all the legacy options disabled. But at this point, I have no clue my own self, Yorik?
If you export from the 3D document directly, then it's always the (old) python dxf module that is used. So far the new C++ one only does import. If you are exporting a Drawing page, however, the Drawing module produces its own DXF code. It is still handled by the Draft exporter (which uses only a thin wrapper around the Drawing output), but no dxf libs are involved.

It's actually time to attack export with the C++ exporter too... Most of the needed stuff is there already
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: How do I export a DXF of a model?

Post by quick61 »

yorik wrote:
quick61 wrote:Maybe or maybe not? They could be downloading because there were none there, but could still be using the internal one because I have all the legacy options disabled. But at this point, I have no clue my own self, Yorik?
If you export from the 3D document directly, then it's always the (old) python dxf module that is used. So far the new C++ one only does import. If you are exporting a Drawing page, however, the Drawing module produces its own DXF code. It is still handled by the Draft exporter (which uses only a thin wrapper around the Drawing output), but no dxf libs are involved.

It's actually time to attack export with the C++ exporter too... Most of the needed stuff is there already
Shiny, that makes things much more clear. Thanks for the input Yorik. :)

@burtbick - try deleting the dxf scripts in your macro folder and let FreeCAD download them again and see if that gets things working for you.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
burtbick
Posts: 39
Joined: Mon Jun 20, 2016 12:14 am

Re: How do I export a DXF of a model?

Post by burtbick »

Thanks all,

The additional clarification on the DXF export (and import) is useful going forward.

I finally figured out my problem. Probably caused by bi-focals :D

I didn't look up the list for export file types to see the AutoDesk DXF option. I was tunnel visioned on the *.svg, *.svgz, *.dxf export type entry and was typing foobar.dxf for the file name. This does NOT work and gives either a 0 byte DXF file or no DXF file depending on the phase of the moon..

Selecting AutoDesk DXF DOES work properly and exports a proper DXF file. So that is a good thing.

But that begs the question, why is there a *.dxf file type in two places? Shouldn't the *.dxf be removed from the *.svg, *.svgz, *.dxf File type in the drop down? Or is it supposed to work but is broken?

If it's a bug then I can write it up. If not I'd like to understand how it is intended to work.

Regards,
Burt
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: How do I export a DXF of a model?

Post by NormandC »

burtbick wrote:But that begs the question, why is there a *.dxf file type in two places? Shouldn't the *.dxf be removed from the *.svg, *.svgz, *.dxf File type in the drop down? Or is it supposed to work but is broken?
The Drawing (*.svg *.svgz *.dxf) filetype's purpose is to export a Drawing page from the Drawing workbench.

So only a selected Page object will work with this filetype. The svg extension works well, but I just noticed that the .dxf extension does not export correctly.

So there are 2 bugs IMO: the first is that it should tell you that the requested filetype is incompatible if anything but a Page object is selected. The second is the result of the dxf export...
burtbick
Posts: 39
Joined: Mon Jun 20, 2016 12:14 am

Re: How do I export a DXF of a model?

Post by burtbick »

I agree. It caused me some confusion since that ".dxf" option was directly in my line of eyesight.

It really should complain if you are trying to export a .dxf from anything but the Draw Workbench for sure.

I can put together a the bug report(s) tomorrow when I'm fresher.

Thanks,
Burt
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: How do I export a DXF of a model?

Post by Kunda1 »

soft bump
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
ziliasko
Posts: 1
Joined: Thu Oct 26, 2017 9:52 pm

Re: How do I export a DXF of a model?

Post by ziliasko »

I am new in FreeCad and I feel that I have to first congrutalate and thank the developers and everybody who contributed. I managed to get FreeCad working for me and I am using it already to do my favorite project. I have many many questions but I just managed to answer one and I feel obliged to post the problem and the solution in case somebody finds it helpful. Here is my 1 penny contribution:
I could not export my drawing into dxf format so that I can upload it to a laser machine and do the cuts (working on stainless steel 315 plates 3mm-5 mm width). After having read everything posted on the topic nothing helped, My Version 0.16 on Windows 10 couldnot export to DXF. I downloaded the files Yorik suggested and placed them where he suggested and didn't work. What I finally did was to place the 4 python files in the /lib directory on the Prgramfiles (on my machine C:\Program Files\FreeCAD 0.16\lib) and it worked like a charm (import and export). Thanks again.
Post Reply