Class HeidenhainM140Syntax
- Namespace
- Hi.NcParsers.ParsingSyntaxs.Heidenhain
- Assembly
- HiMech.dll
Captures the klartext M140 MB tool-axis retract statement into
Parsing.M140 { MB, F? }. MB MAX retracts to the traverse
limit (recorded as the string “MAX”); MB+n retracts by
n mm along the tool axis. Handles the corpus forms
M140 MB+50 F6000, L M140 MB MAX (M word carried on an L
statement) and the glued LM140 MB MAX (TongTai post). Must run
before HeidenhainLSyntax (it claims the whole
retract statement including a leading L) and before the shared
F tag-value syntax (the F is the retract feed).
public class HeidenhainM140Syntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
- Inheritance
-
HeidenhainM140Syntax
- Implements
- Inherited Members
- Extension Methods
Examples
Distance form with retract feed:
#BeforeBuild.UnparsedText: M140 MB+50 F6000
#AfterBuild:
{ "Parsing": { "M140": { "MB": 50, "F": 6000 } } }
Glued L + MAX form (retract to the traverse limit):
#BeforeBuild.UnparsedText: LM140 MB MAX
#AfterBuild:
{ "Parsing": { "M140": { "MB": "MAX" } } }
Constructors
HeidenhainM140Syntax()
Initializes a new instance with default settings.
public HeidenhainM140Syntax()
HeidenhainM140Syntax(XElement)
Initializes a new instance by deserializing from the given XML element.
public HeidenhainM140Syntax(XElement src)
Parameters
srcXElementSource XML element.
Fields
KeyConst
Key of the record written to Parsing.
public const string KeyConst = "M140"
Field Value
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
(or Default when factory is
null). Idempotent.
public static void Reg(XFactory factory = null)
Parameters
factoryXFactory