fix SoftNcRunner GM code normalization.

This commit is contained in:
2026-05-06 13:21:19 +08:00
parent 0fe9497552
commit 2f57932000
1238 changed files with 69405 additions and 22511 deletions
@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class CannedCycleResolveSyntax | HiAPI-C# 2025 ">
<meta name="description" content="Resolves canned cycle parameters for the current block: modal repetition detection, G91 incremental-to-absolute conversion, and missing-axis fallback from last known position. After this syntax, the cycle sub-section in Parsing (e.g., Parsing.G83) contains fully resolved absolute coordinates — downstream cycle syntaxes (, ) can read them directly without incremental or modal logic. For modal repetition (no cycle G-code in the current block), merges stored parameters from the previous block&#39;s . with current-block overrides from Parsing root, removes consumed keys from Parsing root, and writes the merged section to Parsing under the cycle code key. Must be placed after and before the individual cycle syntaxes in the chain.">
<meta name="description" content="Resolves the canned-cycle Group-09 state for the current block and writes the result to the section. Active cycle (direct G81..G89 or modal repeat): merges Parsing overrides with previous-cycle stored params, applies G91 incremental-to-absolute conversion and missing-axis fallback, writes with , , and . The resolved cycle sub-section is left in Parsing under the cycle code for downstream cycle syntaxes (, etc.) to read.Explicit cancel (G80 flag present on a non-cycle block): consumes the G80 flag and writes = { Term: &quot;G80&quot; }, acting as a hard sentinel for modal lookback.No Group-09 activity: leaves the block untouched. Must be placed after and before the individual cycle syntaxes in the chain.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@@ -97,26 +97,21 @@ Class CannedCycleResolveSyntax
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Resolves canned cycle parameters for the current block:
modal repetition detection, G91 incremental-to-absolute conversion,
and missing-axis fallback from last known position.</p>
<div class="markdown summary"><p>Resolves the canned-cycle Group-09 state for the current block
and writes the result to the <a class="xref" href="Hi.NcParsers.Keywords.CannedCycle.html">CannedCycle</a> section.</p>
<ul><li><b>Active cycle</b> (direct G81..G89 or modal repeat): merges
<code>Parsing</code> overrides with previous-cycle stored params, applies
G91 incremental-to-absolute conversion and missing-axis fallback,
writes <a class="xref" href="Hi.NcParsers.Keywords.CannedCycle.html">CannedCycle</a> with <a class="xref" href="Hi.NcParsers.Keywords.ICannedCycleDef.html#Hi_NcParsers_Keywords_ICannedCycleDef_Term">Term</a>,
<a class="xref" href="Hi.NcParsers.Keywords.ICannedCycleDef.html#Hi_NcParsers_Keywords_ICannedCycleDef_ReturnMode">ReturnMode</a>, and
<a class="xref" href="Hi.NcParsers.Keywords.ICannedCycleDef.html#Hi_NcParsers_Keywords_ICannedCycleDef_Params">Params</a>. The resolved cycle sub-section
is left in <code>Parsing</code> under the cycle code for downstream cycle
syntaxes (<a class="xref" href="Hi.NcParsers.LogicSyntaxs.DrillingCycleSyntax.html">DrillingCycleSyntax</a>, etc.) to read.</li><li><b>Explicit cancel</b> (G80 flag present on a non-cycle block):
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>
After this syntax, the cycle sub-section in <code>Parsing</code>
(e.g., <code>Parsing.G83</code>) contains fully resolved absolute
coordinates — downstream cycle syntaxes
(<a class="xref" href="Hi.NcParsers.LogicSyntaxs.DrillingCycleSyntax.html">DrillingCycleSyntax</a>, <a class="xref" href="Hi.NcParsers.LogicSyntaxs.PeckDrillingCycleSyntax.html">PeckDrillingCycleSyntax</a>)
can read them directly without incremental or modal logic.
</p>
<p>
For modal repetition (no cycle G-code in the current block),
merges stored parameters from the previous block's
<a class="xref" href="Hi.NcParsers.Keywords.CompoundMotion.html">CompoundMotion</a>.<span class="xref">Hi.NcParsers.LogicSyntaxs.CannedCycleSyntaxUtil.ResolvedParamsKey</span>
with current-block overrides from <code>Parsing</code> root, removes
consumed keys from <code>Parsing</code> root, and writes the merged
section to <code>Parsing</code> under the cycle code key.
</p>
<p>
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.PositioningModeSyntax.html">PositioningModeSyntax</a> and before
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>
</div>
@@ -245,7 +240,8 @@ the individual cycle syntaxes in the chain.
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 summary"><p>Syntax kind name (typically the concrete type name).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">