Table of Contents

Namespace Hi.NcParsers.Keywords

Classes

BlockSkip

Optional block skip marker extracted from the head of an NC block. ISO 6983 / Fanuc calls this feature Block Delete (BDT switch); Siemens / Syntec / Mazak use the same / prefix with matching behaviour.

The section is only present on blocks that carry a / prefix. Whether the block's NC commands are actually skipped at runtime depends on IBlockSkipConfig:

  • Config absent or the Layer bit OFF → the / prefix is consumed, Body is left null, and the rest of the line parses as a regular NC block (comments still take effect).
  • Config present and the Layer bit ON → the rest of the line is moved into Body and cleared from UnparsedText, so downstream parsing syntaxes see nothing and no NC action is emitted. Comment syntaxes run before this one so comments (and any embedded CsScript) still take effect.
Not a comment: a comment is static metadata, block skip is a runtime toggle that can change per machine/operator setting.
CannedCycle

Section key holder + concrete implementation for ICannedCycleDef.

Comment

Comment extracted from an NC block. Symbol identifies the comment style; Text holds the content without the symbol. Downstream syntaxes (e.g., CsScript) may further trim Text after extracting embedded markers.

CompoundMotion

Section key holder + concrete implementation for ICompoundMotionDef.

Coolant

Section key holder + concrete implementation for ICoolantDef.

CoordinateOffset

Work coordinate offset state written by IsoCoordinateOffsetSyntax. Property names are used as JSON keys via nameof.

Managed commands (ISO): G54, G55, G56, G57, G58, G59, G59.1–G59.9. Siemens: G54–G57 + G505–G599 (extended), G500 to cancel. Heidenhain: CYCL DEF 247 (Datum Preset) / CYCL DEF 7 (Datum Shift).

CsScript
Dwell

Section key holder + concrete implementation for IDwellDef.

Feedrate

Section key holder + concrete implementation for IFeedrateDef.

IndexNote
LocalCoordinateOffset

Local coordinate offset state (G52) written by IsoLocalCoordinateOffsetSyntax. Property names are used as JSON keys via nameof.

ISO: G52 X Y Z (local coordinate system shift, additive to G54 series). Cancelled by G52 X0 Y0 Z0 or M30 (program end). Siemens equivalent: TRANS / ATRANS (handled by separate syntax).

Motion

Section key holder + concrete implementation for IMotionDef.

PathSmoothing

Section key holder for IPathSmoothingDef.

PlaneSelect

Section key holder for IPlaneSelectDef.

ProgramBoundary

Program start/end delimiter line (e.g., % in Fanuc/Mazak/Syntec, %_N_xxx_MPF in Siemens). Not a comment — the controller uses it as a tape/file boundary marker.

ProgramEnd

Section key holder for IProgramEndDef.

ProgramStop

Section key holder + concrete implementation for IProgramStopDef.

RadiusCompensation

Section key holder + concrete implementation for IRadiusCompensationDef.

SpindleControl

Section key holder + concrete implementation for ISpindleControlDef.

SpindleOrientation

Section key holder + concrete implementation for ISpindleOrientationDef.

SpindleSpeed

Section key holder + concrete implementation for ISpindleSpeedDef.

TiltTransform

Concrete class for ITiltTransformDef section serialization.

ToolHeightCompensation
Unit

Section key holder + concrete implementation for IUnitDef.

Interfaces

IArcMotionDef

Arc motion data written by CircularMotionSyntax. Stored under the Motion JSON section alongside IMotionDef properties.

ICannedCycleDef

Canned cycle modal state (Group 09). Captures which cycle is currently active, its return mode (G98/G99), and the resolved absolute parameter set used for modal lookback.

Written by CannedCycleResolveSyntax on every block that belongs to the canned-cycle group: cycle code present (G81/G82/G83/G73/G84/G74/G85/G86/G89/G76/G87), modal repeat (cycle still active, only coordinates given), or explicit cancel (G80).

Term = "G80" is the explicit-cancel sentinel used by FindPreviousActiveCycle(LazyLinkedListNode<SyntaxPiece>, string[]) to terminate modal lookback without ambiguity; regular blocks (e.g. G00 X.. Y..) simply omit the section entirely.

ICompoundMotionDef

Compound motion section definition for commands that produce multiple sub-operations (G28, G53.1, G81, G82, etc.). Contains a ItemsKey array resolved by Hi.NcParsers.Semantics.CompoundMotionSemanticUtil.

Item types (discriminated by key presence):

ICoolantDef

Coolant state (M07 mist / M08 flood / M09 off). Written by CoolantSyntax. Modal — persists until changed.

IsOn is the on/off convenience flag (true for M07 and M08, false for M09). Mode carries the abstract kind (Flood / Mist / Off) for consumers that need to distinguish flood vs mist.

IDwellDef

Dwell/pause section definition for use inside Sequence items. Resolved by Hi.NcParsers.Semantics.CompoundMotionSemanticUtil into ActDelay.

IFeedrateDef

Feedrate state written by FeedrateSyntax. Property names are used as JSON keys via nameof.

ISO standard: F command + G94 (per minute) / G95 (per revolution). Supported by all major CNC brands.

