AUTODESK FUSION 360 • MANUFACTURING (CAM)

G-Code Generation — Post-process to generate G-code for a target machine (conceptual)

Translating your digital design into the precise machine instructions that bring physical objects to life.

Historical Context & Motivation

For centuries, shaping raw material into finished objects required the skilled hands of artisans who read blueprints and manually guided cutting tools along precise paths. The advent of Computer Numerical Control (CNC) in the mid-twentieth century transformed this ancient craft by delegating the physical choreography of cutting to a coded language that machines could interpret. That coded language—G-code—became the universal lingua franca between digital design environments and the physical machines that mill, turn, route, and laser-cut material. Understanding how a post-processor translates abstract toolpath data into machine-readable G-code is essential for any visual artist working with digital fabrication, because it bridges the gap between creative intent in software and physical reality on the shop floor.

1949
First Numerically Controlled Machine
John T. Parsons and MIT's Servomechanisms Laboratory develop a prototype milling machine driven by punched tape, proving that machines can follow coded instructions to cut complex shapes.
1958
EIA RS-274 Standard Published
The Electronic Industries Alliance publishes the RS-274 standard, formalizing G-code syntax (G00, G01, M-codes, etc.) so that programs written for one machine can, in principle, run on another.
1980s
Rise of CAM Software and Post-Processors
As personal computers become powerful enough to calculate toolpaths, CAM packages emerge that generate generic toolpath data, requiring a dedicated post-processor to tailor the output for each manufacturer's unique controller dialect.
2012
Fusion 360 Cloud-Based CAM
Autodesk launches Fusion 360, integrating design, simulation, and CAM in a single cloud-connected platform. Its post-processor library democratizes CNC access for artists, makers, and small studios.
2020s
Post-Processors for Diverse Machines
Today, Fusion 360 ships with hundreds of community-vetted post-processors for 3-axis routers, 5-axis mills, laser cutters, waterjet systems, and robotic arms—enabling visual artists to output code for nearly any fabrication tool.

This historical trajectory reveals a persistent problem: every CNC machine speaks a slightly different dialect of G-code, shaped by its manufacturer, controller hardware, and mechanical capabilities. The question that defines this lesson is therefore: How does Fusion 360 translate a single set of toolpath data into the precise G-code dialect required by your specific machine? The answer lies in the concept of post-processing, and mastering this final link in the digital fabrication chain ensures that the objects you design on screen emerge faithfully from raw material.

Core Principles & Definitions

Before diving into the mechanics of G-code generation, it helps to establish the foundational vocabulary. In Fusion 360's CAM environment, your creative journey from 3D model to physical part passes through several conceptual stages: you define operations (how a tool should interact with material), the software computes toolpaths (the geometric trajectories the tool follows), and finally a post-processor converts those generic toolpaths into a G-code file that your particular machine controller can execute. Think of the post-processor as a translator fluent in many machine dialects, ensuring that the same creative intent yields correct physical actions regardless of which machine sits in your studio.

1

Toolpath (Internal Representation)

A machine-neutral sequence of coordinates and parameters that Fusion 360 calculates from your CAM setup. It describes what to cut and where, but not yet in the language of any specific machine.
2

Post-Processor

A small program (written in JavaScript within Fusion 360) that reads the internal toolpath data and outputs a text file formatted for a specific CNC controller—applying the correct G-code syntax, modal groups, line numbering, and safety codes.
3

G-Code (RS-274 / ISO 6983)

A standardized set of alphanumeric instructions such as G00 (rapid move), G01 (linear feed move), and M-codes (machine functions like spindle on/off). Despite the standard, real controllers often add proprietary extensions.
4

Machine Controller

The hardware and firmware (e.g., Fanuc, Haas, GRBL, Mach3) that reads G-code line by line and translates each command into electrical signals driving stepper or servo motors on the physical machine.
5

Machine Configuration

The physical setup of a CNC machine—its axis arrangement, travel limits, spindle speed range, and tool-change mechanism—which the post-processor must respect when formatting output code.
KEY TAKEAWAY
Imagine you are an art director who just finalized a storyboard (your toolpath). Before it can go to a foreign animation studio, it needs to be translated by a specialist who knows that studio's language, house style, and technical requirements. The post-processor is exactly that specialist: it takes your universal creative blueprint and rewrites it in the exact dialect your target machine requires, adding safety headers, retracting the tool at the right moments, and formatting numbers to the precision the controller expects.

