Table of Contents

Class SiemensPathSmoothingSyntax

Namespace
Hi.NcParsers.LogicSyntaxs.Siemens
Assembly
HiMech.dll

Records the Siemens path-control / smoothing modal registers into the brand-invariant PathSmoothing section (fields per ISiemensPathSmoothingDef): the G-code groups G60/G64/G641/G642 (path control) and G601/G602 (exact-stop criterion) from Flags, the bare modal words FNORM / SOFT / BRISK / FFWON / FFWOF / COMPCAD / COMPON / COMPOF / UPATH / SPATH (captured by the preset's FlagSyntax word list), and the Parsing.CYCLE832 call sub-object (captured by SiemensCycleCallSyntax) whose first argument arms the high-speed tolerance (0 / empty parentheses cancel it).

Record-only — simulation does not alter the tool path (same contract as the Fanuc G05.1 sibling FanucPathSmoothingSyntax, which this class replaces in the Siemens preset: that one reads only the Parsing["G05.1"] sub-object no Siemens capture produces). IsEnabled is derived — true while a CYCLE832 tolerance is armed or the path-control group sits on a continuous-path mode (G64/G641/G642).

Modal behavior: a block touching any group starts from a clone of the previous block's section, applies the touched groups and rewrites the section; untouched blocks write nothing and ModalCarrySyntax (whose TrackedKeys already contain PathSmoothing) carries the previous section forward. The stream's first block stamps a conservative { IsEnabled: false } default — the actual delivered state of a real control is machine-data dependent, so no term is invented for it.

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

Examples

Corpus header shape G60 G601 FNORM (reduced to this syntax's flags) on a first block — three groups recorded, exact stop means smoothing off: #BeforeBuild:

{ "Parsing": { "Flags": ["G60", "G601", "FNORM"] } }

#AfterBuild:

{
  "PathSmoothing": {
    "IsEnabled": false,
    "PathControl": "G60",
    "Term": "G60",
    "ExactStopCriterion": "G601",
    "FeedProfile": "FNORM"
  }
}

CYCLE832 arm on a block whose previous section holds the header registers — tolerance/mode recorded, IsEnabled flips, untouched groups inherit: #Previous:

{
  "PathSmoothing": {
    "IsEnabled": false,
    "PathControl": "G60",
    "ExactStopCriterion": "G601",
    "FeedProfile": "FNORM",
    "Term": "G60"
  }
}

#BeforeBuild:

{ "Parsing": { "CYCLE832": { "Args": ["0.05", "_ORI_FINISH", "0.8"] } } }

#AfterBuild:

{
  "PathSmoothing": {
    "IsEnabled": true,
    "PathControl": "G60",
    "ExactStopCriterion": "G601",
    "FeedProfile": "FNORM",
    "Term": "CYCLE832",
    "Tolerance": 0.05,
    "Mode": "_ORI_FINISH"
  }
}

CYCLE832 cancel (empty parentheses) — tolerance/mode removed; the inherited continuous-path G642 keeps IsEnabled true (G64-family blending itself never stopped): #Previous:

{
  "PathSmoothing": {
    "IsEnabled": true,
    "PathControl": "G642",
    "Term": "CYCLE832",
    "Tolerance": 0.01,
    "Mode": "_FINISH"
  }
}

#BeforeBuild:

{ "Parsing": { "CYCLE832": { "Args": [] } } }

#AfterBuild:

{
  "PathSmoothing": {
    "IsEnabled": true,
    "PathControl": "G642",
    "Term": "CYCLE832"
  }
}

Bare-word block SOFT FFWON (corpus shape) — auxiliary groups update, Term unchanged (no path-mode change on this block): #Previous:

{
  "PathSmoothing": { "IsEnabled": true, "PathControl": "G64", "Term": "G64" }
}

#BeforeBuild:

{ "Parsing": { "Flags": ["SOFT", "FFWON"] } }

#AfterBuild:

{
  "PathSmoothing": {
    "IsEnabled": true,
    "PathControl": "G64",
    "Term": "G64",
    "AccelProfile": "SOFT",
    "FeedForward": "FFWON"
  }
}

Untouched first block — conservative default section only: #BeforeBuild:

{ "Parsing": { "X": 10 } }

#AfterBuild:

{
  "Parsing": { "X": 10 },
  "PathSmoothing": { "IsEnabled": false }
}

Constructors

SiemensPathSmoothingSyntax()

Initializes a new instance with default settings.

public SiemensPathSmoothingSyntax()

SiemensPathSmoothingSyntax(XElement)

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

public SiemensPathSmoothingSyntax(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