Export 1 face of 3D as a DXF

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
JohnRob
Posts: 16
Joined: Wed May 20, 2020 4:56 am

Export 1 face of 3D as a DXF

Post by JohnRob »

I am trying to export a plan view of an imported step file. I've made numerous tries but the export seems to only want to export from a technical layer.


I have a step file of a RaspPi Pico. It appears to allow full access to the components.
My search suggested:
Run PartCheck Geometry
then solid2image

PartCheck Geometry is grayed out. So I guess I have the wrong structure?
I couldnot find solid2Image.

Any suggestions would be helpful.
BTW this file is from the RasPi website, there are not restrictions that I'm aware of.

Thanks John

Windows10
FreeCad:

OS: Windows 10 Version 2004
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
Attachments
Pico-R3-step.zip
(259.77 KiB) Downloaded 20 times
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: Export 1 face of 3D as a DXF

Post by keithsloan52 »

My understanding is that the Draft workbench has a such a facility but I could not get it to work,
I can however get you an unconstrained Sketch if that would help?
But rather than a section, I suspect what you would like is a projected View, which I assume you would use TechDraw for.

B50E4CE6-68F1-4AF9-BDE9-7788DB96618E.jpeg
B50E4CE6-68F1-4AF9-BDE9-7788DB96618E.jpeg (54.39 KiB) Viewed 2074 times
Pico-R3.FCStd
(142.04 KiB) Downloaded 17 times

1) Install toSketch workbench https://github.com/KeithSloan/toSketch
( Should be able to use Tools | Addon manager | Configure ( Cut and paste link to github repro)

2) Click on 'ToPlane' ( First Icon )
Select the created Plane and in Properties Select an appropriate Plane ( In my case it was XZ Plane) and any desired offset ( In my Case 0)

3) Click on 'ToSketch' ( Second Icon)

4) You might now find it easier toggle the visibility of the Plane

5) This reddit post suggest how to go from sketch to SVG https://www.reddit.com/r/FreeCAD/commen ... tch_as_an/
Maybe a similar approach for DXF ?

6) Incidentally if you select the sketch and click on 'To Macro' it will create a Macro with the name of the Sketch which has all the shape details.
If there is not an easy way to go from sketch to DXF | SVG etc maybe I will look at enhancing toSketch
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: Export 1 face of 3D as a DXF

Post by keithsloan52 »

Think make a TechDrawing from your STEP file maybe the solution https://wiki.freecadweb.org/TechDraw_ExportPageDXF
User avatar
thomas-neemann
Veteran
Posts: 11921
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Export 1 face of 3D as a DXF

Post by thomas-neemann »

JohnRob wrote: Fri Jul 23, 2021 2:58 am
here is a possibility.
Greetings Thomas


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


phpBB [video]
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: Export 1 face of 3D as a DXF

Post by keithsloan52 »

:D :D Easier than I thought !!!

Just select the sketch then | File | export | Selected DXF as output file type.

Here is the DXF file opened in LibreCAD
55E76AA1-BD32-4851-A009-067B2C4876FF.jpeg
55E76AA1-BD32-4851-A009-067B2C4876FF.jpeg (88.44 KiB) Viewed 2026 times
and here is DXF File
Pico-R3-Sketch.dxf
(46.96 KiB) Downloaded 14 times
User avatar
JohnRob
Posts: 16
Joined: Wed May 20, 2020 4:56 am

Re: Export 1 face of 3D as a DXF

Post by JohnRob »

@keithSloan52

Your exported dxf was just what I need, except I didn't think to add that I need there rear side. For some reason they put the components on the rear side.

I Installed your toSketch add on, it shows in the TOOLS / ADDON Manager that it is installed but I cannot find in in any of the menu. I had assumed it would be in the workbench drop down but it is not.
I rebooted the machine just in case with no luck.

If you create another dxf but the rear side that would work for me right now, however I would like to learn how to do the export myself.

Many Thanks
John
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: Export 1 face of 3D as a DXF

Post by keithsloan52 »

AUUGGH - Gremlins
JohnRob wrote: Fri Jul 23, 2021 8:25 pm @keithSloan52

Your exported dxf was just what I need, except I didn't think to add that I need there rear side. For some reason they put the components on the rear side.
I tried but for some reasons I can no longer successfully export the Sketch, least it is no longer correct when opened with LibreCAD,
worked before and not aware of doing anything different. Anyway attached is a FreeCAD file with sketch and my attempt at a dxf export.
Perhaps somebody else can resolve the export of sketch to dxf, I tried changing FreeCAD export preferences but did not help,
PICO-R3-Import-Sketch.FCStd
(165.87 KiB) Downloaded 8 times
PICO-R3-Import-Sketch.dxf
(85.42 KiB) Downloaded 11 times
I Installed your toSketch add on, it shows in the TOOLS / ADDON Manager that it is installed but I cannot find in in any of the menu. I had assumed it would be in the workbench drop down but it is not.
I rebooted the machine just in case with no luck.
Yes if sucessfully installed it should be one of selectable workbenches.

Not sure what OS you are using but if you can in a Command Line Window navigate to .../Mod
All the workbenches are subdirectories under Mod then enter the command

Code: Select all

git clone https://github.com/KeithSloan/toSketch.git
Then start FreeCAD
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: Export 1 face of 3D as a DXF

Post by keithsloan52 »

keithsloan52 wrote: Sat Jul 24, 2021 5:19 am I tried but for some reasons I can no longer successfully export the Sketch.
Not sure what is happening, but it looks like the dxf export is using X,Y Plane coordinates, where as the sketch is in X,Z plane.
Some how I got it to work before without switching things around at all.

A sketch is 2D but I think internally all the points still have three coordinates.
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: Export 1 face of 3D as a DXF

Post by keithsloan52 »

keithsloan52 wrote: Sat Jul 24, 2021 5:36 am
keithsloan52 wrote: Sat Jul 24, 2021 5:19 am I tried but for some reasons I can no longer successfully export the Sketch.
Not sure what is happening, but it looks like the dxf export is using X,Y Plane coordinates, where as the sketch is in X,Z plane.
Some how I got it to work before without switching things around at all.

A sketch is 2D but I think internally all the points still have three coordinates.
Okay Correct - Personally think this is a BUG. A sketch is 2D and the export should work what ever Plane the Sketch is in and not have to be
rotated to the XY Plane.
5B26FB5C-7E1C-4A21-8A64-FE90C1BF5E89.jpeg
5B26FB5C-7E1C-4A21-8A64-FE90C1BF5E89.jpeg (31.55 KiB) Viewed 1894 times
PICO-R3-Import-Sketch-XY.dxf
(85.74 KiB) Downloaded 11 times
User avatar
Roy_043
Veteran
Posts: 8552
Joined: Thu Dec 27, 2018 12:28 pm

Re: Export 1 face of 3D as a DXF

Post by Roy_043 »

Note that you can Part_Mirror a Sketch and export the created object to DXF.
Post Reply