Archived
deploy webservice static-file routing for docsite folder URLs, per-instance step-cache db, and constant-height panel title bars.
This commit is contained in:
@@ -208,7 +208,25 @@ ToolHeightCompensation entry when RTCP is active) and <b>before</b>
|
||||
|
||||
|
||||
<h2 id="Hi_NcParsers_LogicSyntaxs_G43p4RtcpSyntax_examples">Examples</h2>
|
||||
<p>Explicit G43.4 H1 activation with no <a class="xref" href="Hi.Numerical.Xyzabc.IMachineKinematics.html">IMachineKinematics</a>
|
||||
<p>Real-kinematics cases below wire <code>TestDeps.CodeKinematics</code>
|
||||
with the default chain code <code>[O][Z][A][w];[O][Y][X][B][S][t]</code>
|
||||
— a <b>table-A / head-B 5-axis</b> machine. A pivots around -X
|
||||
through origin (table side); B pivots around +Y through origin
|
||||
(head side). Both pivot axes pass through <code>(0,0,0)</code> because
|
||||
<a class="xref" href="Hi.Numerical.Xyzabc.CodeXyzabcChain.html">CodeXyzabcChain</a> uses zero-offset
|
||||
component attachments — the head-B origin pivot is a pedagogical
|
||||
simplification (a real table-head machine has the spindle pivot
|
||||
offset from origin). Realistic <code>MachineCoordinateState</code>
|
||||
therefore carries A and B only; there is no C axis in this chain
|
||||
(5-axis machines have at most two rotary axes).</p>
|
||||
<p>
|
||||
Verification cue: with B=30° on the head side and the cutter
|
||||
extending +Z in tool frame at ABC=0, the tool normal after the
|
||||
head rotation lies at <code>(sin 30°, 0, cos 30°)</code>; multiplying
|
||||
by the 10 mm tool length gives <code>Trans ≈ (5, 0, 8.66)</code>.
|
||||
</p>
|
||||
<p>
|
||||
Explicit G43.4 H1 activation with no <a class="xref" href="Hi.Numerical.Xyzabc.IMachineKinematics.html">IMachineKinematics</a>
|
||||
and no <a class="xref" href="Hi.NcParsers.Dependencys.IToolOffsetConfig.html">IToolOffsetConfig</a> in the dependency list —
|
||||
exercises the activate path on its identity-matrix corner. The
|
||||
section is written with <code>Offset_mm = 0</code> (no offset table
|
||||
@@ -216,9 +234,10 @@ section is written with <code>Offset_mm = 0</code> (no offset table
|
||||
no-kinematics branch <code>new Mat4d { Trans = UnitZ * 0 }</code> which
|
||||
collapses to identity; <code>abcChanged</code> is false (no current MC,
|
||||
no previous block) so the entry is tagged <a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_KindStatic">KindStatic</a>.
|
||||
#BeforeBuild:</p>
|
||||
</p>
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "G43.4": { "H": "1" } } }</code></pre>
|
||||
<p>#AfterBuild:</p>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"ToolHeightCompensation": { "Offset_mm": 0, "Term": "G43.4", "OffsetId": 1 },
|
||||
"ProgramToMcTransform": [
|
||||
@@ -229,28 +248,23 @@ no previous block) so the entry is tagged <a class="xref" href="Hi.NcParsers.Syn
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
<p>G43.4 H1 with <code>ToolOffset(1 → 10 mm)</code>, a real
|
||||
<a class="xref" href="Hi.Numerical.Xyzabc.XyzabcSolver.html">XyzabcSolver</a> (table-A / head-B
|
||||
5-axis), and current block already carrying all three rotary axes
|
||||
in <code>MachineCoordinateState</code> (A=0, B=30, C=0 — as a prior
|
||||
<code>McAbcSyntax</code> in the chain would have written). The
|
||||
G43.4 H1 with <code>ToolOffset(1 → 10 mm)</code>, the real 5-axis solver
|
||||
above, and current block carrying both rotary axes
|
||||
<code>MachineCoordinateState.A = 0, B = 30</code> (as a prior
|
||||
<code>McAbcSyntax</code> would have written on this machine). The
|
||||
height-mat goes through
|
||||
<a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_MakeToolHeightMat_Hi_Numerical_Xyzabc_IMachineKinematics_Hi_Geom_Vec3d_System_Double_">MakeToolHeightMat(IMachineKinematics, Vec3d, double)</a> which probes
|
||||
<code>kinematics.McToPn(Zero, abc).Normal</code> at <code>abc = (0, π/6, 0)</code>
|
||||
to get the tool orientation, then scales by 10 mm. With no
|
||||
previous block, <code>abcChanged</code> is false → entry stays Static.
|
||||
Note: all three ABC must be present (or fall back to the per-axis
|
||||
modal lookback path); a partial section with only B set leaves A/C
|
||||
as NaN and the resulting Mat4d.Trans would serialise as
|
||||
non-finite numbers.
|
||||
#BeforeBuild:</p>
|
||||
previous block, <code>abcChanged</code> is false → entry stays Static:
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"Parsing": { "G43.4": { "H": "1" } },
|
||||
"MachineCoordinateState": { "A": 0, "B": 30, "C": 0 }
|
||||
"MachineCoordinateState": { "A": 0, "B": 30 }
|
||||
}</code></pre>
|
||||
<p>#AfterBuild:</p>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"MachineCoordinateState": { "A": 0, "B": 30, "C": 0 },
|
||||
"MachineCoordinateState": { "A": 0, "B": 30 },
|
||||
"ToolHeightCompensation": { "Offset_mm": 10, "Term": "G43.4", "OffsetId": 1 },
|
||||
"ProgramToMcTransform": [
|
||||
{
|
||||
@@ -265,24 +279,24 @@ non-finite numbers.
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
<p>Same setup plus a <code>#Previous:</code> block with
|
||||
Same setup plus a <code>#Previous:</code> block with
|
||||
<code>MachineCoordinateState.B = 0</code> + XYZ origin —
|
||||
<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">DidAbcChange(LazyLinkedListNode<SyntaxPiece>, IMachineAxisConfig)</a> compares the rotary deltas and finds B
|
||||
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzUtil.html#Hi_NcParsers_LogicSyntaxs_ProgramXyzUtil_DidAbcChange_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__Hi_NcParsers_Dependencys_IMachineAxisConfig_">DidAbcChange(LazyLinkedListNode<SyntaxPiece>, IMachineAxisConfig)</a> compares the rotary deltas and finds B
|
||||
changed across the block, so the entry is tagged
|
||||
<a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_KindDynamic">KindDynamic</a> (signalling that the
|
||||
tool orientation varies along the contour):
|
||||
#Previous:</p>
|
||||
#Previous:
|
||||
<pre><code class="lang-csharp">{
|
||||
"MachineCoordinateState": { "X": 0, "Y": 0, "Z": 0, "A": 0, "B": 0, "C": 0 }
|
||||
"MachineCoordinateState": { "X": 0, "Y": 0, "Z": 0, "A": 0, "B": 0 }
|
||||
}</code></pre>
|
||||
<p>#BeforeBuild:</p>
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"Parsing": { "G43.4": { "H": "1" } },
|
||||
"MachineCoordinateState": { "A": 0, "B": 30, "C": 0 }
|
||||
"MachineCoordinateState": { "A": 0, "B": 30 }
|
||||
}</code></pre>
|
||||
<p>#AfterBuild:</p>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"MachineCoordinateState": { "A": 0, "B": 30, "C": 0 },
|
||||
"MachineCoordinateState": { "A": 0, "B": 30 },
|
||||
"ToolHeightCompensation": { "Offset_mm": 10, "Term": "G43.4", "OffsetId": 1 },
|
||||
"ProgramToMcTransform": [
|
||||
{
|
||||
@@ -297,6 +311,25 @@ tool orientation varies along the contour):
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
Explicit activation whose H did not survive variable evaluation
|
||||
(vacant <code>#100</code> stays a string) — no offset id resolves, RTCP
|
||||
still activates with a zero-length compensation (identity height
|
||||
mat) and the syntax emits the <code>Comp-ToolHeight--001</code>
|
||||
validation warning (asserted by the integration test; the dump
|
||||
below pins the JSON shape only):
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "G43.4": { "H": "#100" } } }</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"ToolHeightCompensation": { "Offset_mm": 0, "Term": "G43.4", "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>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user