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

    A filament retraction (retract) or its reversal (unretract) — an E-only move with no XYZ travel, so it has a position but no segment in the main stream (DD-009 D1 amendment, #148). Kept in a sparse side channel so segment indices, scrub, and layer ranges are untouched. segIndex is the index of the next segment emitted after the event, for layer/scrub-aligned marker clipping.

    interface RetractionEvent {
        kind: "retract" | "unretract";
        segIndex: number;
        srcByte: number;
        x: number;
        y: number;
        z: number;
    }
    Index

    Properties

    Properties

    kind: "retract" | "unretract"
    segIndex: number

    Segment index at the moment of the event (draw-range clip alignment).

    srcByte: number

    Byte offset in the source for scrub/telemetry alignment.

    x: number

    Position (same frame as segments: origin-relative).

    y: number
    z: number