Visual Explanation — The Post-Processing Pipeline

The pipeline flows left to right, then downward: your 3D model feeds into CAM setup, which generates a generic toolpath. The post-processor then applies machine-specific rules (shown in the side panel) to produce a G-code file ready for the CNC machine controller.

As the diagram illustrates, the post-processor sits at a critical juncture between the abstract world of CAM computation and the physical reality of machine motion. Everything upstream of the post-processor—your design, your choice of cutting strategy, your feeds and speeds—remains independent of the target machine. Everything downstream—the text file that the controller reads—must conform precisely to that machine's expectations. This separation of concerns is powerful for visual artists because it means you can design once in Fusion 360 and then output G-code for a desktop CNC router in your studio, a waterjet cutter at a fabrication lab, or a 5-axis mill at an industrial facility, simply by selecting the appropriate post-processor.

How the Post-Processor Works

Although G-code generation is not governed by a single mathematical formula, understanding the underlying data transformations clarifies why different machines require different post-processors. At the most fundamental level, a toolpath is a sequence of cutter-location (CL) records that describe the tool's tip position in 3D space plus auxiliary data like feed rate and spindle speed. The post-processor iterates through these records and emits corresponding G-code lines. Two key translations happen during this process: coordinate formatting (how numbers are expressed) and modal command mapping (which G and M codes correspond to which actions on a given controller).

LINEAR INTERPOLATION COMMAND
G01 X{x} Y{y} Z{z} F{f}
G01 = linear feed move; X, Y, Z = endpoint coordinates in the machine's work coordinate system; F = feed rate (mm/min or in/min). The post-processor fills {x}, {y}, {z}, and {f} from the toolpath's CL record, applying machine-specific decimal precision and unit conventions.
FEED RATE CONVERSION
F (mm/min) = f (mm/rev) × S (rev/min)
Some controllers expect feed in mm/min, others in mm/rev. The post-processor handles this conversion. Here f is feed per revolution and S is spindle speed. For a feed of 0.1 mm/rev at 6000 RPM: F = 0.1 × 6000 = 600 mm/min.
ARC INTERPOLATION COMMAND
G02 X{x} Y{y} I{i} J{j} F{f}
G02 = clockwise arc; X, Y = arc endpoint; I, J = incremental offsets from the current position to the arc center. Some controllers use R (radius) instead of I/J—the post-processor must output the correct form for your machine.

Beyond coordinate arithmetic, the post-processor also injects critical program structure: a header block (program number, units declaration, work offset), tool-change sequences (T01 M06), spindle start commands (S12000 M03), coolant codes (M08/M09), and a safe program ending (M30). Each of these elements varies by controller. A Haas controller, for example, expects a specific program-number format (O1001), while a GRBL-based hobby router typically omits it entirely. The post-processor encodes all of these idiosyncrasies so that you, the artist, never have to memorize machine-specific syntax.

💡 Why This Matters for Visual Artists
You do not need to write G-code by hand. However, understanding what the post-processor does allows you to diagnose problems (e.g., wrong units, unexpected rapid moves) and gives you confidence when moving your designs between different fabrication tools—a common reality in art-school workshops and maker spaces where multiple machines coexist.

Anatomy of a G-Code File

A complete G-code file produced by Fusion 360's post-processor has a recognizable anatomy, much like a well-structured screenplay has an opening, body, and closing. Understanding these sections helps you read and verify the output before sending it to your machine. The diagram below dissects a simplified G-code file to reveal the role of each section.

Left panel shows actual G-code lines; right panel annotates each section. The header (purple) sets up modes and units. The tool call (amber) loads the cutter. The cutting body (cyan) contains the actual machining moves derived from your design. The footer (green) safely ends the program.
Common G and M codes found in post-processed output
G/M CodeNameWhat It Does
G00Rapid PositioningMoves tool at maximum speed to a coordinate (no cutting)
G01Linear Feed MoveMoves tool in a straight line at a controlled feed rate (cutting)
G02 / G03Arc InterpolationCW (G02) or CCW (G03) arc move; post-processor selects I/J or R format
G28Return to HomeSends axis to machine home position; critical safety command
M03 / M05Spindle On / OffM03 starts spindle clockwise; M05 stops it
M06Tool ChangeInitiates an automatic tool change (ATC) or prompts manual swap
M30Program End & ResetEnds program and rewinds to the beginning; equivalent to closing a file

