Class HeidenhainToolOffsetSyntax
- Namespace
- Hi.NcParsers.LogicSyntaxs.Heidenhain
- Assembly
- HiMech.dll
Heidenhain-specific: klartext TOOL CALL always applies tool-length
compensation (there is no cancel word — HardNc compensates
unconditionally). On TOOL CALL blocks the effective height =
GetToolHeightOffset_mm(int)(tool id) +
the TOOL CALL's DL delta; the shared ToolHeightCompensation
section is written (Term = “TOOL CALL”, OffsetId = tool id —
the offset id is documented as the Heidenhain tool number) and the
translation composes into the transform chain via the shared
ToolHeightCompensation source (mutual exclusion with the ISO
G43 sibling by same-source replace).
Modal: on following blocks the section is re-resolved per block from the table (mirroring the Siemens D sibling — give-way when a same block ISO term took ownership; carry Term/OffsetId/Delta_mm otherwise). Must sit after ToolHeightOffsetSyntax (the ISO anchor — last writer wins on mixed-dialect blocks) and after HeidenhainToolChangeSyntax (reads its ToolChange section), before the pivot/tilt syntaxes.
public class HeidenhainToolOffsetSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
- Inheritance
-
HeidenhainToolOffsetSyntax
- Implements
- Inherited Members
- Extension Methods
Examples
TOOL CALL block — height from the injected tool-offset table (tool 2 = 120 mm) plus DL 0.5; the G49 sentinel written by the ISO anchor is overwritten: #BeforeBuild:
{
"ToolChange": { "ToolId": 2, "IsChange": true, "Term": "TOOL CALL", "DL": 0.5 },
"ToolHeightCompensation": { "Offset_mm": 0, "Term": "G49", "OffsetId": 0 }
}
#AfterBuild:
{
"ToolChange": { "ToolId": 2, "IsChange": true, "Term": "TOOL CALL", "DL": 0.5 },
"ToolHeightCompensation": { "Offset_mm": 120.5, "Term": "TOOL CALL", "OffsetId": 2, "Delta_mm": 0.5 },
"ProgramToMcTransform": [
{
"Source": "ToolHeightCompensation",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,120.5,1]
}
]
}
Constructors
HeidenhainToolOffsetSyntax()
Initializes a new instance with default settings.
public HeidenhainToolOffsetSyntax()
HeidenhainToolOffsetSyntax(XElement)
Initializes a new instance by deserializing from the given XML element.
public HeidenhainToolOffsetSyntax(XElement src)
Parameters
srcXElementSource XML element.
Fields
DeltaKey
Section key carrying the TOOL CALL DL delta so modal re-resolution keeps it.
public const string DeltaKey = "Delta_mm"
Field Value
Term
Ownership term recorded in the shared section.
public const string Term = "TOOL CALL"
Field Value
Properties
Name
Syntax kind name (typically the concrete type name).
public string Name { get; }
Property Value
XName
XML element name used to register this syntax with XFactory.
public static string XName { get; }
Property Value
Methods
Build(LazyLinkedListNode<SyntaxPiece>, List<INcDependency>, NcDiagnosticProgress)
Build syntax arrangement into the
syntaxPieceNode in-place.
public void Build(LazyLinkedListNode<SyntaxPiece> syntaxPieceNode, List<INcDependency> ncDependencyList, NcDiagnosticProgress ncDiagnosticProgress)
Parameters
syntaxPieceNodeLazyLinkedListNode<SyntaxPiece>ncDependencyListList<INcDependency>ncDiagnosticProgressNcDiagnosticProgress
MakeXmlSource(string, string, bool)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)
Parameters
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif true, the extended file creation is suppressed.
Returns
- XElement
An XML element representing the object's state
Remarks
For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The baseDirectory is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.
Reg(XFactory)
Registers this type's deserializer with the given XFactory
(or Default when factory is
null). Idempotent.
public static void Reg(XFactory factory = null)
Parameters
factoryXFactory