Table of Contents

Class RadiusCompensationBuf

Namespace
Hi.Numerical
Assembly
HiUniNc.dll

Buffer for radius compensation (G41/G42) operations in numerical control.

At each line junction, the offset paths of adjacent lines may form an intersection (intersected rays) or align directly (parallel rays). For straight lines, the tool goes to the intersection point. For arcs, the offset curve doesn't pass through the intersection, so transient points bridge the gap: Arc → TransientEnd → (linear) → Intersection → (linear) → TransientBegin → NextArc.

Transient properties are null when rays are parallel (offset paths align, no corner needed) or when the adjacent line is not an arc.

public class RadiusCompensationBuf
Inheritance
RadiusCompensationBuf
Inherited Members
Extension Methods

Constructors

RadiusCompensationBuf()

Initializes a new instance of the RadiusCompensationBuf class.

public RadiusCompensationBuf()

Properties

CenterProgramPos

Arc only. The circle center in program coordinates, computed from the arc's IJK values and the begin position by ResolveRadiusCompensation(LinkedListNode<HardNcLine>, HardNcEnv, NcNoteCache, IProgress<IMessage>). Null until the walk has resolved this arc: a region never closed by G40 before the end of the file, a walk that threw on an earlier block, or a walk driven by a direct GetActs(HardNcEnv, HardNcLine, HardNcLine, IProgress<IMessage>) call leaves it null and NcProc reports CircleCenterNotFound instead of emitting the spiral.

public vec3d_t? CenterProgramPos { get; set; }

Property Value

vec3d_t?

CompensatedPosOnProgramCoordinate

The compensated tool-tip position on program coordinates (after radius offset). For straight lines, this is the intersection of the adjacent offset lines. For parallel rays, this is a direct perpendicular offset from the program position. Can be Cartesian XYZ or Polar Coordinate Interpolation Mode (G12.1) XCZ.

public vec3d_t CompensatedPosOnProgramCoordinate { get; set; }

Property Value

vec3d_t

TransientBeginMc

Arc only. Machine coordinates corresponding to TransientBeginProgramPos.

public dvec3d_t TransientBeginMc { get; set; }

Property Value

dvec3d_t

TransientBeginProgramPos

Arc only. The point on this arc's offset curve where the arc motion begins, when the previous line's offset path intersects at a corner. Null when rays are parallel (no corner) or the previous line is not intersecting. Set by the previous line's iteration in ResolveRadiusCompensation(LinkedListNode<HardNcLine>, HardNcEnv, NcNoteCache, IProgress<IMessage>).

public vec3d_t? TransientBeginProgramPos { get; set; }

Property Value

vec3d_t?

TransientEndMc

Arc only. Machine coordinates corresponding to TransientEndProgramPos.

public dvec3d_t TransientEndMc { get; set; }

Property Value

dvec3d_t

TransientEndProgramPos

Arc only. The point on this arc's offset curve where the arc motion ends, when the next line's offset path intersects at a corner. Null when rays are parallel (no corner) or the next line is not intersecting. Set by the current line's iteration in ResolveRadiusCompensation(LinkedListNode<HardNcLine>, HardNcEnv, NcNoteCache, IProgress<IMessage>).

public vec3d_t? TransientEndProgramPos { get; set; }

Property Value

vec3d_t?

Methods

ResolveRadiusCompensation(LinkedListNode<HardNcLine>, HardNcEnv, NcNoteCache, IProgress<IMessage>)

Resolves radius compensation for the given node.

public static bool ResolveRadiusCompensation(LinkedListNode<HardNcLine> srcNode, HardNcEnv ncEnv, NcNoteCache ncLineCache, IProgress<IMessage> mixedProgress)

Parameters

srcNode LinkedListNode<HardNcLine>

The source node to resolve radius compensation for.

ncEnv HardNcEnv

The numerical control environment.

ncLineCache NcNoteCache

The NC line cache for storing messages.

mixedProgress IProgress<IMessage>

The message host for reporting issues.

Returns

bool

True if radius compensation was resolved; otherwise, false.

Remarks

Blocks without in-plane movement of their own (comments, empty lines, a bare G41/G40, M/F/S-only blocks, dwells, plunges along the plane normal, zero-length moves) never take part in a corner. Before the region's first moving block the start-up is pending (Fanuc: a G41/G42 block without movement starts up on the next movement block), so such blocks keep their nominal position; afterwards they carry the previous block's offset vector. Corners are resolved between the moving blocks on either side of them, and a region that ends without further movement (a bare G40) ends with the perpendicular offset of its last moving block, so a comment or empty line inserted anywhere in the region leaves the compensated path unchanged. The controller's overcut rule for two or more consecutive executable blocks without movement is not emulated: the corner is always the intersection.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.