Class SiemensPivotTransformationSyntax
- Namespace
- Hi.NcParsers.LogicSyntaxs.Siemens
- Assembly
- HiMech.dll
Siemens pivot gate over the shared engine
(PivotTransformUtil): writes the
PivotTransformSource entry on blocks
where commanded XYZ needs the Pn→MC kinematic rigid transform —
active TRAORI RTCP (SiemensTraoriSyntax's
ToolHeightCompensation.Term), an active swivel/tilt
(CYCLE800, or a mixed-dialect G68/G68.2 term), or a Dynamic chain
entry. The Siemens-specific exclusion: a plain geometric frame
(TRANS/ATRANS/ROT/AROT,
IsPlainGeometryFrame(string)) transforms
coordinates only and implies no physically positioned rotaries, so
it must not open the gate — a corpus TRANS X0 Y0 Z0
reset would otherwise leave the modal term folding the pivot on
every later plain-mode block.
The ISO/Fanuc sibling gate is
PivotTransformationSyntax; both write the identical
JSON vocabulary through the shared engine, and only one of them is
registered per brand pipeline. Same chain-position contract: after
all Pn-frame writers, so the PivotTransform entry lands last.
public class SiemensPivotTransformationSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
- Inheritance
-
SiemensPivotTransformationSyntax
- Implements
- Inherited Members
- Extension Methods
Examples
Real-kinematics cases below wire TestDeps.CodeKinematics
with the default chain code [O][Z][A][w];[O][Y][X][B][S][t]
— a table-A / head-B 5-axis machine (see
PivotTransformationSyntax's corpus notes for the
zero-offset chain caveats).
Plain-mode skip — no tilt, no RTCP: untouched.
#BeforeBuild:{}
#AfterBuild:
{}
The Siemens-specific exclusion: an active programmable frame
(Term = "TRANS") with an indexed rotary — real kinematics
wired, yet the gate must not fold the pivot (a geometric frame does
not rotate the physical machine):
#BeforeBuild:
{
"TiltTransform": { "Term": "TRANS", "X": 0, "Y": 0, "Z": 0 },
"MachineCoordinateState": { "A": 45 }
}
#AfterBuild:
{
"TiltTransform": { "Term": "TRANS", "X": 0, "Y": 0, "Z": 0 },
"MachineCoordinateState": { "A": 45 }
}
Active TRAORI signalled by the ToolHeightCompensation term — the
TestDeps.Kinematics stub makes the engine's pivot matrix
collapse to identity; no Dynamic entry exists (stable rotary), so
the entry stays Static — the branch the Dynamic-only detection
would miss:
#BeforeBuild:
{
"ToolHeightCompensation": { "Offset_mm": 50, "Term": "TRAORI", "OffsetId": 1 }
}
#AfterBuild:
{
"ToolHeightCompensation": { "Offset_mm": 50, "Term": "TRAORI", "OffsetId": 1 },
"ProgramToMcTransform": [
{
"Source": "PivotTransform",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
}
]
}
Active CYCLE800 swivel with an indexed table angle — real
kinematics: the engine folds the table-A Rx(45°) rigid matrix, the
same math the ISO sibling produces for G68.2:
#BeforeBuild:
{
"TiltTransform": { "Term": "CYCLE800" },
"MachineCoordinateState": { "A": 45 }
}
#AfterBuild:
{
"TiltTransform": { "Term": "CYCLE800" },
"MachineCoordinateState": { "A": 45 },
"ProgramToMcTransform": [
{
"Source": "PivotTransform",
"Kind": "Static",
"Mat4d": [
1, 0, 0, 0,
0, 0.7071067811865475, -0.7071067811865475, 0,
0, 0.7071067811865475, 0.7071067811865475, 0,
0, 0, 0, 1
]
}
]
}
Constructors
SiemensPivotTransformationSyntax()
Initializes a new instance with default settings.
public SiemensPivotTransformationSyntax()
SiemensPivotTransformationSyntax(XElement)
Initializes a new instance by deserializing from the given XML element.
public SiemensPivotTransformationSyntax(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
(or Default when factory is
null). Idempotent.
public static void Reg(XFactory factory = null)
Parameters
factoryXFactory