Table of Contents

Class HeidenhainMirrorCyclSyntax

Namespace
Hi.NcParsers.ParsingSyntaxs.Heidenhain.CyclDefSyntaxs
Assembly
HiMech.dll

Structures the klartext CYCL DEF 8 MIRROR IMAGE cycle (grouped 8.0 MIRROR IMAGE / 8.1 X Y, or the single-line spelling) into the same Parsing.MirrorImageKey statement list its DIN/ISO twin G28 writes, so the shared HeidenhainMirrorTransformSyntax simulates both dialects through one code path. Runs after HeidenhainCyclDefSyntax (which contributes Parsing[“CYCL DEF”] = 8 + CyclHead) and ahead of HeidenhainMachiningCycleSyntax, whose generic capture would otherwise route the cycle to the unsupported-cycle path.

The cycle body is the manual's bare axis letters (a bare 8.1 cancels the mirror). A body carrying anything else — a valued word, an unknown token — is not claimed at all: the block falls through to the generic machining-cycle capture and its HeidenhainCycl--Unsupported report, which is the correct fail-soft. Claiming it would silently reduce to an empty axis list, i.e. read a shape we do not understand as a mirror reset.

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

Examples

The grouped two-axis form — the cycle keys are consumed and the statement joins the shared list (block text stays authoritative for round-trip emission): #BeforeBuild:

{
  "UnparsedText": "X Y",
  "Parsing": { "CYCL DEF": 8, "CyclHead": "MIRROR IMAGE" }
}

#AfterBuild:

{ "Parsing": { "MirrorImage": [ { "Axes": ["X", "Y"] } ] } }

A bare 8.1 line cancels the mirror — an empty axis list, the same shape the ISO bare G28 records: #BeforeBuild:

{
  "UnparsedText": "",
  "Parsing": { "CYCL DEF": 8, "CyclHead": "MIRROR IMAGE" }
}

#AfterBuild:

{ "Parsing": { "MirrorImage": [ { "Axes": [] } ] } }

Single-line spelling — the axis line landed in CyclHead instead of the body (the tolerance-cycle precedent): #BeforeBuild:

{ "Parsing": { "CYCL DEF": 8, "CyclHead": "X" } }

#AfterBuild:

{ "Parsing": { "MirrorImage": [ { "Axes": ["X"] } ] } }

A rotary letter is recorded like any other and left for the Logic gate to reject — the dialects must not disagree on scope: #BeforeBuild:

{
  "UnparsedText": "C",
  "Parsing": { "CYCL DEF": 8, "CyclHead": "MIRROR IMAGE" }
}

#AfterBuild:

{ "Parsing": { "MirrorImage": [ { "Axes": ["C"] } ] } }

A valued word is not the manual's mirror form: nothing is claimed, so the generic machining-cycle capture still reports the cycle unsupported instead of this syntax reading it as a reset: #BeforeBuild:

{
  "UnparsedText": "X+0",
  "Parsing": { "CYCL DEF": 8, "CyclHead": "MIRROR IMAGE" }
}

#AfterBuild:

{
  "UnparsedText": "X+0",
  "Parsing": { "CYCL DEF": 8, "CyclHead": "MIRROR IMAGE" }
}

Another cycle number is none of this syntax's business: #BeforeBuild:

{
  "UnparsedText": "T0.05",
  "Parsing": { "CYCL DEF": 32, "CyclHead": "TOLERANCE" }
}

#AfterBuild:

{
  "UnparsedText": "T0.05",
  "Parsing": { "CYCL DEF": 32, "CyclHead": "TOLERANCE" }
}

Constructors

HeidenhainMirrorCyclSyntax()

Initializes a new instance with default settings.

public HeidenhainMirrorCyclSyntax()

HeidenhainMirrorCyclSyntax(XElement)

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

public HeidenhainMirrorCyclSyntax(XElement src)

Parameters

src XElement

Source XML element.

Fields

CyclNumber

CYCL DEF number this syntax structures.

public const int CyclNumber = 8

Field Value

int

TitleConst

Title word of the cycle's .0 line.

public const string TitleConst = "MIRROR"

Field Value

string

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