Table of Contents

Interface IRadiusCompensationDef

Namespace
Hi.NcParsers.Keywords
Assembly
HiMech.dll

Radius compensation state written by RadiusCompensationSyntax. Property names are used as JSON keys via nameof.

Managed commands (ISO): G41 (left), G42 (right), G40 (cancel). Heidenhain Klartext maps RL → G41, RR → G42, R0 → G40. When active, the tool path is offset perpendicular to the programmed path by Radius_mm; Side determines left vs right. The root ProgramXyz retains the user-programmed position; MachineCoordinate is overwritten to reflect the compensated path.

public interface IRadiusCompensationDef
Extension Methods

Examples

Active (G41 D5, radius 2.5 mm):

"RadiusCompensation": {
  "Side": "Left",
  "Term": "G41",
  "OffsetId": 5,
  "Radius_mm": 2.5
}

Cancelled (G40, modal D preserved):

"RadiusCompensation": {
  "Side": "None",
  "Term": "G40",
  "OffsetId": 5
}

Properties

OffsetId

Offset number (Fanuc D number) selecting the radius in the tool offset table. Modal — preserved across G40 blocks so the next G41/G42 without an explicit D continues to reference the same row, matching real Fanuc/Siemens behaviour.

int OffsetId { get; set; }

Property Value

int

Radius_mm

Unsigned compensation radius in mm, looked up from the tool offset table. Real controller tool tables hold the radius as a non-negative geometry value (wear/delta sits in a separate column); this property mirrors that convention. Direction is encoded by Side. Omitted from the JSON section when Side is SideNone.

double Radius_mm { get; set; }

Property Value

double

Side

Compensation direction: SideNone, SideLeft, or SideRight.

string Side { get; set; }

Property Value

string

Term

CNC term: “G41”, “G42”, or “G40”.

string Term { get; set; }

Property Value

string