Class IsoCoordinateTable
- Namespace
- Hi.NcParsers.Dependencys.Generic
- Assembly
- HiMech.dll
Coordinate table for NC controller. The dictionary key is a G-code coordinate name (e.g. “G54”, “G59.2”); the dictionary value is machine coordinate offset.
public class IsoCoordinateTable : Dictionary<string, Vec3d>, IDictionary<string, Vec3d>, ICollection<KeyValuePair<string, Vec3d>>, IReadOnlyDictionary<string, Vec3d>, IReadOnlyCollection<KeyValuePair<string, Vec3d>>, IEnumerable<KeyValuePair<string, Vec3d>>, IDictionary, ICollection, IEnumerable, IDeserializationCallback, ISerializable, INcDependency, IMakeXmlSource
- Inheritance
-
IsoCoordinateTable
- Implements
- Inherited Members
- Extension Methods
Constructors
IsoCoordinateTable()
Ctor.
public IsoCoordinateTable()
IsoCoordinateTable(XElement)
Initializes a new instance of the IsoCoordinateTable class from XML. Supports both new string ID format (“G54”) and legacy integer format (54000).
public IsoCoordinateTable(XElement src)
Parameters
srcXElementThe XML element containing coordinate data.
Fields
XName
Gets the XML element name for the IsoCoordinateTable.
public static string XName
Field Value
Methods
LegacyIntToKey(int)
Converts a legacy 1000x integer ID to a G-code string key. e.g. 54000 -> “G54”, 59200 -> “G59.2”.
public static string LegacyIntToKey(int id)
Parameters
idint
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.