rename XFactory.Regs to XFactory.Generators.
This commit is contained in:
@@ -188,6 +188,93 @@ Managed commands: G68, G69 (idempotent with <a class="xref" href="Hi.NcParsers.L
|
||||
</dd></dl>
|
||||
|
||||
|
||||
<h2 id="Hi_NcParsers_LogicSyntaxs_IsoG68RotationSyntax_examples">Examples</h2>
|
||||
<p>All cases below avoid the cos/sin rotation math by using either G69
|
||||
cancel (identity), the first-block default (no transform composed),
|
||||
or modal carry of an identity Mat4d. <code>Mat4d</code> arrays are 16
|
||||
plain doubles in column-major order — see
|
||||
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoCoordinateOffsetSyntax.html">IsoCoordinateOffsetSyntax</a> for the template. A future
|
||||
round can add a non-trivial G68 case by dumping the actual output
|
||||
and pasting the 16 doubles back into the marker.</p>
|
||||
<p>
|
||||
First block of the stream (no <code>#Previous:</code>, no G68/G69 on the
|
||||
block) — <code>CarryForwardFromPrevious</code> stamps a default
|
||||
<code>TiltTransform.Term = "G69"</code> so downstream lookback always
|
||||
sees a concrete state; no transform chain entry is composed:
|
||||
</p>
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ }</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{ "TiltTransform": { "Term": "G69" } }</code></pre>
|
||||
G69 flag on the block — <code>TryHandleG69</code> consumes it, writes the
|
||||
G69 section, and composes the identity Mat4d into the chain so any
|
||||
previously composed tilt rotation is overridden:
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G69"] } }</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"TiltTransform": { "Term": "G69" },
|
||||
"ProgramToMcTransform": [
|
||||
{
|
||||
"Source": "TiltTransform",
|
||||
"Kind": "Static",
|
||||
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
Modal carry: no G68/G69 on the current block, but
|
||||
<code>#Previous:</code> carries an active G68 with identity tilt Mat4d in
|
||||
its chain. The current block inherits <code>TiltTransform.Term = "G68"</code>
|
||||
and re-composes the same Mat4d into its own chain; unrelated M03
|
||||
flag survives because this syntax does not touch <code>Parsing</code>
|
||||
during the carry path:
|
||||
#Previous:
|
||||
<pre><code class="lang-csharp">{
|
||||
"TiltTransform": { "Term": "G68" },
|
||||
"ProgramToMcTransform": [
|
||||
{
|
||||
"Source": "TiltTransform",
|
||||
"Kind": "Static",
|
||||
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"Parsing": { "Flags": ["M03"] },
|
||||
"TiltTransform": { "Term": "G68" },
|
||||
"ProgramToMcTransform": [
|
||||
{
|
||||
"Source": "TiltTransform",
|
||||
"Kind": "Static",
|
||||
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
Non-trivial G68 rotation: 90° around the Z axis (no I/J/K → plane
|
||||
normal of the default G17 plane) at the origin (no X/Y/Z → all 0).
|
||||
The Mat4d column-major layout is rotation 90° about Z (no
|
||||
translation since pivot is the origin); <code>cos(π/2)</code> is not
|
||||
exactly 0 in IEEE-754 so the diagonal carries the
|
||||
<code>6.123233995736766E-17</code> drift produced by
|
||||
<code>Math.Cos(Math.PI / 2)</code> — preserved verbatim per the
|
||||
no-shorthand marker convention:
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "G68": { "R": 90 } } }</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"TiltTransform": { "Term": "G68" },
|
||||
"ProgramToMcTransform": [
|
||||
{
|
||||
"Source": "TiltTransform",
|
||||
"Kind": "Static",
|
||||
"Mat4d": [6.123233995736766E-17, 1, 0, 0, -1, 6.123233995736766E-17, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
|
||||
|
||||
<h2 id="Hi_NcParsers_LogicSyntaxs_IsoG68RotationSyntax_remarks">Remarks</h2>
|
||||
<div class="markdown level0 remarks"><p>Input: Parsing.G68 → {X,Y,Z,I,J,K,R} from ParameterizedFlagSyntax.
|
||||
|
||||
Reference in New Issue
Block a user