Class PolarPairDef
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
YA
Y linear + A rotary about X.
public static readonly PolarPairDef YA
Field Value
ZB
Z linear + B rotary about Y.
public static readonly PolarPairDef ZB
Field Value
Properties
DepthWord
NC word of the depth (normal-axis) coordinate.
public string DepthWord { get; }
Property Value
Dir
The Dir string stored in the polar state section.
public string Dir { get; }
Property Value
IsDiameterProgrammed
Whether the radius word arrives as a diameter (halved on parse) — the lathe X convention, XC only.
public bool IsDiameterProgrammed { get; }
Property Value
KeepIndex
Axis index untouched by the polar pair (frozen in acts).
public int KeepIndex { get; }
Property Value
LinearIndex
Axis index (0/1/2 = X/Y/Z) carrying the radius.
public int LinearIndex { get; }
Property Value
LinearWord
NC word of the radius coordinate (“X”/“Y”/“Z”).
public string LinearWord { get; }
Property Value
Mode
The pair this definition describes.
public PolarModeDirEnum Mode { get; }
Property Value
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
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
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
Returns
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
Returns
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
dirstring
Returns
FromMode(PolarModeDirEnum)
Resolves a pair from its PolarModeDirEnum.
public static PolarPairDef FromMode(PolarModeDirEnum mode)
Parameters
modePolarModeDirEnum
Returns
GetRotary_rad(Vec3d)
The pair's rotary component of a machine ABC vector.
public double GetRotary_rad(Vec3d abc_rad)
Parameters
abc_radVec3d