rename XFactory.Regs to XFactory.Generators.
This commit is contained in:
@@ -185,6 +185,97 @@ syntaxes (e.g., <a class="xref" href="Hi.NcParsers.LogicSyntaxs.G43p4RtcpSyntax.
|
||||
</dd></dl>
|
||||
|
||||
|
||||
<h2 id="Hi_NcParsers_LogicSyntaxs_ToolHeightOffsetSyntax_examples">Examples</h2>
|
||||
<p>All cases below have no <code>ToolOrientation</code> section and no
|
||||
<code>TiltTransform</code> entry in the chain — the composed translation
|
||||
therefore lies along <code>UnitZ</code> (the identity tilt's
|
||||
<code>AxialNormal</code>), so <code>Mat4d.Trans = (0, 0, height_mm)</code>.</p>
|
||||
<p>
|
||||
G43 H1 with a <code>TestDeps.ToolOffset</code> mapping offset 1 to 99.98
|
||||
mm — full consume from <code>Parsing.G43</code>, positive sign on G43:
|
||||
</p>
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "G43": { "H": "1" } } }</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"ToolHeightCompensation": {
|
||||
"Offset_mm": 99.98, "Term": "G43", "OffsetId": 1
|
||||
},
|
||||
"ProgramToMcTransform": [
|
||||
{
|
||||
"Source": "ToolHeightCompensation",
|
||||
"Kind": "Static",
|
||||
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,99.98,1]
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
G49 cancel flag — writes a sentinel <code>G49</code> section with
|
||||
<code>Offset_mm = 0</code>, <code>OffsetId = 0</code>, and composes an identity
|
||||
Mat4d so any previously composed tool-height translation is reset:
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G49"] } }</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"ToolHeightCompensation": {
|
||||
"Offset_mm": 0, "Term": "G49", "OffsetId": 0
|
||||
},
|
||||
"ProgramToMcTransform": [
|
||||
{
|
||||
"Source": "ToolHeightCompensation",
|
||||
"Kind": "Static",
|
||||
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
No G43/G44/G49 on the current block but <code>#Previous:</code> carries
|
||||
an active G43 H1 — modal lookback inherits the term + offset id,
|
||||
re-queries the tool table, and re-composes the translation. The
|
||||
unrelated M03 flag survives because the consume path only triggers
|
||||
when an ISO term is on the current block:
|
||||
#Previous:
|
||||
<pre><code class="lang-csharp">{
|
||||
"ToolHeightCompensation": {
|
||||
"Offset_mm": 99.98, "Term": "G43", "OffsetId": 1
|
||||
}
|
||||
}</code></pre>
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"Parsing": { "Flags": ["M03"] },
|
||||
"ToolHeightCompensation": {
|
||||
"Offset_mm": 99.98, "Term": "G43", "OffsetId": 1
|
||||
},
|
||||
"ProgramToMcTransform": [
|
||||
{
|
||||
"Source": "ToolHeightCompensation",
|
||||
"Kind": "Static",
|
||||
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,99.98,1]
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
G44 H1 with the same <code>TestDeps.ToolOffset</code> offset-1 →
|
||||
99.98 mm — G44 negates the table value, so
|
||||
<code>Offset_mm = -99.98</code> and the composed translation lies along
|
||||
<code>-UnitZ</code>. The X/Y components of <code>toolOrientation * -99.98</code>
|
||||
land on IEEE-754 negative zero (<code>0 * -99.98 = -0.0</code>), which
|
||||
<code>System.Text.Json</code> emits literally as <code>-0</code>:
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "G44": { "H": "1" } } }</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"ToolHeightCompensation": {
|
||||
"Offset_mm": -99.98, "Term": "G44", "OffsetId": 1
|
||||
},
|
||||
"ProgramToMcTransform": [
|
||||
{
|
||||
"Source": "ToolHeightCompensation",
|
||||
"Kind": "Static",
|
||||
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, -0,-0,-99.98,1]
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
|
||||
|
||||
<h2 id="Hi_NcParsers_LogicSyntaxs_ToolHeightOffsetSyntax_remarks">Remarks</h2>
|
||||
<div class="markdown level0 remarks"><p>Input data locations in <a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html#Hi_NcParsers_Syntaxs_SyntaxPiece_JsonObject">JsonObject</a>:</p>
|
||||
|
||||
Reference in New Issue
Block a user