Class HeidenhainDatumTable
- Namespace
- Hi.NcParsers.Dependencys
- Assembly
- HiMech.dll
Heidenhain datum preset and datum shift tables. CYCL DEF 247 Q339=N reads from DatumPresetTable, CYCL DEF 7 #N reads from DatumShiftTable. Each table maps an integer ID (1–20) to a Vec3d offset.
On real Heidenhain controllers, preset and datum tables are separate
disk files (e.g. TNC:\table\preset.pr, *.d) — distinct
from MP-prefixed Machine Parameters (held by
HeidenhainParameterTable). HiNC mirrors that separation
by keeping this dependency independent of HeidenhainParameterTable.
Implements IIsoCoordinateConfig by mapping the ISO/DIN G54–G59 codes to preset rows 1–6, the conventional Heidenhain compatibility mapping for ISO/DIN programs running on a Heidenhain.
public class HeidenhainDatumTable : IIsoCoordinateConfig, INcDependency, IMakeXmlSource
- Inheritance
-
HeidenhainDatumTable
- Implements
- Inherited Members
- Extension Methods
Constructors
HeidenhainDatumTable()
public HeidenhainDatumTable()
HeidenhainDatumTable(XElement)
public HeidenhainDatumTable(XElement src)
Parameters
srcXElement
Properties
CoordinateIds
Enumerates the G-code coordinate ids that this provider currently has data for.
public IEnumerable<string> CoordinateIds { get; }
Property Value
DatumPresetTable
public Dictionary<int, Vec3d> DatumPresetTable { get; set; }
Property Value
DatumShiftTable
public Dictionary<int, Vec3d> DatumShiftTable { get; set; }
Property Value
XName
public static string XName { get; }
Property Value
Methods
GetCoordinateOffset(string)
Gets the offset for the given G-code coordinate id. Returns null when no offset is configured for that id by this provider (callers iterate the next provider, or fall back to Zero).
public Vec3d GetCoordinateOffset(string coordId)
Parameters
coordIdstring
Returns
GetDatumPreset(int)
public Vec3d GetDatumPreset(int q339)
Parameters
q339int
Returns
GetDatumShift(int)
public Vec3d GetDatumShift(int tableId)
Parameters
tableIdint
Returns
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.
SetCoordinateOffset(string, Vec3d)
Sets the offset for the given G-code coordinate id.
public void SetCoordinateOffset(string coordId, Vec3d offset)
Parameters
SetDatumPreset(int, Vec3d)
public void SetDatumPreset(int q339, Vec3d offset)
Parameters
SetDatumShift(int, Vec3d)
public void SetDatumShift(int tableId, Vec3d offset)