Table of Contents

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.

Brand-agnostic standalone implementation of IIsoCoordinateConfig. Brand parameter tables (Fanuc, Syntec, Siemens, Heidenhain) provide hardware-faithful alternatives that map to real controller parameters.

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, IIsoCoordinateConfig, INcDependency, IMakeXmlSource
Inheritance
IsoCoordinateTable
Implements
Inherited Members
Extension Methods

Constructors

IsoCoordinateTable()

Creates the brand-neutral table seeded with every id of G54Series (G54–G59 and G59.1–G59.9) at zero.

public IsoCoordinateTable()

IsoCoordinateTable(IEnumerable<string>)

Creates a table seeded with seedIds at zero — the shape a runner wants this provider to carry next to a brand table (see ExtendedG59x).

public IsoCoordinateTable(IEnumerable<string> seedIds)

Parameters

seedIds IEnumerable<string>

Coordinate ids to seed; null seeds nothing.

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

src XElement

The XML element containing coordinate data.

Fields

XName

Gets the XML element name for the IsoCoordinateTable.

public static string XName

Field Value

string

Properties

CoordinateIds

Enumerates the G-code coordinate ids that this provider currently has data for.

public IEnumerable<string> CoordinateIds { get; }

Property Value

IEnumerable<string>

ExtendedG59x

A table carrying only the extended G59xSeries (G59.1–G59.9) — the rows the Fanuc-family parameter tables do not map. The Fanuc, Mazak and Syntec presets mount one behind their brand table through IsoCoordinateTableProxy, so the two providers' id sets are disjoint and CoordinateOffsetUtil.ResolveOffset's first-non-null walk never has to choose between them.

public static IsoCoordinateTable ExtendedG59x { get; }

Property Value

IsoCoordinateTable

Methods

DeepClone()

Returns an independent copy (entries and their offset vectors). Used by IsoCoordinateTableProxy to clone its seed into a host that has no table yet.

public IsoCoordinateTable DeepClone()

Returns

IsoCoordinateTable

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

coordId string

Returns

Vec3d

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

id int

Returns

string

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

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if 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

factory XFactory

SetCoordinateOffset(string, Vec3d)

Sets the offset for the given G-code coordinate id.

public void SetCoordinateOffset(string coordId, Vec3d offset)

Parameters

coordId string
offset Vec3d