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
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
syntaxPieceNodeLazyLinkedListNode<SyntaxPiece>jsonJsonObject
ComposeRotation(JsonObject, Mat4d)
Composes the tilt rotation into ProgramToMcTransform.
public static void ComposeRotation(JsonObject json, Mat4d tiltMat)
Parameters
jsonJsonObjecttiltMatMat4d
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
Returns
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
Returns
GetCurrentMode(JsonObject)
Gets the current node's existing tilt mode (e.g., from initializer).
public static string GetCurrentMode(JsonObject json)
Parameters
jsonJsonObject
Returns
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
jsonJsonObjectparsingJsonObject
Returns
WriteSection(JsonObject, string, JsonObject)
Writes the TiltTransform debug section to the JsonObject.
public static void WriteSection(JsonObject json, string mode, JsonObject additionalParams = null)
Parameters
jsonJsonObjectThe target JsonObject.
modestringActive tilt mode string (e.g., “G68.2”, “G69”).
additionalParamsJsonObjectOptional G-code parameters (I,J,K,X,Y,Z etc.) for debug output.