Page 1 of 2

DXF Exporting Issues

Posted: Wed Jun 22, 2022 10:12 pm
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 908 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 908 times
I skewed it slightly to see the dogbones are on a different plane:
DFX_Skew.png
DFX_Skew.png (5.7 KiB) Viewed 908 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 908 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 908 times

Re: DXF Exporting Issues

Posted: Wed Jun 22, 2022 10:17 pm
by Shalmeneser
File ?

Re: DXF Exporting Issues

Posted: Thu Jun 23, 2022 6:29 am
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

Re: DXF Exporting Issues

Posted: Thu Jun 23, 2022 2:18 pm
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.

Re: DXF Exporting Issues

Posted: Thu Jun 23, 2022 3:13 pm
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

Re: DXF Exporting Issues

Posted: Thu Jun 23, 2022 4:16 pm
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

Re: DXF Exporting Issues

Posted: Thu Jun 23, 2022 4:31 pm
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

Re: DXF Exporting Issues

Posted: Thu Jun 23, 2022 4:58 pm
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 !)

Re: DXF Exporting Issues

Posted: Thu Jun 23, 2022 5:04 pm
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 713 times

Re: DXF Exporting Issues

Posted: Fri Jun 24, 2022 5:25 pm
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.