Table of Contents

Class StrokeLimitUtil

Namespace
Hi.NcParsers.Dependencys
Assembly
HiMech.dll

Load-time audit helpers for IStrokeLimitConfig: which machine-coordinate axes the chain has, and which of them the stroke limit check cannot judge because no limit is configured. Both checks — the per-block StrokeLimitCheckSemantic and the per-step CheckStrokeLimit(DVec3d, IProgress<IMessage>) — compare only axes that carry a limit, so a machine file without limits passes every position silently while EnableStrokeLimitCheck reads as on. The session begin reports that gap once through these helpers.

public static class StrokeLimitUtil
Inheritance
StrokeLimitUtil
Inherited Members

Fields

McAxisNames

Machine-coordinate axis names, linear first then rotary.

public static readonly string[] McAxisNames

Field Value

string[]

Methods

DescribeUnlimitedAxes(IEnumerable<string>, Func<string, double?>, Func<string, double?>)

Describes the axes among axisNames that the stroke limit check cannot judge: an axis with neither end configured is listed by name, an axis with one end only is listed with the missing end ("Z (no negative limit)"). Empty when every axis has both ends. A limit of NaN or ±infinity counts as not configured (the legacy HardNcEnv boxes default to an infinite box).

public static List<string> DescribeUnlimitedAxes(IEnumerable<string> axisNames, Func<string, double?> positiveLimit, Func<string, double?> negativeLimit)

Parameters

axisNames IEnumerable<string>

The axes to audit, normally GetChainAxisNames(IXyzabcChain, bool).

positiveLimit Func<string, double?>

Positive-end limit per axis; null when not configured.

negativeLimit Func<string, double?>

Negative-end limit per axis; null when not configured.

Returns

List<string>

GetChainAxisNames(IXyzabcChain, bool)

The machine-coordinate axes chain actually has: an axis counts when a transformer is bound to its name (GetTransformerX()GetTransformerC()). A three-axis chain yields X, Y, Z only; a null chain yields nothing.

public static List<string> GetChainAxisNames(IXyzabcChain chain, bool linearOnly = false)

Parameters

chain IXyzabcChain

The machine chain, or null.

linearOnly bool

When true, only the translation axes (X, Y, Z) are returned. A travel audit wants this: a linear axis always has a finite travel, so a missing limit is unambiguously a gap, while a rotary table that turns continuously legitimately has none and cannot be given one.

Returns

List<string>