Current extruder position, tracked by applyExtrusion and reset by G92
Width of extruded material, in millimeters, as announced by the slicer,
or undefined while no comment has announced one.
Fed by ;WIDTH: comments (PrusaSlicer family) via the slicer metadata
pipeline (see Job.beginCommand). An announced width outranks both the
one the caller supplied and the one derived from the moves: the slicer
states what it asked the printer for, while the derivation infers it.
The Job resolves that order when it starts a path.
Whether the axes have been homed (G28).
Height of the extruded line, in millimeters, as announced by the slicer,
or undefined while no comment has announced one.
Shift between the logical G-code coordinates and the physical position,
created by G92: physical = logical + positionShift.
G92 gives the current position new coordinates without moving the
printhead. The state keeps tracking the physical position in x/y/z,
so move handlers add this shift to incoming X/Y/Z parameters to translate
them back into physical space. Mirrors Marlin's position_shift, and is
kept separate from future home offsets (M206/M428) so the two can compose.
E is deliberately not part of the shift: as in Marlin, G92 E sets the
extruder position (e) directly.
Whether E parameters are relative distances (M83) rather than absolute extruder positions (M82).
Defaults to absolute, matching every major firmware (Marlin, Klipper, RepRapFirmware, Smoothieware). A file that uses relative E without saying so reads as one long retraction and renders as travel moves only. Slicers always emit M82 or M83, so that only affects hand-written gcode -- and guessing the other way would misread the declared-absolute files this exists to get right.
Currently active tool
Current units (millimeters or inches)
Current X position, or undefined until the axis is homed (G28)
Current Y position, or undefined until the axis is homed (G28)
Current Z position, or undefined until the axis is homed (G28)
StaticinitialGets a new State instance with default initial values
New State with an un-homed (unknown) position, e=0, tool=0, units='mm'
Represents the current state of the print job
Remarks
Tracks the current position, extrusion state, active tool, and units