CAM Post

From FreeCAD Documentation
Revision as of 16:56, 18 January 2018 by JoshMwiki (talk | contribs)

Path PostProcess

Menu location
Path → Project Setup → Post Process
Workbenches
Path
Default shortcut
P,P
Introduced in version
-
See also
None

Description

This command exports the selected Job to a G-code file.

Each CNC Controller speaks a specific G-Code dialect, requiring a Dialect-correct Postprocessor to translate the final output from the agnostic internal FreeCAD G-Code dialect. Several Postprocessors are provided, allowing direct use, or as templates for modification. Postprocessors contain configuration flags and are designed to be tuned by adding G-Codes and M-Codes to provided definitions for:

  • Machine initialization
  • Job finalization
  • Tool-Changes
  • Cooling on /off
  • Etc...


The Postprocessors use the [Path Job Operations FreeCAD G-Code dialect ], in conjunction with the Postprocessor configuration definitions, to generate Dialect-Correct G-Code for target machines. This allows the Path workbench to generate correct G-Code to target various CNC machine controllers by invoking different Postprocessors.

CNC Machine Controller types include:

  • CNC mill
  • CNC lathe
  • 3D Printer
  • DragKnife Cutter
  • Laser Cutter
  • Engraver
  • Plasma Torch Cutter
  • Etc...

Theoretically, a single 3D Model could be used as the Base object for Jobs targeting any combination of CNC machines--requiring anywhere from a single Postprocessor, to one per machine, depending on how many machines share a common Postprocessor.

Usage

  1. Select the Job you wish to export
  2. Press the PostProcess button
  3. Confirm the Output File name and directory

Options

Output file and Postprocessor properties can be set in the Job, at any time, prior to invoking the Postprocessor.


The provided Postprocessors are written with comments indicating areas containing Flags, Configuration Variables, and Sections of G-Codes and M-Codes that are to be used by the Postprocessor to configure the output.

Typical Configuration True/False Flags include:

  • OUTPUT_COMMENTS (True = Allow, False = Suppress), Used to insert Text Comments in the output G-Code file.
  • OUTPUT_HEADER (True = Allow, False = Suppress), Used to insert Text Headers in the output G-Code file.
  • OUTPUT_LINE_NUMBERS (True = Allow, False = Suppress), Used to insert Line Numbers in the output G-Code file.
  • SHOW_EDITOR (True = Allow, False = Suppress), Used to show the output G-Code in a Pop-up window when invoking the Postprocessor.
  • MODAL (True = Allow, False = Suppress), Used to reduce the number of output G-Code lines by stripping Mode information when the Mode is not changing.

Typical Configuration Variables include:

  • LINENR (Line Number), Used to Set the Line Number index.
  • UNITS (G20 or G21), Used to explicitly communicate to the target CNC controller what Units to use to interpret the final output file.
  • MACHINE_NAME (Name of Target CNC Mill), Used to Insert a machine name label in the final output file.
  • PRECISION, Used to Set the number of digits to include after the decimal place in final output file

Typical Configuration Sections include:

  • PREAMBLE (Code configuration inserted at beginning of the Job)
  • POSTAMBLE (Code configuration appended to the Job, providing for parking the machine, etc...)
  • TOOL_CHANGE (Code inserted with each tool change in the Job)


Do not use the File->Export menu for export to G-code, it will produce damaged G-code!