Table of Contents

Class ToolOffsetTable

Namespace
Hi.NcParsers.Dependencys.Generic
Assembly
HiMech.dll

Integer-keyed tool offset table implementing IToolOffsetConfig. Suitable for Fanuc (H/D), Heidenhain (tool number), Mazak, Okuma, and other ISO-compatible controllers. Key = offset number (Fanuc H or D number).

public class ToolOffsetTable : INcDependency, IMakeXmlSource, IToolOffsetConfig
Inheritance
ToolOffsetTable
Implements
Inherited Members
Extension Methods

Constructors

ToolOffsetTable()

public ToolOffsetTable()

ToolOffsetTable(XElement)

public ToolOffsetTable(XElement src)

Parameters

src XElement

Properties

Offsets

public Dictionary<int, ToolOffsetRow> Offsets { get; set; }

Property Value

Dictionary<int, ToolOffsetRow>

XName

public static string XName { get; }

Property Value

string

Methods

GetToolHeightOffset_mm(int)

Gets the effective tool height offset (geometry - wear) in mm. Returns 0 if the offset number is not configured.

public double GetToolHeightOffset_mm(int offsetNumber)

Parameters

offsetNumber int

Offset number: Fanuc H number, Heidenhain tool number, etc.

Returns

double

GetToolRadiusOffset_mm(int)

Gets the effective tool radius offset (geometry - wear) in mm. Returns 0 if the offset number is not configured.

public double GetToolRadiusOffset_mm(int offsetNumber)

Parameters

offsetNumber int

Offset number: Fanuc D number, Heidenhain tool number, etc.

Returns

double

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.

SetToolOffset(int, double, double, double, double)

Sets all four offset components for the given offset number.

public void SetToolOffset(int offsetNumber, double idealHeight_mm, double axialWear_mm, double idealRadius_mm, double radialWear_mm)

Parameters

offsetNumber int
idealHeight_mm double
axialWear_mm double
idealRadius_mm double
radialWear_mm double