What this glossary explains

A G-code file contains more than command names. It also contains concepts such as travel, extrusion, retraction, layer height and pressure compensation. These ideas describe what a sequence of commands is trying to accomplish.

The definitions connect each term to lines you can see in a G-code file and explain what this browser viewer does or does not show.

Concept ≠ command

Travel, layer height and retraction describe relationships between actions and state; each does not necessarily map to one fixed command. Identify them using prior modes, current coordinates, E-value changes, slicer comments and the target firmware.

Three layers of meaning

Motion

Coordinates, planes and feed rates describe where and how the tool moves.

Material

Extrusion and retraction state determine whether a move deposits, primes or withdraws filament.

Machine state

Modal commands and firmware settings change how later numeric values are interpreted.

How six foundation concepts connect

Where a concept leaves evidence

Evidence sourceTypical formWhat it can show
Direct commandG90, M83, M104Explicitly changes positioning, extrusion, temperature or another target/state.
Value sequenceX / Y / Z / E / FDifferences between adjacent lines help identify direction, deposition, retraction and layer changes.
Slicer comment;LAYER, ;TYPE, ;FEATUREProvides slicer intent such as a layer number, wall or infill; exact labels are slicer-specific rather than universal.
External machine stateConfig, macros, sensors, mechanicsDetermines final execution and usually cannot be reconstructed completely from an ordinary G-code file.

Travel and extrusion are contextual

Travel move

G1 X80 Y40 F9000

The toolhead moves without a positive extrusion change.

Extrusion move

M83
G1 X120 Y40 E1.6 F1800

Relative extrusion is active, so E1.6 deposits filament during the move.

G90             ; absolute X/Y/Z
M83             ; relative E
G1 Z0.20 F600   ; reach print height
G1 X60 E1.20    ; move and deposit
G1 E-0.80       ; retract
G0 X90 Y40      ; travel to the next area
G1 E0.80        ; prime

This sequence contains positioning modes, a layer-height clue, extrusion, retraction, travel and priming. No line can be interpreted correctly without the earlier G90/M83 state and current position.

Concepts that are easy to confuse

Do not conflateKey distinctionHow to tell in a file
Travel / retractionTravel changes location; retraction temporarily pulls filament back to reduce ooze. They often occur together but are different actions.Check X/Y/Z motion, then interpret negative, positive or unchanged E under M82/M83.
Layer height / Z moveLayer height is the thickness between printed layers. A Z-hop also moves Z but does not automatically create a new layer.Compare Z levels of deposited paths and use layer comments as supporting evidence; do not count every Z change as a layer.
Feed rate / actual speedF requests a programmed feed rate. Short paths may never reach it because of acceleration, junction limits and machine capability.G-code shows the requested F; actual velocity also requires firmware planning and machine configuration.
E value / deposited materialE normally describes an input-filament coordinate or length; it does not prove that an equal volume of plastic left the nozzle.The file gives a commanded amount; real deposition also depends on filament diameter, flow multiplier, temperature, slip and blockage.
Pressure advance / retractionPressure advance compensates dynamically as extrusion speed changes; retraction usually withdraws and restores filament around travel. They can coexist.Retraction is often visible through E changes or G10/G11; pressure advance may come from firmware config, M900, M572 or a Klipper extension.

Terms can vary by system

3D-printer firmware, slicers and CNC controllers sometimes use the same word for different behavior—or different words for the same goal. “Pressure advance,” for example, maps to different commands and value models across firmware families.

Glossary pages therefore link a plain-language concept to its command context instead of treating one firmware’s vocabulary as universal.

Learn by the problem you are solving

First file

Start with absolute/relative positioning, then G0/G1 and extrusion mode. This answers where the tool goes and whether the move deposits.

Diagnose stringing

Inspect travel, retraction, path choice, temperature and pressure control together. More retraction alone cannot fix wet filament, excess heat or every path issue.

Surface quality

Compare layer height, feed rate, extrusion and pressure advance on the same path, remembering that F does not prove the machine reached that speed.

What the viewer can show

What you can see in the file

The viewer can show supported movements, extrusion changes, coordinate modes, and some details saved by the slicer. It cannot confirm the printer's settings or predict exactly how the physical printer will move.

How to use a term page

  • Start with the concise definition, then check the code example.
  • Follow the related command context when a modal state changes the result.
  • Use the viewer note to separate what the file shows from what only the printer can decide.

Official sources used for this guide

Reviewed on August 5, 2026 against primary firmware, controller and slicer documentation. Definitions use the shared meaning and keep system-specific differences explicit.