Export sketch to DXF
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!
Export sketch to DXF
Hi,
I have a sketch created from a step model I would like to export as DXF to import it into KiCad. Trying to import into KiCad I'm getting the error message "No graphic items found in file to import".
I opened the file in LibreCad and saw that the dxf does not consist simple lines which are moveable, but a complex part which I cannot modify, just moving as complete (When I'm creating a simple multiline sketch, in LibreCad I can move the single lines around without moving the others). This might be the reason KiCad is not able to open it because it's to complex.
Do anybody know why FreeCad exports the part as one and not each line separated?
I deleted in a second sketch (Sketch001) the most of the sketch out, because otherwise it is quite slow.
It is the Flatpak version:
OS: Linux 5.4.8-arch1-1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14555 (Git shallow)
Build type: Release
Branch: (HEAD detached at 0.18.4)
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 2.7.15
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
I have a sketch created from a step model I would like to export as DXF to import it into KiCad. Trying to import into KiCad I'm getting the error message "No graphic items found in file to import".
I opened the file in LibreCad and saw that the dxf does not consist simple lines which are moveable, but a complex part which I cannot modify, just moving as complete (When I'm creating a simple multiline sketch, in LibreCad I can move the single lines around without moving the others). This might be the reason KiCad is not able to open it because it's to complex.
Do anybody know why FreeCad exports the part as one and not each line separated?
I deleted in a second sketch (Sketch001) the most of the sketch out, because otherwise it is quite slow.
It is the Flatpak version:
OS: Linux 5.4.8-arch1-1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14555 (Git shallow)
Build type: Release
Branch: (HEAD detached at 0.18.4)
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 2.7.15
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
- Attachments
-
- MBXL_RA_RCPT_2P24S2P.dxf
- Exported dxf
- (1.61 KiB) Downloaded 55 times
-
- MBXL_RA_RCPT_2P24S2P.FCStd
- (127.15 KiB) Downloaded 62 times
Re: Export sketch to DXF
Is this a bug?
Re: Export sketch to DXF
i select the sketch, ctrl+e (export)
and... it works
and... it works
Re: Export sketch to DXF
Yes I'm able to export, but when opening in LibreCad it's a single part, not multiple lines. I'm not able to import into KiCad
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Export sketch to DXF
Is this one any better? It seems to be individual lines in LibreCAD.
- Attachments
-
- mbxl_ra_rcpt.dxf
- (54.81 KiB) Downloaded 54 times
Re: Export sketch to DXF
otherwise you can use the command "explode" in librecad to... explode a block
Re: Export sketch to DXF
Hi wanderfan,wandererfan wrote: ↑Fri Jan 17, 2020 12:06 amIs this one any better? It seems to be individual lines in LibreCAD.
yes this is what I wanna have, thank you. This dxf I can open in KiCad too. How did you export it to have individual lines?
Hi Forthman,
yes this works too, thank you!
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Export sketch to DXF
There are 2 Dxf exporters - one in the Draft module ("Legacy python exporter") and one in the Import module. Sometimes one works better than the other.
In this case I used the one from the Import module. Just change the preference, then select the Sketch, then File>Export (AutoDesk Dxf).
- Attachments
-
- UseImportModule.png (123.64 KiB) Viewed 7144 times
Re: Export sketch to DXF
The OP is using V0.18 which does not have the 'Use legacy python exporter' option. So the OP would have to switch to V0.19.
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Export sketch to DXF
In v0.18, make a TechDraw view of the sketch and use "export page as Dxf" or this in the python console:
Code: Select all
>>> import Import
>>> s = App.ActiveDocument.Sketch
>>> Import.writeDXFObject([s], "mbxlv18.dxf")
>>>