Class McAbcXyzFallbackSyntax
- Namespace
- Hi.NcParsers.LogicSyntaxs
- Assembly
- HiMech.dll
Fills missing X/Y/Z on an ABC-only
MachineCoordinate section.
Behaviour depends on whether the block is under RTCP with rotary
motion, as indicated by
IsRotaryDynamic:
-
Non-dynamic (no RTCP or RTCP with ABC stable) — the
programmed tool tip stays put in MC while rotary axes (if any) are
unchanged, so we simply copy X/Y/Z from the previous block's
MachineCoordinate. This matches
NC modal XYZ carry-forward for rotary-only blocks such as
G00 A30.(non-RTCP pivoting). -
Dynamic (RTCP active + ABC changing) — the programmed tool tip
must stay fixed in program coordinates while MC XYZ shifts to
compensate the new rotary state. Looks up the last
ProgramXyz and re-derives
MC = inheritedProgramXyz × composedTransform, where the composed transform is the block's endpoint chain (now including PivotTransformSource as a full rotation+translation Mat4d, so the chain already encodes the kinematic IK). The carriedProgramXyzis also stamped onto the current block so downstream consumers see a consistent ProgramXyz + MC pair.
Pair with McAbcSyntax, which runs early to write ABC
but deliberately leaves X/Y/Z empty so McXyzSyntax can
still derive MC XYZ from ProgramXyz via the transform chain
when the block carries linear motion. If McXyzSyntax
has nothing to derive (no ProgramXyz), this syntax completes
the MC section as described above.
Does nothing when the section already carries all three of X/Y/Z (normal linear-motion blocks), or when there is no section at all (pure parse-only block that introduces no MC). Must be placed after McXyzSyntax and before McAbcCyclicPathSyntax / LinearMotionSyntax.
public class McAbcXyzFallbackSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
- Inheritance
-
McAbcXyzFallbackSyntax
- Implements
- Inherited Members
- Extension Methods
Properties
Name
Syntax kind name (typically the concrete type name).
public string Name { get; }
Property Value
XName
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.