Table of Contents

Interface ISiemensToolOffsetConfig

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

Siemens (840D/Sinumerik) tool offset configuration. Offsets are addressed by (tool number T, cutting edge D number), unlike IToolOffsetConfig where a single integer selects the row.

Siemens stores up to 25 data fields per cutting edge ($TC_DP1..$TC_DP25), including three independent length components (L1/L2/L3 for Z/X/Y directions), radius, and corresponding wear values.

public interface ISiemensToolOffsetConfig
Extension Methods

Methods

GetToolHeightOffset_mm(int, int)

Gets the effective tool height offset in mm for a specific tool and cutting edge: $TC_DP3 (length 1, typically Z direction) plus its additive wear $TC_DP12 — Sinumerik wear values are added, a shortened tool carries negative wear. Returns 0 if the tool/edge is not configured.

double GetToolHeightOffset_mm(int toolNumber, int edgeNumber)

Parameters

toolNumber int

Tool number (T).

edgeNumber int

Cutting edge number (D).

Returns

double

GetToolLengthOffset_mm(int, int, int)

Gets an additional length offset for the specified direction. directionIndex: 0 = L1 ($TC_DP3, Z), 1 = L2 ($TC_DP4, X), 2 = L3 ($TC_DP5, Y). Returns 0 if not configured.

double GetToolLengthOffset_mm(int toolNumber, int edgeNumber, int directionIndex)

Parameters

toolNumber int
edgeNumber int
directionIndex int

Returns

double

GetToolRadiusOffset_mm(int, int)

Gets the effective tool radius offset in mm for a specific tool and cutting edge: $TC_DP6 (radius) plus its additive wear $TC_DP15. Returns 0 if the tool/edge is not configured.

double GetToolRadiusOffset_mm(int toolNumber, int edgeNumber)

Parameters

toolNumber int

Tool number (T).

edgeNumber int

Cutting edge number (D).

Returns

double

TryGetToolHeightOffset_mm(int, int, out double)

Attempts to get the effective tool height offset in mm ($TC_DP3 plus additive wear $TC_DP12) for a specific tool and cutting edge. Returns false when the (tool, edge) pair has no configured row, so the caller can fall back to another source (e.g. the generic IToolOffsetConfig). This is the only reliable miss signal — 0.0 is a legal configured offset, so the zero returned by GetToolHeightOffset_mm(int, int) cannot distinguish a vacant row from a configured zero.

bool TryGetToolHeightOffset_mm(int toolNumber, int edgeNumber, out double offset_mm)

Parameters

toolNumber int

Tool number (T).

edgeNumber int

Cutting edge number (D).

offset_mm double

The effective height offset; 0 on miss.

Returns

bool