Table of Contents

Class PolarGCodeCheckSyntax

Namespace
Hi.NcParsers.LogicSyntaxs
Assembly
HiMech.dll

Warns on G-codes that Fanuc disallows during Polar Coordinate Interpolation (G12.1), per the manual whitelist mirrored from HardNc IsGCodePolarModeCompatible (IncompatibleDiagId).

Placed FIRST in the Logic bundle so the scan sees Parsing Flags before the mode/plane/offset syntaxes consume their codes — at the old in-place check position, G17/G18/G19, G20/G21, G49, G53.1 and G68/G69 cancels had already been eaten and passed silently. Polar-active detection needs no valve of its own: the PREVIOUS block's PolarInterpolationState is already final (the whole Logic bundle ran for it) unless this block exits with G13.1; a block entering with G12.1 is checked too.

Residual blind spot (documented): codes captured as Parsing sub-objects by ParameterizedFlagSyntax in the Parsing bundle (G28, G43/G44, G43.4, G05.1, G52, G54.1, G68/G68.2, canned cycles) never reach Flags and stay outside the scan. They cannot corrupt the polar trajectory — the plane normal is fixed by the polar pair — so the gap is diagnostic-only, same as HardNc's own per-code parse-time check.

public class PolarGCodeCheckSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
Inheritance
PolarGCodeCheckSyntax
Implements
Inherited Members
Extension Methods

Constructors

PolarGCodeCheckSyntax()

Initializes a new instance with default settings.

public PolarGCodeCheckSyntax()

PolarGCodeCheckSyntax(XElement)

Initializes a new instance by deserializing from the given XML element.

public PolarGCodeCheckSyntax(XElement src)

Parameters

src XElement

Source XML element.

Properties

Name

Syntax kind name (typically the concrete type name).

public string Name { get; }

Property Value

string

XName

XML element name used to register this syntax with XFactory.

public static string XName { get; }

Property Value

string

Methods

Build(LazyLinkedListNode<SyntaxPiece>, List<INcDependency>, NcDiagnosticProgress)

Build syntax arrangement into the syntaxPieceNode in-place.

public void Build(LazyLinkedListNode<SyntaxPiece> syntaxPieceNode, List<INcDependency> ncDependencyList, NcDiagnosticProgress ncDiagnosticProgress)

Parameters

syntaxPieceNode LazyLinkedListNode<SyntaxPiece>
ncDependencyList List<INcDependency>
ncDiagnosticProgress NcDiagnosticProgress

MakeXmlSource(string, string, bool)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if true, the extended file creation is suppressed.

Returns

XElement

An XML element representing the object's state

Remarks

For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied. The baseDirectory is typically the folder at the nearest configuration file folder. Since the folder can be moving with the configuration file.

Reg(XFactory)

Registers this type's deserializer with the given XFactory (or Default when factory is null). Idempotent.

public static void Reg(XFactory factory = null)

Parameters

factory XFactory