Table of Contents

Namespace Hi.NcParsers.ParsingSyntaxs.Heidenhain.CyclDefSyntaxs

Classes

HeidenhainDatumSettingSyntax

Heidenhain syntax of

CYCL DEF 247 DATUM SETTING
and its DIN/ISO twin
G247 Q339=+N
(both spellings stamp the same cycle-number record for the Logic-side datum-preset resolver).
HeidenhainDatumShiftSyntax

Heidenhain syntax of

CYCL DEF 7 DATUM SHIFT
and its DIN/ISO twin
G54
WITH axis words (G54 X+50 Y+50 shifts the datum, zero values cancel it — a declaration, never a motion block; the bare G54 spelling stays on the Fanuc-style work-offset select path).
HeidenhainMachiningCycleSyntax

Captures the body of a machining CYCL DEF (every cycle number without a dedicated owner — the datum family 7/247 and the tolerance family 32 keep their own syntaxes) into a structured Parsing.MachiningCycle record: { Number, Title?, Params?, Args? }.

  • Params — every Qnnn=value assignment in the head and body lines. Literal values are stored as JSON numbers (via ToFloat(string) — a string node would read as an unevaluated variable downstream); Q-reference values stay strings for the evaluator to substitute in place.
  • Q mirror — each captured assignment is also mirrored into Parsing.Assignments (raw string RHS): on a real TNC the cycle definition genuinely assigns those Q parameters, and pre-P4 corpus behavior (each parameter line was its own sentence consumed by the bare-assignment capture) already routed them into the volatile Q store. The mirror keeps that store contract intact now that the ~-grouped sentence is claimed here first.
  • Title — the non-assignment remainder of the head line (e.g. PLANFRAESEN).
  • Args — any other non-assignment body remainder, swept into the record so residue (e.g. CYCL DEF 19.1 A90 B0 C105 rotary words) can never leak into axis captures — the PLANE-family precedent from P3.
The ISO mapping and the armed/modal bookkeeping happen in HeidenhainCannedCycleSyntax. Multi-line capture is covered by regular unit tests rather than the conformance examples below (the conformance shorthand is single-line only).
HeidenhainMirrorCyclSyntax

Structures the klartext CYCL DEF 8 MIRROR IMAGE cycle (grouped 8.0 MIRROR IMAGE / 8.1 X Y, or the single-line spelling) into the same Parsing.MirrorImageKey statement list its DIN/ISO twin G28 writes, so the shared HeidenhainMirrorTransformSyntax simulates both dialects through one code path. Runs after HeidenhainCyclDefSyntax (which contributes Parsing[“CYCL DEF”] = 8 + CyclHead) and ahead of HeidenhainMachiningCycleSyntax, whose generic capture would otherwise route the cycle to the unsupported-cycle path.

The cycle body is the manual's bare axis letters (a bare 8.1 cancels the mirror). A body carrying anything else — a valued word, an unknown token — is not claimed at all: the block falls through to the generic machining-cycle capture and its HeidenhainCycl--Unsupported report, which is the correct fail-soft. Claiming it would silently reduce to an empty axis list, i.e. read a shape we do not understand as a mirror reset.

HeidenhainToleranceCyclSyntax

Structures the klartext CYCL DEF 32 TOLERANCE cycle (grouped 32.0 TOLERANCE / 32.1 T0.1 / 32.2 HSC-MODE:0 TA0.5 or the single-line forms) into Parsing.TOLERANCE { T?, HscMode?, Ta? } for HeidenhainPathSmoothingSyntax. Runs after HeidenhainCyclDefSyntax (which contributes Parsing[“CYCL DEF”] = 32 + CyclHead). A bare 32.0 line (no T) is a tolerance reset and records Bare: true. The glued corpus spelling 32.2HSC-MODE:0 leaves a digit-prefixed residue after the CyclDef prefix strip — the HSC grab tolerates it.