Current in-progress path
All paths in the job
Current print state
Statistics accumulated while interpreting the job's G-code
Gets the total number of layers in the job
Number of layers
Checks if the job contains planar extrusion layers
True if the job contains at least one layer, false otherwise
Gets paths organized by tool
2D array of paths, where each sub-array contains paths for a specific tool
Advances the job to the next command the interpreter executes
Called by the interpreter once per command, in file order. Every parsed
line yields exactly one command, so counting them gives the current line
index — which is how line-indexed slicer metadata is mapped onto the
command stream: extrusion dimension changes (;WIDTH: / ;HEIGHT:
comments) recorded at or before this line are folded into the state here.
The in-progress path is deliberately left alone: the move handlers break
it via continuePath when the state no longer matches, which keeps a
streamed parse identical to a one-shot parse — the interpreter resumes
the last path at every chunk boundary, undoing any break performed here.
Returns the path the next move of the given type should extend
Type of the move about to be added
The in-progress path when it can continue, otherwise a fresh one
The in-progress path continues only while its type, its extrusion
dimensions and its tool still match the state; dimension metadata (see
beginCommand) or a tool change that altered the state since the path
was started breaks it here, so every path carries a single width, height
and tool. Deciding this lazily at move time (and not when the metadata or
tool is applied) keeps streamed and one-shot parses identical: the
interpreter resumes the last finished path at every chunk boundary, which
would undo an eager break.
Resolves the current state's position for rendering.
The position as concrete x, y, z numbers
Represents a complete print job containing paths, layers, and state
Remarks
Manages the collection of paths, organizes them into layers and tools, and tracks the current print state