DXF Export Not Working
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
DXF Export Not Working
Hello,
I tried to export the attached FreeCAD sketch as a DXF file: The option 'Allow FreeCAD to automaticaly download and update the DXF libraries' is enabled under Edit->Preferences. I select the sketch (Sketch004) in the tree, then go to File->Export and choose 'Autodesk DXF 2D' as the filetype. When I import the file into FreeCAD again, the result looks nothing like the original sketch: I attached both the FreeCAD file as well as the resulting DXF file. Any help would be greatly appreciated, I've tried to solve this for hours and have gotten nowhere so far. I need to export the sketch as DXF as it will be manufactured on a water jet cutter and the (ancient) software only accepts dxf.
All the best,
Nat
Version info:
OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git) AppImage
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
I tried to export the attached FreeCAD sketch as a DXF file: The option 'Allow FreeCAD to automaticaly download and update the DXF libraries' is enabled under Edit->Preferences. I select the sketch (Sketch004) in the tree, then go to File->Export and choose 'Autodesk DXF 2D' as the filetype. When I import the file into FreeCAD again, the result looks nothing like the original sketch: I attached both the FreeCAD file as well as the resulting DXF file. Any help would be greatly appreciated, I've tried to solve this for hours and have gotten nowhere so far. I need to export the sketch as DXF as it will be manufactured on a water jet cutter and the (ancient) software only accepts dxf.
All the best,
Nat
Version info:
OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git) AppImage
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
- Attachments
-
- sketch.FCStd
- (9.94 KiB) Downloaded 49 times
-
- sketch.dxf
- (3.31 KiB) Downloaded 54 times
Re: DXF Export Not Working
Hi,
First noticeable thing is that if I recompute your design, an error is raised at "Sketch" with invalid reference to Spreadsheet.
You should fix it.
Then your sketch is not fully constrained, but I'm not sure it minds for DXF export purposes.
First noticeable thing is that if I recompute your design, an error is raised at "Sketch" with invalid reference to Spreadsheet.
You should fix it.
Then your sketch is not fully constrained, but I'm not sure it minds for DXF export purposes.
Re: DXF Export Not Working
Thank you openBrain for your answer. The sketch was originally part of a larger file, and probably included references to a spreadsheet as well, but i deleted everything but the sketch, to have a minimal example (I thought the sketch didn't have any references to the Spreadsheet, but it looks like I was wrong). When I open the file and run App.activeDocument().recompute() in the Python console, the result is '0' (which I assume means no error). For version info, see above. But I can assure you that the dxf export problem was there before I deleted the spreadsheet
Edit: I attached a fully constrained version to this post. I am pretty sure that the sketch no longer contains any references to the Spreadsheet that existed previously (I deleted and readded any constraints which could have been set by the spreadsheet previously). The problem persists.
2nd Edit: I was wrong, there were still some spreadsheet references in the file. Scroll down for a version without any references. But this still doesn't solve the problem.
- Attachments
-
- sketch_constrained.fcstd
- (9.89 KiB) Downloaded 52 times
Last edited by rnwest on Thu Jan 24, 2019 8:31 pm, edited 1 time in total.
Re: DXF Export Not Working
The orientation of the sketch seems to be the main issue. With the values in the image a correct DXF is exported (tested with BricsCAD). But when you import the file back into FC the nested triangular shape is missing. To fix that: Check the 'Project exported objects along view direction' option, switch to the Top view and export again. This 2nd DXF does not have any polylines. Note that in both DXFs the linework is nested in a block.
- Attachments
-
- Sketch_ProjectAlongView.dxf
- (3.97 KiB) Downloaded 64 times
-
- Sketch_Default_Settings.dxf
- (3.47 KiB) Downloaded 52 times
-
- Sketch_DXF.png (8.53 KiB) Viewed 6414 times
Re: DXF Export Not Working
There are still about 6 references to a spreadsheet in your "corrected" file. Look for the constraints that have a small fx symbol at the right edge of the constraint panel.rnwest wrote: ↑Thu Jan 24, 2019 6:17 pm Edit: I attached a fully constrained version to this post. I am pretty sure that the sketch no longer contains any references to the Spreadsheet that existed previously (I deleted and readded any constraints which could have been set by the spreadsheet previously). The problem persists.
Gene
Re: DXF Export Not Working
Thank you Gene for your hint. I have attached a corrected version to this post. This is very odd though, the constraints that referenced the spreadsheet in the previous version were all coincidence and symmetry constraints. As far as I understand, spreadsheets can only be used to constrain lengths, distances, diameters,... i.e. 'numeric' values, using a cell value. But why do coincidence and symmetry constraints contain spreadsheet references??
Nat
- Attachments
-
- sketch_constrained_no_refs.fcstd
- (9.78 KiB) Downloaded 54 times
Re: DXF Export Not Working
My typical response to this sort of question is that when improper references are made or other errors occur all bets are off. There can be various strange consequences. In this case probably some indexing error that tried to apply the missing spreadsheet constraints to the wrong elements in the sketcher.
If this is somehow a consistent pattern then it might be a bug. In the present case it is probably nothing.
Gene
Re: DXF Export Not Working
Now with latest file, each time I recompute the following warning arised :
Sketcher::SketchObject / Sketch004: Links go out of the allowed scope
Sketcher::SketchObject / Sketch004: Links go out of the allowed scope
Re: DXF Export Not Working
Got it thanks to the Dependency Graph.
I just remapped the Sketch004 to the XY_Plane011 so it is correctly linked to origin.
I selected top view (don't know if it change something) and exported Sketch004 to DXF ... and everything runs seamlessly.
EDIT : here again I have to use the Legacy Importer to correctly import back the DXF to FC
EDIT2 : maybe the original problem comes from fact that DXF exporter uses a Z-axis view to process (don't quote me it's a guess ) -> I did a quick test with the first attached file. Mapping plane changes nothing (YZ also works). Just fixing the problem of bad origin linkage makes the DXF export to work correctly (even with the Spreadsheet errors).
I just remapped the Sketch004 to the XY_Plane011 so it is correctly linked to origin.
I selected top view (don't know if it change something) and exported Sketch004 to DXF ... and everything runs seamlessly.
EDIT : here again I have to use the Legacy Importer to correctly import back the DXF to FC
EDIT2 : maybe the original problem comes from fact that DXF exporter uses a Z-axis view to process (don't quote me it's a guess ) -> I did a quick test with the first attached file. Mapping plane changes nothing (YZ also works). Just fixing the problem of bad origin linkage makes the DXF export to work correctly (even with the Spreadsheet errors).
Re: DXF Export Not Working
Hi
but not serious, I have my solution /
I extract the original sketch (minimal thickness)
using "Position, I place the object on the XY plane,
and exports it in DXF
I do not find this option,Check the 'Project exported objects along view direction' option,
but not serious, I have my solution /
I extract the original sketch (minimal thickness)
using "Position, I place the object on the XY plane,
and exports it in DXF
- Attachments
-
- sketch_dxf.PNG (68.08 KiB) Viewed 6365 times