Class FanucPathSmoothingSyntax
- Namespace
- Hi.NcParsers.LogicSyntaxs
- Assembly
- HiMech.dll
Consumes Fanuc G05.1 (high-precision contour / AICC II / Nano Smoothing) and records the modal state in the PathSmoothing JSON section using the FanucPathSmoothing schema. Q1 enables, Q0 disables; the optional R{n} precision-level is preserved as Level. The simulation does not alter the tool path — this is a controller-internal interpolation black box; the captured state exists for bidirectional NC-text reconstruction.
Modal carry to subsequent blocks is handled by
ModalCarrySyntax, which already tracks the
PathSmoothing section key and deep-clones it forward.
public class FanucPathSmoothingSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
- Inheritance
-
FanucPathSmoothingSyntax
- Implements
- Inherited Members
- Extension Methods
Examples
First block of the stream (no #Previous:) — stamps the default
disabled section so downstream modal lookback always sees a concrete
PathSmoothing:
#BeforeBuild:
{ }
#AfterBuild:
{ "PathSmoothing": { "IsEnabled": false, "Term": "G05.1" } }
G05.1 Q1 with no R — enables, no Level emitted:
#Previous:
{ "PathSmoothing": { "IsEnabled": false, "Term": "G05.1" } }
#BeforeBuild:
{ "Parsing": { "G05.1": { "Q": 1 } } }
#AfterBuild:
{ "PathSmoothing": { "IsEnabled": true, "Term": "G05.1" } }
G05.1 Q1 R3 — enables and preserves the precision level: #Previous:
{ "PathSmoothing": { "IsEnabled": false, "Term": "G05.1" } }
#BeforeBuild:
{ "Parsing": { "G05.1": { "Q": 1, "R": 3 } } }
#AfterBuild:
{ "PathSmoothing": { "IsEnabled": true, "Term": "G05.1", "Level": 3 } }
G05.1 Q0 — disables; any prior Level is dropped (R only meaningful
when enabling):
#Previous:
{ "PathSmoothing": { "IsEnabled": true, "Term": "G05.1", "Level": 3 } }
#BeforeBuild:
{ "Parsing": { "G05.1": { "Q": 0 } } }
#AfterBuild:
{ "PathSmoothing": { "IsEnabled": false, "Term": "G05.1" } }
Constructors
FanucPathSmoothingSyntax()
Initializes a new instance with default settings.
public FanucPathSmoothingSyntax()
FanucPathSmoothingSyntax(XElement)
Initializes a new instance by deserializing from the given XML element.
public FanucPathSmoothingSyntax(XElement src)
Parameters
srcXElementSource XML element.
Properties
Name
Syntax kind name (typically the concrete type name).
public string Name { get; }
Property Value
XName
XML element name used to register this syntax with XFactory.
public static string XName { get; }
Property Value
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
syntaxPieceNodeLazyLinkedListNode<SyntaxPiece>ncDependencyListList<INcDependency>ncDiagnosticProgressNcDiagnosticProgress
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
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif 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
and chains Reg(factory) on dependents. Idempotent.
public static void Reg(XFactory factory = null)
Parameters
factoryXFactory