Table of Contents

Class PolarPairDef

Namespace
Hi.Numerical.Args
Assembly
HiMech.dll

Axis mapping of a Polar Coordinate Interpolation pair (PolarModeDirEnum): which program/machine axes carry the radius, the plane depth, and the rotation.

The polar math itself runs in "triple space" — the Rxcz vector (linear/radius, hypothetical, depth) with the plane normal fixed at the third component — and is pair-independent; this definition maps the triple's ends onto real axes: NC words on the way in, machine coordinates on the way out. The plane normal equals the rotary's rotation axis (C about Z, A about X, B about Y), so NormalIndex doubles as the ABC component of the angle.

The lathe diameter-programming convention (the radius word arrives doubled) applies to the X axis only, i.e. the XC pair — mirroring HardNc PolarEntry, which halves X unconditionally. HardNc's own YA/ZB slots are dead code (never selected); its ProgramOrthogonalPlaneNormal table carried swapped normals for them, corrected alongside this implementation.

public sealed class PolarPairDef
Inheritance
PolarPairDef
Inherited Members
Extension Methods

Fields

XC

X linear + C rotary about Z (the standard turn-mill pair).

public static readonly PolarPairDef XC

Field Value

PolarPairDef

YA

Y linear + A rotary about X.

public static readonly PolarPairDef YA

Field Value

PolarPairDef

ZB

Z linear + B rotary about Y.

public static readonly PolarPairDef ZB

Field Value

PolarPairDef

Properties

DepthWord

NC word of the depth (normal-axis) coordinate.

public string DepthWord { get; }

Property Value

string

Dir

The Dir string stored in the polar state section.

public string Dir { get; }

Property Value

string

IsDiameterProgrammed

Whether the radius word arrives as a diameter (halved on parse) — the lathe X convention, XC only.

public bool IsDiameterProgrammed { get; }

Property Value

bool

KeepIndex

Axis index untouched by the polar pair (frozen in acts).

public int KeepIndex { get; }

Property Value

int

LinearIndex

Axis index (0/1/2 = X/Y/Z) carrying the radius.

public int LinearIndex { get; }

Property Value

int

LinearWord

NC word of the radius coordinate (“X”/“Y”/“Z”).

public string LinearWord { get; }

Property Value

string

Mode

The pair this definition describes.

public PolarModeDirEnum Mode { get; }

Property Value

PolarModeDirEnum

NormalIndex

Axis index of the plane normal = the rotation axis; also the depth axis and the ABC component of the machine angle.

public int NormalIndex { get; }

Property Value

int

RotaryAxis

Machine rotary letter (“A”/“B”/“C”) — also the NC word of the hypothetical coordinate and the per-axis config key.

public string RotaryAxis { get; }

Property Value

string

Methods

ComposeAbc(double, Vec3d)

Composes a machine ABC vector: the pair's rotary component set to angle_rad, the others inherited from baseAbc_rad.

public Vec3d ComposeAbc(double angle_rad, Vec3d baseAbc_rad)

Parameters

angle_rad double
baseAbc_rad Vec3d

Returns

Vec3d

ComposePoint(double, double, Vec3d)

Composes a program/machine point from triple-space values: radius on the linear axis, depth on the normal axis, the keep axis inherited from basePoint.

public Vec3d ComposePoint(double radius, double depth, Vec3d basePoint)

Parameters

radius double
depth double
basePoint Vec3d

Returns

Vec3d

FromDir(string)

Resolves a pair from its Dir string (“XC”/“YA”/“ZB”); unknown values fall back to XC.

public static PolarPairDef FromDir(string dir)

Parameters

dir string

Returns

PolarPairDef

FromMode(PolarModeDirEnum)

Resolves a pair from its PolarModeDirEnum.

public static PolarPairDef FromMode(PolarModeDirEnum mode)

Parameters

mode PolarModeDirEnum

Returns

PolarPairDef

GetRotary_rad(Vec3d)

The pair's rotary component of a machine ABC vector.

public double GetRotary_rad(Vec3d abc_rad)

Parameters

abc_rad Vec3d

Returns

double