DXF Exporting Issues

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!
dzawacki
Posts: 6
Joined: Mon Oct 11, 2021 2:50 pm

DXF Exporting Issues

Post by dzawacki »

I'm going to lead off by saying I tried to search for an answer on this, but the search configuration prevents me from searching for "dxf" and "dxf export" because they are too short/too common. So, if this has been answered elsewhere, I apologize.

I have a Sketch that I would like to export as a DXF so I can use it in my CAM software. However, I'm running into two issues.
  • The sketch plane is being ignored/I'm also getting flat sketches with seemingly two planes when exported into the DXF. Specifically, the main sketch is a flat line, but dog bones are perpendicular to the flat line. I have worked around the flatness slightly, by changing the sketch plane from XZ to XY, but the dog bones are still coming through in a different plane.
  • B Splines are not exporting at all. I have regular geometry intersecting with B splines and the regular geometry works fine, but there is complete emptiness where the B splines should be. I did find a discussion on this from 2014, but it was unclear if it was ever resolved.
I am running version 0.20, just updated today to see if it might resolve my issues but the changelog didn't seem promising.

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: English/United States (en_US)
Installed mods: 
  * 3D_Printing_Tools
  * ExplodedAssembly-master
  * parts_library
This is what it looks like as a Sketch:
Sketch.png
Sketch.png (24.64 KiB) Viewed 333 times
This is the view that loads in 2d CAD software, and my CAM software:
DFX_Default.png
DFX_Default.png (3.12 KiB) Viewed 333 times
I skewed it slightly to see the dogbones are on a different plane:
DFX_Skew.png
DFX_Skew.png (5.7 KiB) Viewed 333 times
And if I rotate it in FreeCAD, I see it without the dogbones, some of the pockets, and without the distinction of the dino legs:
DFX_Second View.png
DFX_Second View.png (21.67 KiB) Viewed 333 times
It is very possible I am doing something wrong here, so if so, please let me know what I can troubleshoot. I've tried futzing with all of these settings for DXF export and I didn't notice a difference:
DXF_Export.png
DXF_Export.png (7.81 KiB) Viewed 333 times
User avatar
Shalmeneser
Veteran
Posts: 4186
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: DXF Exporting Issues

Post by Shalmeneser »

File ?
User avatar
thomas-neemann
Veteran
Posts: 6201
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE

Re: DXF Exporting Issues

Post by thomas-neemann »

dzawacki wrote: Wed Jun 22, 2022 10:12 pm ...

everything works here if i do it like this


https://www.youtube.com/watch?v=eoFdhSsy3MM

phpBB [video]


Code: Select all

OS: Ubuntu 20.04.1 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.20)
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.9.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: German/Germany (de_DE)
Installed mods: 
  * Curves 0.4.4
ich biete freecad online-support an, als mini-job
VHS Freecad Webseminare Herbst 2022
https://www.vhs-lingen.de/programm/beru ... 011#inhalt
https://www.vhs-lingen.de/programm/beru ... 012#inhalt
dzawacki
Posts: 6
Joined: Mon Oct 11, 2021 2:50 pm

Re: DXF Exporting Issues

Post by dzawacki »

Thomas, I am using the Sketch workbench, which may be the issue, but is my preferred workbench for drafting things with dimensions.

Shalmeneser, attached is the file and the DXF that is exported from the sketch.
Attachments
TRex-2.dxf
(41.16 KiB) Downloaded 2 times
TRex.FCStd
(76.26 KiB) Downloaded 6 times
User avatar
thomas-neemann
Veteran
Posts: 6201
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE

Re: DXF Exporting Issues

Post by thomas-neemann »

dzawacki wrote: Thu Jun 23, 2022 2:18 pm Thomas, I am using the Sketch workbench,...
this should also work as long as you use the xy plane
ich biete freecad online-support an, als mini-job
VHS Freecad Webseminare Herbst 2022
https://www.vhs-lingen.de/programm/beru ... 011#inhalt
https://www.vhs-lingen.de/programm/beru ... 012#inhalt
User avatar
Shalmeneser
Veteran
Posts: 4186
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: DXF Exporting Issues

Post by Shalmeneser »

When you export Dxf the sketch then reopen it in FC, you get an error message :

Code: Select all

18:12:44  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\...\importDXF.py", line 2796, in open Import.readDXF(filename)
<class 'RuntimeError'>: BRep_API: command not done
User avatar
thomas-neemann
Veteran
Posts: 6201
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE

Re: DXF Exporting Issues

Post by thomas-neemann »

Shalmeneser wrote: Thu Jun 23, 2022 4:16 pm ...
here it works

Code: Select all

OS: Ubuntu 20.04.1 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.20)
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.9.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: German/Germany (de_DE)
Installed mods: 
  * Curves 0.4.4
ich biete freecad online-support an, als mini-job
VHS Freecad Webseminare Herbst 2022
https://www.vhs-lingen.de/programm/beru ... 011#inhalt
https://www.vhs-lingen.de/programm/beru ... 012#inhalt
User avatar
Shalmeneser
Veteran
Posts: 4186
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: DXF Exporting Issues

Post by Shalmeneser »

Don't understand why the simple form doesn't want to dxf export.

(btw, your sketch is awful. Try PartDesign_LinearPattern and NEVER use zero dimensions : there is a geometric constraint for the same effect !)
Attachments
TRex_SHALM.FCStd
(110.17 KiB) Downloaded 3 times
Capture d’écran 2022-06-23 185512.jpg
Capture d’écran 2022-06-23 185512.jpg (89.97 KiB) Viewed 143 times
User avatar
thomas-neemann
Veteran
Posts: 6201
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE

Re: DXF Exporting Issues

Post by thomas-neemann »

Shalmeneser wrote: Thu Jun 23, 2022 4:58 pm ...
if i rotate it 90 degrees (xy plane) it works here
Bildschirmfoto_2022-06-23_19-03-30.png
Bildschirmfoto_2022-06-23_19-03-30.png (31.43 KiB) Viewed 138 times
ich biete freecad online-support an, als mini-job
VHS Freecad Webseminare Herbst 2022
https://www.vhs-lingen.de/programm/beru ... 011#inhalt
https://www.vhs-lingen.de/programm/beru ... 012#inhalt
dzawacki
Posts: 6
Joined: Mon Oct 11, 2021 2:50 pm

Re: DXF Exporting Issues

Post by dzawacki »

Confirmed, rotating it to the xy plane does export as expected. I also realized I was using the wrong program to preview the DXF, which also fixed the issue with bsplines.

Does it have to always be on the xy plane for successful exporting? It seems clunky to do this, and I would expect the software to be able to adjust to the sketch's defined plane.
Post Reply