Namespace Hi.NcParsers.Semantics
Classes
- ClLinearMotionSemantic
Resolves ClLinear motion into CL-level linear interpolation with per-step inverse kinematics. Used when RTCP (G43.4/TRAORI/M128) is active and rotary axes change, producing ActClDerivedMcXyzabcContour.
The CL (cutter location) endpoints are derived from MC endpoints via forward kinematics, then interpolated linearly. The MC path is non-linear because the tool orientation changes during the move.
- CompoundMotionSemantic
Resolves ICompoundMotionDef into acts by delegating ItemsKey to ResolveItems(JsonArray, LazyLinkedListNode<SyntaxPiece>, Vec3d, IRapidFeedrateConfig, IMachineAxisConfig).
- CoolantSemantic
Resolves the ICoolantDef JSON section (written by CoolantSyntax from M07/M08/M09) into an ActCooling act. Only emits when the coolant mode changes from the previous block — modal state is suppressed so downstream consumers (e.g. StateActRunner) see one act per real transition rather than one per block.
- CsScriptBeginSemantic
Resolves BeginScript into ActLineCsScript. Must be placed at the beginning of NcSemanticList so that the script runs before motion and other acts.
- CsScriptEndSemantic
Resolves EndScript into ActLineCsScript. Must be placed at the end of NcSemanticList so that the script runs after motion and other acts.
- CsScriptSemantic
Base class for resolving CsScript JSON entries into ActLineCsScript. Subclasses specify which script key to read (BeginScript or EndScript).
Also supports an external script dictionary via ExternalScripts. When set, each NC block's FileLineIndex is looked up in the dictionary and the matched script is emitted as an additional ActLineCsScript. This allows runtime injection of per-line scripts without modifying the NC file.
- MachineCoordinateStepSemantic
Read MachineCoordinate from MachineCoordinate in JsonObject and produce ActMcXyzStep. Requires ProgramXyzSyntax to have computed McXyz first.
- McArcMotionSemantic
Resolves McArc motion into ActFeedrate + ActMcXyzSpiralContour. Reads arc center, plane normal, and direction from the Hi.Motion section written by CircularMotionSyntax.
- McLinearMotionSemantic
Resolves McLinear motion into ActFeedrate/ActRapid + ActMcXyzLinearContour or ActMcXyzabcLinearContour.
Discriminates by checking whether rotary axis values (A/B/C) are present in MachineCoordinate:
- XYZ only → ActMcXyzLinearContour
- XYZABC → ActMcXyzabcLinearContour with Fanuc
composite feedrate:
d = √(ΔX² + ΔY² + ΔZ² + ΔA_deg² + ΔB_deg² + ΔC_deg²)
- SpindleSpeedSemantic
Resolves ISpindleSpeedDef section into ActSpindleSpeed and ActSpindleDirection. Only emits when spindle speed or direction actually changes from the previous block.
- StrokeLimitCheckSemantic
Reports a diagnostic error when MachineCoordinate exceeds the stroke limits defined in IStrokeLimitConfig. Does not emit any IAct; only produces diagnostics.
- ToolChangeSemantic
Resolves SectionName section into ActToolingStep (when M06 is present) or ActToolingTeleport (T-code only, no M06). Reads ToolingTime for the change duration.
Interfaces
- INcSemantic
Resolves SyntaxPiece into IAct sequence. Unlike INcSyntax which only transforms data in-place, INcSemantic produces machine actions from the parsed syntax data.