rename XFactory.Regs to XFactory.Generators.
This commit is contained in:
+79
@@ -185,6 +185,85 @@ Default coordinate ID is set by <a class="xref" href="Hi.NcParsers.Initializers.
|
||||
</dd></dl>
|
||||
|
||||
|
||||
<h2 id="Hi_NcParsers_LogicSyntaxs_IsoCoordinateOffsetSyntax_examples">Examples</h2>
|
||||
<p>The <code>Mat4d</code> arrays below are written as 16 plain doubles in
|
||||
column-major order; the first 12 are the identity 3×3 rotation, the
|
||||
last 4 are the translation column <code>(tx, ty, tz, 1)</code>. So a pure
|
||||
translation by <code>(tx, ty, tz)</code> is
|
||||
<code>[1,0,0,0, 0,1,0,0, 0,0,1,0, tx,ty,tz,1]</code>.</p>
|
||||
<p>
|
||||
G54 flag on the block but no <a class="xref" href="Hi.NcParsers.Dependencys.IIsoCoordinateConfig.html">IIsoCoordinateConfig</a> on
|
||||
the dep list — the resolved offset falls back to <code>Vec3d.Zero</code>
|
||||
and the composed translation is the identity matrix:
|
||||
</p>
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G54"] } }</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"CoordinateOffset": {
|
||||
"CoordinateId": "G54",
|
||||
"Offset_X": 0, "Offset_Y": 0, "Offset_Z": 0
|
||||
},
|
||||
"ProgramToMcTransform": [
|
||||
{
|
||||
"Source": "CoordinateOffset",
|
||||
"Kind": "Static",
|
||||
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
G55 flag with an <a class="xref" href="Hi.NcParsers.Dependencys.Generic.IsoCoordinateTable.html">IsoCoordinateTable</a>
|
||||
providing <code>G55 → (100, 50, -200)</code> — the offset is written to
|
||||
the <code>CoordinateOffset</code> section and the same translation is
|
||||
composed into the transform chain:
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G55"] } }</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"CoordinateOffset": {
|
||||
"CoordinateId": "G55",
|
||||
"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>
|
||||
No coordinate flag on the current block (e.g. an unrelated M03) but
|
||||
<code>#Previous:</code> carried <code>G54</code> — modal lookback inherits
|
||||
<code>G54</code>, the dep is re-queried (so <code>Offset_X/Y/Z</code> are taken
|
||||
from the table, not from the previous block), and the transform
|
||||
chain is rebuilt. The unrelated M03 flag survives in
|
||||
<code>Parsing.Flags</code> because <code>CleanupParsing</code> only fires on the
|
||||
new-coord-flag branch:
|
||||
#Previous:
|
||||
<pre><code class="lang-csharp">{
|
||||
"CoordinateOffset": {
|
||||
"CoordinateId": "G54",
|
||||
"Offset_X": 10, "Offset_Y": 20, "Offset_Z": -100
|
||||
}
|
||||
}</code></pre>
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"Parsing": { "Flags": ["M03"] },
|
||||
"CoordinateOffset": {
|
||||
"CoordinateId": "G54",
|
||||
"Offset_X": 10, "Offset_Y": 20, "Offset_Z": -100
|
||||
},
|
||||
"ProgramToMcTransform": [
|
||||
{
|
||||
"Source": "CoordinateOffset",
|
||||
"Kind": "Static",
|
||||
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 10,20,-100,1]
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user