IFlagsDef
IMachineCoordinateDef
IMotionDef

Motion state written by LinearMotionSyntax. Property names are used as JSON keys via nameof.

ISO standard: G00 (rapid) / G01 (linear feed) are Group 01 modal codes.

IParsingDef
IPathSmoothingDef

Path smoothing state written by PathSmoothingSyntax.

ISO/Fanuc G05.1 Q1 (enable) / G05.1 Q0 (disable): high-precision contour control / AICC / Nano Smoothing. Controller-internal interpolation black box — simulation records the state but does not alter the tool path.

IPlaneSelectDef

Active plane selection state written by PlaneSelectSyntax. Property names are used as JSON keys via nameof.

ISO: G17/G18/G19. Heidenhain: implicit from L/CC syntax. Plane is stored as the conventional axis-pair name (XY/ZX/YZ), not as brand-specific G-codes.

IPositioningModeDef

JsonObject key for positioning mode (G90 absolute / G91 incremental). Written by PositioningModeSyntax, consumed by IncrementalResolveSyntax and canned cycle syntaxes.

IProgramEndDef

Program end marker (M02/M30). Written by ProgramEndSyntax. Other syntaxes (e.g. IsoLocalCoordinateOffsetSyntax) read this section to reset modal state instead of detecting M30 directly.

IProgramStopDef

Program-stop marker (M00 unconditional / M01 optional). Written by ProgramStopSyntax on each block that carries an M00/M01 flag. Non-modal: the section appears only on the exact block where the stop code is present.

Distinct from IProgramEndDef (M02/M30, end of program).

M00 halts execution unconditionally; the operator must press Cycle Start to resume. M01 is an optional stop gated by the operator's "Optional Stop" panel switch — ignored when the switch is off. This parsing-layer section records the NC intent; runtime / semantic layers decide whether to actually pause.

IProgramXyzDef
IRadiusCompensationDef

Radius compensation state written by RadiusCompensationSyntax. Property names are used as JSON keys via nameof.

Managed commands (ISO): G41 (left), G42 (right), G40 (cancel). When active, the tool path is offset perpendicular to the programmed path by Radius_mm. The root ProgramXyz retains the user-programmed position; MachineCoordinate is overwritten to reflect the compensated path.

ISpindleControlDef

Spindle control item for use inside ItemsKey arrays. Resolved by Hi.NcParsers.Semantics.CompoundMotionSemanticUtil into ActSpindleDirection.

ISpindleOrientationDef

Oriented spindle stop item for use inside ItemsKey arrays. Commands the spindle to stop at a specific angular position (OSS). Resolved by Hi.NcParsers.Semantics.CompoundMotionSemanticUtil into ActSpindleOrientation.

ISpindleSpeedDef

Spindle speed and direction state written by SpindleSpeedSyntax. Property names are used as JSON keys via nameof.

ISO: S command for speed, M03/M04/M05 for direction. Heidenhain: M3/M4/M5. Siemens: M3/M4/M5 or SPOS. Direction is stored as the conventional SpindleDirection enum name (CW/CCW/STOP), not as brand-specific M-codes.

ITiltTransformDef

Tilt transform state written by tilt transform syntaxes. Property names are used as JSON keys via nameof.

Managed commands (ISO/Fanuc): G68 (2D rotation), G68.2 (tilted work plane), G69 (cancel). Siemens equivalent: CYCLE800, ROT/AROT (handled by separate syntax). Heidenhain equivalent: PLANE SPATIAL / PLANE RESET (handled by separate syntax).

IToolHeightCompensationDef

Tool height compensation state written by ToolHeightOffsetSyntax. Property names are used as JSON keys via nameof. The JSON section can be deserialized to an instance implementing this interface.

Managed commands (ISO/Fanuc): G43, G44, G49. Fanuc extension: G43.4 (TCPM — parsed only in Fanuc syntax list). Siemens equivalent: TRAFOOF/TRAORI (handled by separate syntax). Heidenhain equivalent: TOOL CALL / M128/M129 (handled by separate syntax).

ITransformationDef

Chain of named ProgramXyz → MachineCoordinate transformation entries, evaluated at the block endpoint. Stored as a JsonArray of entries, each with “Source” and “Mat4d” keys. Each contributing INcSyntax adds or replaces its own entry by source name. GetComposedTransform(JsonObject) composes entries in order: McXyz = ProgramXyz * T[0] * T[1] * ... * T[n].

"EndPoint" semantic — each Mat4d is a snapshot valid only for this block's endpoint state (endpoint ABC, endpoint tool orientation, etc.). For RTCP blocks where rotary axes change across the block, intermediate CL-point positions cannot be derived by applying this matrix to an interpolated ProgramXyz — the semantic layer (ClLinearMotionSemantic) handles per-step IK separately. Consumers must not treat the composed matrix as globally applicable across a rotary contour.

IUnitDef

Unit-system state (ISO Group 06: G20 inch / G21 metric). Written by UnitModeSyntax. Modal.

HiNC's NC pipeline works exclusively in millimetres. G21 is therefore a no-op confirmation of the default; G20 is reported as an Unsupported Error and callers are expected to pre-convert the NC program to metric before loading.

IUnparsedTextDef