gcode-preview - v3.0.0-alpha.5
    Preparing search index...

    Class Interpreter

    Interprets and executes G-code commands, updating the job state accordingly

    This class looks up each command in the handler registry and executes it, translating commands into movements and state changes in the print job. It supports common G-code commands including linear moves (G0/G1), arcs (G2/G3), unit changes (G20/G21), homing (G28), position setting (G92), and tool selection. Commands without a registered handler are ignored.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Executes an array of G-code commands, updating the provided job

      Parameters

      • commands: GCodeCommand[]

        Array of GCodeCommand objects to execute

      • job: Job = ...

        Job instance to update (default: new Job)

      Returns Job

      The updated job instance