Class HeidenhainPlaneSyntax
- Namespace
- Hi.NcParsers.ParsingSyntaxs.Heidenhain
- Assembly
- HiMech.dll
Syntax for the Heidenhain PLANE statement family. Fully structured (simulated by the Logic-stage tilt consumer):
PLANE RESET [STAY|MOVE|TURN]PLANE SPATIAL SPA SPB SPC [SEQ±] [COORD ROT|TABLE ROT] [MOVE [DIST..] [F..]|TURN|STAY]
PLANE PROJECTED PROPR PROMIN ROT ...PLANE VECTOR BX BY BZ NX NY NZ ...(corpus: 1.H)PLANE EULER/POINTS/RELATIV/AXIAL ...— the mode word is captured and the unmodeled argument text is swept verbatim into the record'sArgsso no token can leak to the shared tag captures (e.g. aPLANE AXIAL B+45B word must never become a rotary axis move).
MOVE DIST100 F8000 is the repositioning feed and would
otherwise pollute the modal feedrate (house.H corpus form; HardNc has
exactly this defect).
public class HeidenhainPlaneSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
- Inheritance
-
HeidenhainPlaneSyntax
- Implements
- Inherited Members
- Extension Methods
Examples
#BeforeBuild.UnparsedText: PLANE SPATIAL SPA+30 SPB+0 SPC-10 SEQ+ COORD ROT TURN
#AfterBuild:
{
"Parsing": {
"PLANE": {
"Mode": "SPATIAL",
"SPA": 30, "SPB": 0, "SPC": -10,
"SEQ": "+", "Rot": "COORD", "Positioning": "TURN"
}
}
}
#BeforeBuild.UnparsedText: PLANE PROJECTED PROPR+30 PROMIN+0 ROT+45 SEQ- TABLE ROT MOVE
#AfterBuild:
{
"Parsing": {
"PLANE": {
"Mode": "PROJECTED",
"PROPR": 30, "PROMIN": 0, "ROT": 45,
"SEQ": "-", "Rot": "TABLE", "Positioning": "MOVE"
}
}
}
#BeforeBuild.UnparsedText: PLANE RESET STAY
#AfterBuild:
{
"Parsing": {
"PLANE": { "Mode": "RESET", "Positioning": "STAY" }
}
}
The house.H MOVE form — DIST is glued to its value and the F is the
repositioning feed (claimed here, kept out of the modal feedrate):
#BeforeBuild.UnparsedText: PLANE SPATIAL SPA+0 SPB-45 SPC+0 MOVE DIST100 F8000 COORD ROT
#AfterBuild:
{
"Parsing": {
"PLANE": {
"Mode": "SPATIAL",
"SPA": 0, "SPB": -45, "SPC": 0,
"Rot": "COORD", "Positioning": "MOVE",
"DIST": 100, "F": 8000
}
}
}
The TongTai turbine form — SEQ- glued to TABLE:
#BeforeBuild.UnparsedText: PLANE SPATIAL SPA-77.516 SPB+0 SPC-10.365 STAY SEQ-TABLE ROT
#AfterBuild:
{
"Parsing": {
"PLANE": {
"Mode": "SPATIAL",
"SPA": -77.516, "SPB": 0, "SPC": -10.365,
"SEQ": "-", "Rot": "TABLE", "Positioning": "STAY"
}
}
}
PLANE VECTOR (1.H corpus form) — base and normal vectors captured:
#BeforeBuild.UnparsedText: PLANE VECTOR BX1 BY0 BZ0 NX0 NY0 NZ1 STAY SEQ+ TABLE ROT
#AfterBuild:
{
"Parsing": {
"PLANE": {
"Mode": "VECTOR",
"BX": 1, "BY": 0, "BZ": 0, "NX": 0, "NY": 0, "NZ": 1,
"SEQ": "+", "Rot": "TABLE", "Positioning": "STAY"
}
}
}
Unmodeled mode — the argument text is swept into Args so no
token leaks:
#BeforeBuild.UnparsedText: PLANE AXIAL B+45 TURN
#AfterBuild:
{
"Parsing": {
"PLANE": { "Mode": "AXIAL", "Positioning": "TURN", "Args": "B+45" }
}
}
Constructors
HeidenhainPlaneSyntax()
Initializes a new instance with default settings.
public HeidenhainPlaneSyntax()
HeidenhainPlaneSyntax(XElement)
Initializes a new instance by deserializing from the given XML element.
public HeidenhainPlaneSyntax(XElement src)
Parameters
srcXElementSource XML element.
Fields
ArgsKey
Record key holding the swept argument text of unmodeled PLANE modes.
public const string ArgsKey = "Args"
Field Value
KeyConst
Key of the record written to Parsing.
public const string KeyConst = "PLANE"
Field Value
ModeKey
Record key for the mode word (SPATIAL/RESET/VECTOR/...).
public const string ModeKey = "Mode"
Field Value
PositioningKey
Record key for the positioning word (“MOVE”/“TURN”/“STAY”).
public const string PositioningKey = "Positioning"
Field Value
ProjectedTagList
Projected tags for PLANE PROJECTED command. PROPR: projection angle, PROMIN: minimum angle, ROT: rotation of tilted plane.
public static readonly string[] ProjectedTagList
Field Value
- string[]
RotKey
Record key for the rotation strategy (“COORD” or “TABLE”).
public const string RotKey = "Rot"
Field Value
SeqKey
Record key for the SEQ solution preference ("+" or "-").
public const string SeqKey = "SEQ"
Field Value
SpatialTagList
Spatial axis tags for PLANE SPATIAL command.
public static readonly string[] SpatialTagList
Field Value
- string[]
UnmodeledModeList
PLANE modes captured as recognized-but-unmodeled: the mode word is recorded and the remaining argument text is swept into ArgsKey.
public static readonly string[] UnmodeledModeList
Field Value
- string[]
VectorTagList
Base-vector and normal-vector tags for PLANE VECTOR command.
public static readonly string[] VectorTagList
Field Value
- string[]
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