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
@@ -191,6 +191,55 @@ and before syntaxes that read <code>MachineCoordinate</code>
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_McXyzSyntax_examples">Examples</h2>
<p>Root <code>ProgramXyz</code> only, no <code>ProgramToMcTransform</code> chain —
composed transform is identity, so MC equals <code>ProgramXyz</code>:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "ProgramXyz": { "X": 10, "Y": 20, "Z": 30 } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"ProgramXyz": { "X": 10, "Y": 20, "Z": 30 },
"MachineCoordinateState": { "X": 10, "Y": 20, "Z": 30 }
}</code></pre>
<p>Root <code>MachineCoordinateState</code> already present — guarded by the
non-null check, so an upstream syntax's explicit MC is preserved
verbatim (the derivation from <code>ProgramXyz</code> is skipped):
#BeforeBuild:</p>
<pre><code class="lang-csharp">{
"ProgramXyz": { "X": 10, "Y": 20, "Z": 30 },
"MachineCoordinateState": { "X": 100, "Y": 200, "Z": 300 }
}</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"ProgramXyz": { "X": 10, "Y": 20, "Z": 30 },
"MachineCoordinateState": { "X": 100, "Y": 200, "Z": 300 }
}</code></pre>
<p><code>CompoundMotion.Items[*]</code> with <code>ProgramXyz</code> but no
<code>MachineCoordinateState</code> — each item receives its own derived
MC; items that already had MC (or had no <code>ProgramXyz</code>) are
left alone:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{
"CompoundMotion": {
"Items": [
{ "ProgramXyz": { "X": 1, "Y": 2, "Z": 3 } },
{ "MachineCoordinateState": { "X": 9, "Y": 9, "Z": 9 } }
]
}
}</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"CompoundMotion": {
"Items": [
{
"ProgramXyz": { "X": 1, "Y": 2, "Z": 3 },
"MachineCoordinateState": { "X": 1, "Y": 2, "Z": 3 }
},
{ "MachineCoordinateState": { "X": 9, "Y": 9, "Z": 9 } }
]
}
}</code></pre>