Worked Example — Post-Processing in Fusion 360

Imagine you have designed a decorative relief panel in Fusion 360 and set up a 3D Adaptive Clearing operation followed by a Parallel finishing pass. You are ready to generate G-code for a Shopbot Desktop CNC router running a GRBL-based controller. Walk through the following conceptual steps to see how post-processing works in practice.

Post-Processing a Relief Panel for a Shopbot (GRBL Controller)
1
Step 1 — Verify Toolpaths in Fusion 360Open the Manufacturing workspace and use the Simulate command to visually verify that the tool follows the correct paths, does not gouge the model, and respects your stock dimensions. This step is purely visual and machine-independent—you are confirming that the toolpath logic is sound before any G-code is generated.
Simulation confirms clean toolpath with no collisions or gouges.
2
Step 2 — Select Post-ProcessorNavigate to Actions → Post Process (or right-click the Setup and choose Post Process). In the dialog, click the Post Configuration selector. Fusion 360 provides a cloud library of post-processors; search for "GRBL" or "Shopbot." Select the GRBL post-processor (grbl.cps). If your machine vendor supplies a custom post, you can import a local .cps file instead.
Post-processor selected: grbl.cps (GRBL / Shopbot).
3
Step 3 — Configure Post SettingsThe dialog exposes machine-specific options. Set units to Millimeters (matching your CAM setup). Choose the output file extension (.nc or .gcode). Some posts offer toggles such as "Use radius arcs (R) instead of I/J" or "Output line numbers." For GRBL, leave I/J arcs enabled and disable line numbers (GRBL does not require them).
Settings: metric units, .gcode extension, I/J arc format, no line numbers.
4
Step 4 — Generate the G-Code FileClick Post. Fusion 360 runs the JavaScript-based post-processor against your toolpath data, producing a .gcode text file. The file opens in Fusion's NC editor, where you can scroll through the code. You should see a short header (G21 for metric, G90 for absolute mode), followed by your cutting moves (G01, G02, G03 lines), and a clean ending (M05, M30).
File generated: relief_panel.gcode (≈ 12,400 lines for two operations).
5
Step 5 — Inspect and Transfer to MachineScan the first and last 20 lines to confirm the header sets metric mode (G21) and the footer includes spindle stop (M05) and program end (M30). Open the file in a G-code viewer like CAMotics (free, open-source) to simulate the code independently of Fusion 360—this is your final safety check. Then transfer the file to your machine via USB or network, set your work origin (touch-off), and run the program.
G-code verified, transferred, and ready to cut. Your design is about to become a physical object.

Comparing Post-Processors for Common Machines

Not all post-processors are created equal, and visual artists frequently encounter different machines in studio environments, fabrication labs, and collaborative workshops. The table below compares the behavior of three common post-processors you might encounter as a Fusion 360 user. Notice how the same toolpath data can produce subtly different G-code depending on the target machine.

