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

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.

public static void ComposeRotation(JsonObject json, Mat4d tiltMat)

Parameters

json JsonObject
tiltMat Mat4d

FindPreviousMode(LazyLinkedListNode<SyntaxPiece>)

Finds the previous tilt mode from backward nodes. Returns null if no tilt section found.

public static string FindPreviousMode(LazyLinkedListNode<SyntaxPiece> node)

Parameters

node LazyLinkedListNode<SyntaxPiece>

Returns

string

FindPreviousTiltMat(LazyLinkedListNode<SyntaxPiece>)

Finds the previous tilt Mat4d from the ProgramToMcTransform chain. Returns identity if not found.

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

ParseDouble(JsonNode)

Parses a double from a JsonNode that may be a number or a string. Returns 0 if null or unparseable.

public static double ParseDouble(JsonNode node)

Parameters

node JsonNode

Returns

double

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.