This commit is contained in:
2026-09-09 17:35:23 +08:00
parent 2a98ae7556
commit 161af68fe3
1271 changed files with 58251 additions and 98639 deletions
@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class IsoCoordinateOffsetSyntax | HiAPI-C# 2025 ">
<meta name="description" content="ISO/Fanuc/Mazak/Okuma/Syntec: resolves G54–G59.9 work coordinate offset. Reads G54/G55/.../G59.9 from , looks up offset Vec3d via dependencies (e.g. brand parameter table or ), composes into . Modal — active coordinate persists via backward lookback. Default coordinate ID is set by .">
<meta name="description" content="ISO/Fanuc/Mazak/Okuma/Syntec: resolves the G54–G59.9 work coordinate offset and the Fanuc-family additional work coordinate systems (G54.1 Pn, also spelled G54 Pn). Reads G54/G55/.../G59.9 from and the captured Parsing.G54.1 = {P: n} object (written by for both spellings), which resolves to the coordinate id &amp;quot;G54.1P{n}&amp;quot; that the brand parameter tables map to #7001+ (). Looks the offset Vec3d up via the dependencies (brand parameter table or ) and composes it into . Modal — the active coordinate persists via backward lookback. Default coordinate ID is set by . A block that selects a work coordinate system nobody has configured is reported on that block (never on the modal re-query of the following blocks): Coord-WorkOffset--AdditionalZero when an additional system (G54.1 Pn) resolves to no entry or to (0, 0, 0) — the brand tables seed every P row with zero, hardware-faithfully, so a zero there is the &quot;never entered&quot; state, whereas a zero row of the standard series (G54–G59 and the G59.1–G59.9 extension alike) is a legitimate authoring convention and stays silent; Coord-WorkOffset--NoTableEntry when no provider resolves the id at all (e.g. a G59.x on a runner carrying no brand-neutral table beside its brand table); and Coord-WorkOffset--IndexUnresolved when the P word is not a positive integer (vacant variable, non-integer), in which case the active system is kept. A bare G54.1 without P is not this syntax&#39;s business: the parameterized capture consumes nothing without a parameter, the dotted number lands in Parsing.Flags where it is not a G54-series member, so the active system is kept and the unconsumed check reports the flag.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@@ -97,13 +97,40 @@ Class IsoCoordinateOffsetSyntax
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>ISO/Fanuc/Mazak/Okuma/Syntec: resolves G54–G59.9 work coordinate offset.
Reads G54/G55/.../G59.9 from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a>,
looks up offset Vec3d via <a class="xref" href="Hi.NcParsers.Dependencys.IIsoCoordinateConfig.html">IIsoCoordinateConfig</a> dependencies
(e.g. brand parameter table or <a class="xref" href="Hi.NcParsers.Dependencys.Generic.IsoCoordinateTable.html">IsoCoordinateTable</a>),
composes into <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a>.
Modal — active coordinate persists via backward lookback.
<div class="markdown summary"><p>ISO/Fanuc/Mazak/Okuma/Syntec: resolves the G54–G59.9 work coordinate
offset and the Fanuc-family additional work coordinate systems
(<code>G54.1 Pn</code>, also spelled <code>G54 Pn</code>).
Reads G54/G55/.../G59.9 from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a> and the
captured <code>Parsing.G54.1 = {P: n}</code> object (written by
<a class="xref" href="Hi.NcParsers.Syntaxs.FanucSyntaxUtil.html#Hi_NcParsers_Syntaxs_FanucSyntaxUtil_G54p1Syntax">G54p1Syntax</a> for both spellings),
which resolves to the coordinate id <code>&quot;G54.1P{n}&quot;</code> that the brand
parameter tables map to <code>#7001+</code>
(<a class="xref" href="Hi.NcParsers.Dependencys.IsoCoordinateAddressMap.html">IsoCoordinateAddressMap</a>). Looks the offset Vec3d up via
the <a class="xref" href="Hi.NcParsers.Dependencys.IIsoCoordinateConfig.html">IIsoCoordinateConfig</a> dependencies (brand parameter
table or <a class="xref" href="Hi.NcParsers.Dependencys.Generic.IsoCoordinateTable.html">IsoCoordinateTable</a>) and composes it into
<a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a>.
Modal — the active coordinate persists via backward lookback.
Default coordinate ID is set by <a class="xref" href="Hi.NcParsers.Initializers.StaticInitializer.html">StaticInitializer</a>.</p>
<p>
A block that selects a work coordinate system nobody has configured is
reported on that block (never on the modal re-query of the following
blocks): <code>Coord-WorkOffset--AdditionalZero</code> when an additional
system (<code>G54.1 Pn</code>) resolves to no entry or to (0, 0, 0) — the
brand tables seed every P row with zero, hardware-faithfully, so a zero
there is the "never entered" state, whereas a zero row of the standard
series (G54–G59 and the G59.1–G59.9 extension alike) is a legitimate
authoring convention and stays silent;
<code>Coord-WorkOffset--NoTableEntry</code> when no provider resolves the id
at all (e.g. a <code>G59.x</code> on a runner carrying no brand-neutral table
beside its brand table); and
<code>Coord-WorkOffset--IndexUnresolved</code> when the P word is not a
positive integer (vacant variable, non-integer), in which case the
active system is kept. A bare <code>G54.1</code> without P is not this
syntax's business: the parameterized capture consumes nothing without
a parameter, the dotted number lands in <code>Parsing.Flags</code> where it
is not a G54-series member, so the active system is kept and the
unconsumed check reports the flag.
</p>
</div>
<div class="markdown conceptual"></div>
@@ -263,6 +290,49 @@ new-coord-flag branch:
}
]
}</code></pre>
An additional work coordinate system — the parsing capture of
<code>G54.1 P4</code> or <code>G54 P4</code> — with an
<a class="xref" href="Hi.NcParsers.Dependencys.Generic.IsoCoordinateTable.html">IsoCoordinateTable</a> providing
<code>G54.1P4 → (100, 50, -200)</code>: the captured object is consumed,
the coordinate id is the un-padded <code>"G54.1P4"</code> key the providers
share, and the translation is composed like any G5x:
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "G54.1": { "P": 4 } } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"CoordinateOffset": {
"CoordinateId": "G54.1P4",
"Offset_X": 100, "Offset_Y": 50, "Offset_Z": -200
},
"ProgramToMcTransform": [
{
"Source": "CoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 100,50,-200,1]
}
]
}</code></pre>
A block carrying both a G5x flag and an additional-system capture
(illegal on a Fanuc — both are modal group 14 — but a parser must pick):
the additional system wins, and the flag is consumed with it so that
no stale G55 is left for the next syntaxes; the same table as above
serves the lookup:
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G55"], "G54.1": { "P": 4 } } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"CoordinateOffset": {
"CoordinateId": "G54.1P4",
"Offset_X": 100, "Offset_Y": 50, "Offset_Z": -200
},
"ProgramToMcTransform": [
{
"Source": "CoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 100,50,-200,1]
}
]
}</code></pre>