Post-processor behavior varies significantly by machine type
FeatureGRBL (Hobby CNC)Haas (Industrial Mill)Shopbot OpenSBP
File extension.gcode.nc.sbp
Program numberNot usedRequired (O1001)Not used
Arc formatI/J incrementalI/J or R (configurable)CG command (proprietary)
Tool changePause for manual change (M06 + M00)Automatic tool changer (T## M06)C6 command for ATC
Feed rate unitsmm/minmm/min or in/minin/sec (unique!)
Typical useDesktop routers, 3018 millsProfessional machining centersEducation/art CNC routers
KEY TAKEAWAY
Think of post-processors like export presets in Photoshop or After Effects. When you export a video, you select a preset for YouTube, Instagram, or cinema projection—each has different resolution, codec, and color-space requirements, yet the creative content is the same. Similarly, the post-processor is an export preset for CNC machines: same design, different delivery format. Choosing the wrong post-processor is like exporting a 4K cinema file for a phone screen—the content might technically exist, but it will not play correctly on the target device.

Connection to Advanced CAM Concepts

The conceptual post-processing workflow introduced in this lesson forms the foundation for more sophisticated techniques that you may encounter as your digital fabrication practice grows. Multi-axis machining (4-axis and 5-axis) demands post-processors that output rotary axis coordinates (A, B, or C axes) alongside the standard X, Y, Z linear axes. Custom post-processor editing allows advanced users to modify the JavaScript source of a post-processor to add custom comments, change formatting, or support non-standard machines such as robotic arms used in sculptural fabrication. Additionally, Fusion 360's Machine Simulation feature can replay the generated G-code against a virtual model of the physical machine, detecting collisions between the tool, workholding, and machine structure before any material is cut.

How this lesson's concepts extend into advanced CAM territory
ConceptThis Lesson (Basic)Advanced Extension
Axes3-axis milling (X, Y, Z)5-axis simultaneous (X, Y, Z, A, B)
Post-processorSelect from Fusion libraryEdit JavaScript (.cps) source code
VerificationToolpath simulation in FusionFull machine simulation with collision detection
Machine typesCNC routers, basic millsRobotic arms, lathes, wire EDM, hybrid additive-subtractive
Output formatStandard G-code (RS-274)Vendor-specific languages (Heidenhain, Mazak, RAPID for robots)

For visual artists specifically, the frontier of post-processing intersects with computational design and robotic art. Artists like Madeline Gannon and studios such as Gramazio Kohler Research use custom post-processors to drive industrial robots for sculptural and architectural fabrication. Understanding the conceptual framework of post-processing established in this lesson gives you the vocabulary and mental model to engage with these advanced practices when the time comes.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain in your own words why a single toolpath generated in Fusion 360 cannot be sent directly to every CNC machine without modification. What role does the post-processor play in bridging this gap?
PROBLEM 2BASIC CALCULATION
A Fusion 360 CAM operation specifies a feed per revolution of 0.08 mm/rev and a spindle speed of 8000 RPM. If the target machine's controller expects feed rate in mm/min, what value should the post-processor write after the F code?
PROBLEM 3INTERMEDIATE
You are post-processing a two-operation job (roughing + finishing) for a Haas VF-2 mill. The first operation uses a 12 mm flat end mill (Tool 1), and the second uses a 6 mm ball nose (Tool 2). Describe the sequence of G-code blocks you would expect to see at the transition between the two operations, and explain which of these blocks is generated by the post-processor versus which comes from the toolpath data itself.
PROBLEM 4APPLIED
You are a visual arts student preparing to CNC-route a sculptural wall panel from plywood. Your university's fabrication lab has two machines: a Shopbot PRS Alpha running the OpenSBP controller and a Chinese 6040 router running GRBL. You designed the panel in Fusion 360 and set up the CAM operations. Describe the complete workflow for generating G-code for each machine, identifying where the workflows diverge and where they remain identical.
PROBLEM 5CRITICAL THINKING
A classmate argues that post-processors are unnecessary because G-code is a universal standard and all machines should understand the same commands. Construct a nuanced counterargument, drawing on historical, technical, and practical considerations discussed in this lesson. Then speculate: could a truly universal post-processor ever exist, and what would it require?

Lesson Summary

This lesson traced the journey from a digital design in Fusion 360 to a physical object on a CNC machine, revealing the critical role of the post-processor as the translator between machine-neutral toolpath data and machine-specific G-code. We explored the historical evolution from punched-tape NC machines to modern cloud-based CAM, established definitions for CL data, G-code commands (G00, G01, G02, M-codes), and machine controllers, and visualized both the post-processing pipeline and the anatomy of a G-code file.

Key practical takeaways include: always select the correct post-processor for your target machine from Fusion 360's library; verify the output by inspecting the header and footer of the generated file; and remember that the same design can be output for multiple machines simply by changing the post-processor—your creative work stays intact. As you advance, you will encounter multi-axis machining, custom post-processor editing, and even robotic fabrication—all of which build upon the foundational concepts introduced here.

Varsity Tutors • Autodesk Fusion 360 • G-Code Generation — Post-process to generate G-code for a target machine (conceptual)