Table of Contents

Class NcSynthesisConverter

Namespace
Hi.NcParsers.NcWriteback
Assembly
HiMech.dll

Synthesis-mode INcPieceConverter — the brand-agnostic stream stage of the no-source-text path: walks the source pieces in execution order, asks a fresh INcSentenceComposer for the lines each piece spells, and materializes them as destination pieces with the src↔dst map (each composed line becomes one destination piece, mapped n:1 back to the source piece that authored it; the composer's header rides on the first content piece, its trailer on the last walked piece). All dialect knowledge lives in the composer — targeting another brand means another INcSentenceComposer, not another converter.

public class NcSynthesisConverter : INcPieceConverter
Inheritance
NcSynthesisConverter
Implements
Inherited Members
Extension Methods

Constructors

NcSynthesisConverter(Func<INcSentenceComposer>)

Creates a converter over the given composer factory; the factory is invoked once per Convert(IEnumerable<SyntaxPiece>, NcDstPieceFactory, NcDiagnosticProgress) run so each stream walk gets a fresh modal state.

public NcSynthesisConverter(Func<INcSentenceComposer> composerFactory)

Parameters

composerFactory Func<INcSentenceComposer>

Properties

ComposerFactory

Per-run composer factory (fresh modal state per conversion).

public Func<INcSentenceComposer> ComposerFactory { get; }

Property Value

Func<INcSentenceComposer>

TargetBrand

Target dialect token; one of the CncBrandDependency brand constants.

public string TargetBrand { get; }

Property Value

string

Methods

Convert(IEnumerable<SyntaxPiece>, NcDstPieceFactory, NcDiagnosticProgress)

Converts the executed source piece stream into the destination piece stream plus the src↔dst map. Pieces must come from a single source file, in execution order. Problems are reported through conversionProgress with the source piece as the sentence anchor.

public NcConversion Convert(IEnumerable<SyntaxPiece> syntaxPieces, NcDstPieceFactory dstPieceFactory, NcDiagnosticProgress conversionProgress)

Parameters

syntaxPieces IEnumerable<SyntaxPiece>

Finished source pieces (final pipeline layer), execution order.

dstPieceFactory NcDstPieceFactory

Factory stamping identity (file path / file index / fresh SentenceIndex) onto the destination pieces.

conversionProgress NcDiagnosticProgress

Diagnostic sink for the manipulation scenario (conversion/optimization) — keep it separate from the NC play diagnostic home; may be null.

Returns

NcConversion

The destination stream and mapping; never null.

CreateFanuc()

Creates the NX-CL → Fanuc NC converter (FanucNcSentenceComposer with its defaults).

public static NcSynthesisConverter CreateFanuc()

Returns

NcSynthesisConverter