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.

A rotating 3D form with a mechanical component and solid model.
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

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.

SECTION 2

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.

SECTION 3

Visual Explanation — The Post-Processing Pipeline

Post-Processing Pipeline: From 3D Model to Machine Motion3D MODEL(Your Design)in Fusion 360CAM SETUPDefine operations,tools, speeds, feedsTOOLPATHGeneric coordinatedata (CL data)POST-PROCESSORJavaScript program thatformats output for aspecific controllerG-CODE FILE.nc / .gcode / .tapCNC MACHINE CONTROLLERPost-Processor Inputs• Controller dialect• Axis configuration• Safety codes• Number formatting
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.

SECTION 4

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

G01XxYyZzFfG01 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)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

G02XxYyIiJjFfG02 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.

SECTION 5

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.

Anatomy of a G-Code Fileexample_part.nc%O1001 (SCULPTED PANEL)G90 G94 G17G21 (METRIC)G28 G91 Z0T01 M06 (6MM FLAT ENDMILL)S12000 M03G54G00 X0 Y0G43 Z15 H01M08G01 Z-2 F600G01 X50 Y30 F1200G02 X80 Y30 I15 J0... (more cutting moves)G00 Z15M09G28 G91 Z0M30%① HEADERProgram number & nameAbsolute mode (G90), units (G21)Safe home position (G28)Set by post-processor automatically② TOOL CALLLoad tool, start spindle at 12000 RPM③ CUTTING BODYWork offset (G54), rapid to startTool length comp (G43 H01)Coolant on (M08)Linear moves (G01) & arcs (G02/G03)Feed rates formatted per controllerThis is where your design lives!Retract at end of operation④ FOOTER / SAFE ENDCoolant off (M09)Return to home (G28)Program end (M30), tape end (%)
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.
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

Common G and M codes found in post-processed output

SECTION 6

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. 1

    Step 1 — Verify Toolpaths in Fusion 360

    Open 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. 2

    Step 2 — Select Post-Processor

    Navigate 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. 3

    Step 3 — Configure Post Settings

    The 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. 4

    Step 4 — Generate the G-Code File

    Click 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. 5

    Step 5 — Inspect and Transfer to Machine

    Scan 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.

SECTION 7

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.

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

Post-processor behavior varies significantly by machine type

✦

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.

SECTION 8

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.

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)

How this lesson's concepts extend into advanced CAM territory

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.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

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?
Show answer
A toolpath is a machine-neutral sequence of coordinates and parameters stored internally by Fusion 360. Different CNC controllers (Fanuc, GRBL, Haas, etc.) expect G-code formatted in slightly different ways: some require program numbers, others do not; arc commands may use I/J offsets or radius notation; feed rate units may differ. The post-processor acts as a translator that reads the generic toolpath data and outputs a correctly formatted G-code file for the specific controller. Without the post-processor, the machine would receive code it cannot parse or, worse, misinterpret, leading to incorrect or dangerous motion.

Question 2: BASIC 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?
Show answer
Using the feed rate conversion: F (mm/min) = f (mm/rev) × S (rev/min) = 0.08 × 8000 = 640 mm/min. The post-processor would output F640 (or F640.0 if the controller expects a decimal point). This conversion is one of the many small but critical transformations the post-processor handles automatically, ensuring that the feed rate specified in the CAM setup is expressed in the units the machine controller expects.

Question 3: INTERMEDIATE

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.
Show answer
At the transition between the two operations, you would expect: (1) a retract move (G00 Z_safe) lifting the tool to a safe height—derived from toolpath data with the retract height set in the post-processor; (2) spindle stop (M05)—injected by the post-processor's tool-change routine; (3) a tool-change command (T02 M06)—generated by the post-processor using the tool number from the CAM setup; (4) new spindle speed and start (S18000 M03)—spindle speed from the toolpath, command format from the post; (5) new tool length compensation (G43 H02)—post-processor maps the tool number to the offset register; (6) rapid positioning to the new operation's start point (G00 X_ Y_)—from toolpath data. The post-processor structures the sequence and formats each command, while the numerical values originate from the CAM setup.

Question 4: APPLIED

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.
Show answer
The workflows are identical through design, CAM setup, and toolpath generation—your model, operations, tools, feeds, and speeds do not change. The workflows diverge at the post-processing step. For the Shopbot, you select the Shopbot OpenSBP post-processor (.cps), which outputs a .sbp file using Shopbot's proprietary command set (MS for move speed, CG for cut arc, etc.) and expresses feed rates in inches per second. For the GRBL machine, you select the grbl.cps post-processor, which outputs a .gcode file using standard G-code (G00, G01, G02) with feed rates in mm/min. You must also verify that the GRBL post matches the machine's firmware version and arc resolution settings. After post-processing, each file is transferred to its respective machine using the appropriate interface (Shopbot 3 software for the PRS Alpha, a serial terminal like UGS for the GRBL router). The creative content is preserved identically; only the delivery format differs.

Question 5: CRITICAL 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?
Show answer
While the RS-274 / ISO 6983 standard provides a common foundation, it was published in 1958 and left many behaviors optional or undefined—leading manufacturers to implement proprietary extensions, modal defaults, and formatting conventions that diverge significantly. Historically, each controller manufacturer optimized for its hardware constraints, resulting in dialects as varied as regional languages sharing a common root. Technically, machines differ in axis configurations (3-axis vs. 5-axis vs. rotary), tool-change mechanisms (manual vs. ATC), and even numerical precision. Practically, a command that is safe on one machine (e.g., G28 for home return) may behave dangerously on another if the home position is defined differently. A truly universal post-processor would require either a comprehensive machine description format that encodes every aspect of a controller's expectations (similar to what the MTConnect standard attempts for data reporting) or a shift to a higher-level language like STEP-NC (ISO 14649), which embeds machining intent rather than explicit coordinates. Until the industry converges on such a standard—and every existing machine is updated—post-processors remain an essential, creative-practice-enabling layer of the digital fabrication pipeline.

SUMMARY

Lesson Summary

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)