Class RotaryAxisUtil
- Namespace
- Hi.NcParsers.LogicSyntaxs
- Assembly
- HiMech.dll
Shared utilities for rotary axis (A/B/C) resolution. Used by G53p1RotaryPositionSyntax, McAbcSyntax, IsoG68p2TiltSyntax, and other syntaxes that read or write rotary axis values.
public static class RotaryAxisUtil
- Inheritance
-
RotaryAxisUtil
- Inherited Members
Methods
ConsumeAxis(JsonObject, string, ISentenceCarrier, NcDiagnosticProgress)
Consumes an optional axis value (degrees) from Parsing. Post-processor hints (e.g., A/B/C on G68.2 or G53.1 lines) are parsed by FloatTagSetupSyntax into Parsing as doubles. Returns the value and removes the key, or null if not present.
A non-numeric value (e.g. "#124" left by the parser stage)
raises VariableExpression--Unevaluated via
GetParsedDouble(JsonObject, string, ISentenceCarrier, NcDiagnosticProgress) instead of silently dropping
the post-processor hint. The key is consumed regardless so downstream
syntaxes do not re-process it.
public static double? ConsumeAxis(JsonObject parsing, string axisName, ISentenceCarrier sentenceCarrier, NcDiagnosticProgress diag)
Parameters
parsingJsonObjectaxisNamestringsentenceCarrierISentenceCarrierdiagNcDiagnosticProgress
Returns
GetRotaryAxes(IMachineAxisConfig)
Gets the rotary axis names from the given IMachineAxisConfig. Returns an empty array if no rotary axes exist.
public static string[] GetRotaryAxes(IMachineAxisConfig axisConfig)
Parameters
axisConfigIMachineAxisConfig
Returns
- string[]