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.
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 source | Typical form | What it can show |
|---|---|---|
| Direct command | G90, M83, M104 | Explicitly changes positioning, extrusion, temperature or another target/state. |
| Value sequence | X / Y / Z / E / F | Differences between adjacent lines help identify direction, deposition, retraction and layer changes. |
| Slicer comment | ;LAYER, ;TYPE, ;FEATURE | Provides slicer intent such as a layer number, wall or infill; exact labels are slicer-specific rather than universal. |
| External machine state | Config, macros, sensors, mechanics | Determines final execution and usually cannot be reconstructed completely from an ordinary G-code file. |
Travel and extrusion are contextual
Travel move
G1 X80 Y40 F9000The toolhead moves without a positive extrusion change.
Extrusion move
M83
G1 X120 Y40 E1.6 F1800Relative 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 ; primeThis 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 conflate | Key distinction | How to tell in a file |
|---|---|---|
| Travel / retraction | Travel 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 move | Layer 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 speed | F 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 material | E 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 / retraction | Pressure 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
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.
- LinuxCNC — line format, words, comments and modal groups
- Marlin Firmware — G-code index
- Marlin Firmware — Linear Advance
- Klipper — supported and extended G-code commands
- Klipper — Pressure Advance
- Duet3D — RepRapFirmware G-code dictionary
- Prusa Knowledge Base — layers and perimeters
- Prusa Knowledge Base — travel, retraction and stringing
- Prusa Knowledge Base — requested and realized print speed