FreeCAD - Exporting G-Code

Export of G-Code Method 1

The first way to generate the G-Code is just to use File -> Export within the Path Workspace

Select Path Project

First select the Path Project within the FreeCad Part


Select File Export

Next Select File -> Export from the menu


Select G-Code for Export

Make sure to select G-Code in the drop down box for the file save prompt
and choose a save destination.


Choose the Post Processor

Next we need to choose a file pre-processor, some devices need a bit of special formatting for the G-Code. The pre-processor typically handles this for different devices, with FreeCAD this is typically a python script
I believe selecting linuxcnc_post should be good enough for grbl (TODO this needs to be tested)


G-Code Preview

Finally, we should get a preview of the G-Code in a window before it saves it


Export of G-Code Method 2

Another way to export the G-Code is to setup the project with a predefined file path and pre-processor so you don’t have to keep clicking lots of buttons each time etc.

Set the Output File Path

First select the project
In the bottom window underneath there should be a field called Output File, this can be used to set the output path for the generated G-Code


Set the Pre-processor

By selecting the Machine node under the Path Project it should be possible to select the pre-processor here


TODO this doesn’t seem to work under Windows, I think this is a bug that causes this only to work under Linux at the moment

Click the Post Process Button

Finally, we can click the post process button on the toolbar to get a preview / save the part / generate the G-Code