Table of Contents

Class TiltTransformUtil

Namespace
Hi.NcParsers.LogicSyntaxs
Assembly
HiMech.dll

Shared utilities for all tilt transform syntaxes (ISO, Siemens, Heidenhain). Handles section IO, backward lookback, and ProgramToMcTransform composition.

public static class TiltTransformUtil
Inheritance
TiltTransformUtil
Inherited Members

Fields

TransformSource

Identifier used as the transform source key when composing the tilt rotation into ProgramToMcTransform.

public const string TransformSource = "TiltTransform"

Field Value

string

Methods

CarryForwardFromPrevious(LazyLinkedListNode<SyntaxPiece>, JsonObject)

Carries forward the tilt transform from a previous node when the current block has no new tilt command. Shared by all tilt syntaxes (G68, G68.2, CYCLE800, PLANE SPATIAL).

public static void CarryForwardFromPrevious(LazyLinkedListNode<SyntaxPiece> syntaxPieceNode, JsonObject json)

Parameters

syntaxPieceNode LazyLinkedListNode<SyntaxPiece>
json JsonObject

ComposeRotation(JsonObject, Mat4d)

Composes the tilt rotation into ProgramToMcTransform. Tilt is a fixed geometric rotation per block, so the entry is always KindStatic.

public static void ComposeRotation(JsonObject json, Mat4d tiltMat)

Parameters

json JsonObject
tiltMat Mat4d

FindPreviousMode(LazyLinkedListNode<SyntaxPiece>)

Returns the tilt mode written on the immediately previous block, or null when none. Each prior block is guaranteed to carry a TiltTransform section (LogicSyntax-stage authored, or PostSyntax-stage carried by ModalCarrySyntax), so a single-step lookup replaces the legacy EnumerateBack() walk.

public static string FindPreviousMode(LazyLinkedListNode<SyntaxPiece> node)

Parameters

node LazyLinkedListNode<SyntaxPiece>

Returns

string

FindPreviousTiltMat(LazyLinkedListNode<SyntaxPiece>)

Returns the tilt Mat4d stored on the immediately previous block's transform list, or Idt when none.

public static Mat4d FindPreviousTiltMat(LazyLinkedListNode<SyntaxPiece> node)

Parameters

node LazyLinkedListNode<SyntaxPiece>

Returns

Mat4d

GetCurrentMode(JsonObject)

Gets the current node's existing tilt mode (e.g., from initializer).

public static string GetCurrentMode(JsonObject json)

Parameters

json JsonObject

Returns

string

TryHandleG69(JsonObject, JsonObject)

Handles G69 cancellation: writes identity tilt and consumes G69 from Flags. Idempotent — safe to call from multiple tilt syntaxes. Returns true if G69 was found and handled.

public static bool TryHandleG69(JsonObject json, JsonObject parsing)

Parameters

json JsonObject
parsing JsonObject

Returns

bool

WriteSection(JsonObject, string, JsonObject)

Writes the TiltTransform debug section to the JsonObject.

public static void WriteSection(JsonObject json, string mode, JsonObject additionalParams = null)

Parameters

json JsonObject

The target JsonObject.

mode string

Active tilt mode string (e.g., “G68.2”, “G69”).

additionalParams JsonObject

Optional G-code parameters (I,J,K,X,Y,Z etc.) for debug output.