G-code Preview — API Reference
    Preparing search index...

    @chestnutlabs/gcode-dialects — dialect adapter contracts & registry (DD-005).

    Phase 1 (#73): behavioral contracts, buffered annotation sink, and the composition runner. Built-in vendor adapters arrive in phases 3–5. Depends only on @chestnutlabs/toolpath-core; the parser consumes the runner through its own structural DialectRunnerFactory type (worker entries compose the two — DD-002 §5 boundaries).

    Implements

    Index

    Constructors

    Methods

    • Apply buffered annotations to the finished IR (channels + header) and merge this adapter's contribution into the shared metadata object. Range ops are clamped to the real segment count — a lying adapter cannot write outside the buffers, and geometry channels are unreachable by construction.

      Parameters

      Returns void

    • Write a FeatureRole index for segments [segStart, segEnd] (bounds validated at apply).

      Parameters

      • segStart: number
      • segEnd: number
      • role: number

      Returns void

    • objectValue is the 1-based object-channel value (DD-001: v indexes ir.objects[v-1]).

      Parameters

      • segStart: number
      • segEnd: number
      • objectId: number

      Returns void

    • Enrich a tool's identity (material, '#RRGGBB' color) — merged into ir.tools (DD-005 phase 5).

      Parameters

      • tool: number
      • info: { colorHex?: string; material?: string }

      Returns void

    • Parameters

      • code: string
      • message: string
      • OptionalsrcByte: number

      Returns void