This commit is contained in:
2026-09-13 19:45:24 +08:00
parent 397a7a8cc4
commit 2db889ad89
58 changed files with 3526 additions and 213 deletions
@@ -151,6 +151,16 @@ consumes the G80 flag and writes
<a class="xref" href="Hi.NcParsers.Keywords.CannedCycle.html">CannedCycle</a> = <code>{ Term: "G80" }</code>, acting as a hard
sentinel for <span class="xref">Hi.NcParsers.LogicSyntaxs.CannedCycleSyntaxUtil</span> modal lookback.</li><li><b>No Group-09 activity</b>: leaves the block untouched.</li></ul>
<p>
A rotary-only block (<code>C40.</code>) reaches this syntax without a
<code>Parsing</code> node — <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcSyntax.html">McAbcSyntax</a> consumed the word into
<code>MachineCoordinateState</code> and dropped the emptied node — but its
one-shot <a class="xref" href="Hi.NcParsers.Keywords.RotaryWords.html">RotaryWords</a> record marks it as a block that
spoke an axis word, so under an active cycle it is a modal repeat like
any X/Y block (Fanuc's any-axis-word rule; HardNc indexes the table and
drills again). The cycle's pre-positioning item then carries the
block's ABC (<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">WriteCompoundMotion(JsonObject, string, JsonArray, Vec3d)</a>).
</p>
<p>
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.PositioningSyntax.html">PositioningSyntax</a> and before
the individual cycle syntaxes in the chain.
</p>
@@ -486,7 +496,7 @@ Canned cycle paths (Parsing.G81, G82, G83, …) are intentionally
excluded — their Z/R incremental semantics differ from normal axes
(R is relative to init level, Z is relative to R-point).
Resolution is handled by
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">ResolveCycleCoordinates(JsonObject, Vec3d, double?, double?, double, double)</a>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">ResolveCycleCoordinates(JsonObject, Vec3d, double?, double?, double, double, HashSet&lt;string&gt;)</a>
inside each cycle syntax class, which runs before this syntax.
</p>
<p>
@@ -714,10 +724,17 @@ deg→rad→deg drift. <a class="xref" href="Hi.NcParsers.Keywords.Positioning.h
is the default window and needs no special path here. The override
is read from the current block only (it is one-shot, never carried —
deliberately unlike the modal <code>RotaryWrap</code> gate's one-step
previous fallback) and applies to the root MC stage only, not to
<a class="xref" href="Hi.NcParsers.Keywords.CompoundMotion.html">CompoundMotion</a> items (G28/G74/G75 expansions capture
their words in sub-objects the stamping syntax never sees, so an
override can only ever describe a root word). Directional/shortest
previous fallback) and applies to the root MC stage, not to
<a class="xref" href="Hi.NcParsers.Keywords.CompoundMotion.html">CompoundMotion</a> items in general (G28/G74/G75 expansions
capture their words in sub-objects the stamping syntax never sees, so
an override can only ever describe a root word) — with one exception:
an item whose value for an axis equals the root's pre-pass value
verbatim carries that same root word (the canned-cycle
pre-positioning item that
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">WriteCompoundMotion(JsonObject, string, JsonArray, Vec3d)</a> stamps
from the root MC) and inherits the root's directive for that axis, so
the default window cannot fold the forced swing the root resolved
into the short way. Directional/shortest
entries keyed by an axis outside the modular set are reported as
<code>Coord-McAbc--003</code> — the promise cannot be honored there and
silence would mis-read the program's intent; an entry with no anchor
@@ -810,6 +827,18 @@ resolve (invalid number, missing table) reports an error and holds
the axis at its previous value.
</p>
<p>
Every rotary word the block actually carried is also recorded, as
programmed, in the one-shot block-root <a class="xref" href="Hi.NcParsers.Keywords.RotaryWords.html">RotaryWords</a>
section (<code>{ "C": 40 }</code>) — the resolved angle goes into
<code>MachineCoordinateState</code>, which after the modal carry can no
longer tell "commanded" from "carried". Downstream consumers that need
that distinction (<a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> repeating an
active canned cycle on a rotary-only block,
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">WriteCompoundMotion(JsonObject, string, JsonArray, Vec3d)</a> riding the
block's ABC on the cycle's pre-positioning item) read the record; the
section is never modal-carried.
</p>
<p>
Must be placed <b>before</b> <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> so syntaxes
that need the current-block ABC to compute transforms
(e.g. <a class="xref" href="Hi.NcParsers.LogicSyntaxs.G43p4RtcpSyntax.html">G43p4RtcpSyntax</a>) can see it; and <b>before</b>