rename XFactory.Regs to XFactory.Generators.

This commit is contained in:
2026-05-23 21:23:06 +08:00
parent 8b285cc863
commit 058003f395
155 changed files with 16416 additions and 1261 deletions
@@ -216,7 +216,7 @@ stack trace anchors the bug at the read site (which is the right
place to investigate — the originating block has already passed).
Continuing with NaN/0 would silently propagate corrupt coordinates
downstream and is more dangerous than crashing the run.</li></ul>
Use <a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, Sentence, NcDiagnosticProgress)</a> instead when reading from a parser-
Use <a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, ISentenceCarrier, NcDiagnosticProgress)</a> instead when reading from a parser-
stage section (variable expressions on the current block deserve a
soft diagnostic, not a hard crash).
</div>
@@ -346,8 +346,8 @@ and meaningfully indicates an authored claim on this block.
<a id="Hi_NcParsers_SoftNcUtil_GetParsedDouble_" data-uid="Hi.NcParsers.SoftNcUtil.GetParsedDouble*"></a>
<h3 id="Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.SoftNcUtil.GetParsedDouble(System.Text.Json.Nodes.JsonObject,System.String,Hi.NcParsers.Sentence,Hi.NcParsers.NcDiagnosticProgress)">
GetParsedDouble(JsonObject, string, Sentence, NcDiagnosticProgress)
<h3 id="Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.SoftNcUtil.GetParsedDouble(System.Text.Json.Nodes.JsonObject,System.String,Hi.NcParsers.ISentenceCarrier,Hi.NcParsers.NcDiagnosticProgress)">
GetParsedDouble(JsonObject, string, ISentenceCarrier, NcDiagnosticProgress)
</h3>
@@ -358,7 +358,7 @@ section, or any sub-object thereof), with strict separation between
<ul><li>Tag missing → returns <code>null</code> silently. The caller's existing
<code>?? default</code> chain handles the "axis not written" /
"section absent" case as before.</li><li>Tag present and numeric → returns the value.</li><li>Tag present but non-numeric → emits
<a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html#Hi_NcParsers_NcDiagnosticProgress_UnsupportedError_Hi_NcParsers_Sentence_System_String_System_String_System_Object_">UnsupportedError(Sentence, string, string, object)</a>
<a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html#Hi_NcParsers_NcDiagnosticProgress_UnsupportedError_Hi_NcParsers_ISentenceCarrier_System_String_System_String_System_Object_">UnsupportedError(ISentenceCarrier, string, string, object)</a>
(id <code>VariableExpression--Unevaluated</code>) and returns <code>null</code>.
Two sources land here:
<ul><li>Parser-stage residue — a Fanuc <code>"#124"</code>, Heidenhain
@@ -379,7 +379,7 @@ call site that consumes a numeric tag held on a <a class="xref" href="Hi.NcParse
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static double? GetParsedDouble(this JsonObject section, string key, Sentence sentence, NcDiagnosticProgress diag)</code></pre>
<pre><code class="lang-csharp hljs">public static double? GetParsedDouble(this JsonObject section, string key, ISentenceCarrier sentenceCarrier, NcDiagnosticProgress diag)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@@ -388,7 +388,7 @@ call site that consumes a numeric tag held on a <a class="xref" href="Hi.NcParse
<dd></dd>
<dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>sentence</code> <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a></dt>
<dt><code>sentenceCarrier</code> <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></dt>
<dd></dd>
<dt><code>diag</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd></dd>
@@ -412,8 +412,8 @@ call site that consumes a numeric tag held on a <a class="xref" href="Hi.NcParse
<a id="Hi_NcParsers_SoftNcUtil_GetVec3d_" data-uid="Hi.NcParsers.SoftNcUtil.GetVec3d*"></a>
<h3 id="Hi_NcParsers_SoftNcUtil_GetVec3d_System_Text_Json_Nodes_JsonObject_System_String_Hi_Geom_Vec3d_Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.SoftNcUtil.GetVec3d(System.Text.Json.Nodes.JsonObject,System.String,Hi.Geom.Vec3d,Hi.NcParsers.Sentence,Hi.NcParsers.NcDiagnosticProgress)">
GetVec3d(JsonObject, string, Vec3d, Sentence, NcDiagnosticProgress)
<h3 id="Hi_NcParsers_SoftNcUtil_GetVec3d_System_Text_Json_Nodes_JsonObject_System_String_Hi_Geom_Vec3d_Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.SoftNcUtil.GetVec3d(System.Text.Json.Nodes.JsonObject,System.String,Hi.Geom.Vec3d,Hi.NcParsers.ISentenceCarrier,Hi.NcParsers.NcDiagnosticProgress)">
GetVec3d(JsonObject, string, Vec3d, ISentenceCarrier, NcDiagnosticProgress)
</h3>
@@ -421,16 +421,16 @@ call site that consumes a numeric tag held on a <a class="xref" href="Hi.NcParse
substituting each missing component (or a missing section) with
the matching component of <code class="paramref">fallback</code>.</p>
<p>
When <code class="paramref">sentence</code> is non-null and <code class="paramref">diag</code>
When <code class="paramref">sentenceCarrier</code> is non-null and <code class="paramref">diag</code>
is supplied, non-numeric X/Y/Z values are reported via
<a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, Sentence, NcDiagnosticProgress)</a>; when <code class="paramref">sentence</code> is
<a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, ISentenceCarrier, NcDiagnosticProgress)</a>; when <code class="paramref">sentenceCarrier</code> is
null, the diagnostic still fires but without a source-line anchor.
</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Vec3d GetVec3d(JsonObject json, string sectionKey, Vec3d fallback, Sentence sentence, NcDiagnosticProgress diag)</code></pre>
<pre><code class="lang-csharp hljs">public static Vec3d GetVec3d(JsonObject json, string sectionKey, Vec3d fallback, ISentenceCarrier sentenceCarrier, NcDiagnosticProgress diag)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@@ -441,7 +441,7 @@ null, the diagnostic still fires but without a source-line anchor.
<dd></dd>
<dt><code>fallback</code> <a class="xref" href="Hi.Geom.Vec3d.html">Vec3d</a></dt>
<dd></dd>
<dt><code>sentence</code> <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a></dt>
<dt><code>sentenceCarrier</code> <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></dt>
<dd></dd>
<dt><code>diag</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd></dd>
@@ -465,8 +465,8 @@ null, the diagnostic still fires but without a source-line anchor.
<a id="Hi_NcParsers_SoftNcUtil_GetVec3d_" data-uid="Hi.NcParsers.SoftNcUtil.GetVec3d*"></a>
<h3 id="Hi_NcParsers_SoftNcUtil_GetVec3d_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.SoftNcUtil.GetVec3d(System.Text.Json.Nodes.JsonObject,System.String,Hi.NcParsers.Sentence,Hi.NcParsers.NcDiagnosticProgress)">
GetVec3d(JsonObject, string, Sentence, NcDiagnosticProgress)
<h3 id="Hi_NcParsers_SoftNcUtil_GetVec3d_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.SoftNcUtil.GetVec3d(System.Text.Json.Nodes.JsonObject,System.String,Hi.NcParsers.ISentenceCarrier,Hi.NcParsers.NcDiagnosticProgress)">
GetVec3d(JsonObject, string, ISentenceCarrier, NcDiagnosticProgress)
</h3>
@@ -474,10 +474,10 @@ null, the diagnostic still fires but without a source-line anchor.
Returns null if the section or all three keys are missing;
individual missing keys are filled with <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double.nan">NaN</a>.</p>
<p>
When <code class="paramref">sentence</code> is non-null and <code class="paramref">diag</code>
When <code class="paramref">sentenceCarrier</code> is non-null and <code class="paramref">diag</code>
is supplied, non-numeric X/Y/Z values are reported via
<a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, Sentence, NcDiagnosticProgress)</a> (id <code>VariableExpression--Unevaluated</code>);
when <code class="paramref">sentence</code> is null, the diagnostic still fires
<a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, ISentenceCarrier, NcDiagnosticProgress)</a> (id <code>VariableExpression--Unevaluated</code>);
when <code class="paramref">sentenceCarrier</code> is null, the diagnostic still fires
but without a source-line anchor (used by backward-walk / dump-reading
callers that cannot tie the read to the current sentence).
</p>
@@ -485,7 +485,7 @@ callers that cannot tie the read to the current sentence).
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Vec3d GetVec3d(JsonObject json, string sectionKey, Sentence sentence, NcDiagnosticProgress diag)</code></pre>
<pre><code class="lang-csharp hljs">public static Vec3d GetVec3d(JsonObject json, string sectionKey, ISentenceCarrier sentenceCarrier, NcDiagnosticProgress diag)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@@ -494,7 +494,7 @@ callers that cannot tie the read to the current sentence).
<dd></dd>
<dt><code>sectionKey</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>sentence</code> <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a></dt>
<dt><code>sentenceCarrier</code> <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></dt>
<dd></dd>
<dt><code>diag</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd></dd>