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:
+54
-19
@@ -195,17 +195,44 @@ Motion is handled by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotio
|
||||
|
||||
|
||||
<h2 id="Hi_NcParsers_LogicSyntaxs_G53p1RotaryPositionSyntax_examples">Examples</h2>
|
||||
<p>No-kinematics dep-guard early-return: standalone <code>G53.1</code> with
|
||||
<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 (real table-head machines have a spindle pivot
|
||||
offset). The <code>TestDeps.AxisConfig((“A”, Rotary), (“B”, Rotary))</code>
|
||||
dep supplies the <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html">IMachineAxisConfig</a> that the syntax
|
||||
queries for the rotary axis list; the <code>rotaryAxes</code> loop
|
||||
therefore writes exactly the A and B columns of
|
||||
<code>MachineCoordinateState</code>. There is no C axis on this
|
||||
machine (5-axis machines have at most two rotary axes).</p>
|
||||
<p>
|
||||
Verification cue: IK converts the active tilt's
|
||||
<code>AxialNormal</code> back to rotary degrees. For an IJK=(0,30°,0)
|
||||
tilt the solver picks an A angle close to 30° (drift from
|
||||
chain-axis-pivot offsets shows up as A≈29.94° in case 1) and
|
||||
leaves B at 0°.
|
||||
</p>
|
||||
<p>
|
||||
No-kinematics dep-guard early-return: standalone <code>G53.1</code> with
|
||||
no <a class="xref" href="Hi.Numerical.Xyzabc.IMachineKinematics.html">IMachineKinematics</a> dep in the list — the syntax
|
||||
detects the flag, finds no kinematics, and silently consumes the
|
||||
flag via <code>ConsumeFlag</code>. Empty <code>Parsing</code> is then removed
|
||||
by <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">CleanupParsing(JsonObject)</a>, so the post-Build block
|
||||
is empty:
|
||||
#BeforeBuild:</p>
|
||||
emits validation error <code>Coord-MachCoord--005</code> (G53.1 on a
|
||||
machine without rotary IK is an unexpected combination —
|
||||
typically a 5-axis NC file run against a 3-axis machine config,
|
||||
or a missing dep wire-up) and then consumes the flag via
|
||||
<code>ConsumeFlag</code>. Empty <code>Parsing</code> is then removed by
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">CleanupParsing(JsonObject)</a>, so the post-Build block
|
||||
JSON is empty even though the diagnostic message was sent (the
|
||||
conformance check verifies only the JSON shape):
|
||||
</p>
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G53.1"] } }</code></pre>
|
||||
<p>#AfterBuild:</p>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{}</code></pre>
|
||||
<p>IK happy path — <code>G53.1</code> with active G68.2 tilt on
|
||||
IK happy path — <code>G53.1</code> with active G68.2 tilt on
|
||||
<code>#Previous:</code>, real <a class="xref" href="Hi.Numerical.Xyzabc.XyzabcSolver.html">XyzabcSolver</a>
|
||||
(table-A / head-B 5-axis), and a
|
||||
<code>TestDeps.AxisConfig(A=Rotary, B=Rotary)</code> dep. The syntax
|
||||
@@ -213,8 +240,14 @@ reads the previous block's tilt Mat4d, solves
|
||||
<code>OrientationToMcAbc(tiltMat.AxialNormal)</code> for the rotary ABC,
|
||||
converts radians → degrees, writes <code>MachineCoordinateState</code>
|
||||
with both rotary axes (XYZ inherited from <code>prevMc = Vec3d.Zero</code>
|
||||
when no previous MC exists), and stamps <code>ProgramXyz</code>:
|
||||
#Previous:</p>
|
||||
when no previous MC exists), and stamps <code>ProgramXyz</code>. The
|
||||
block also gets a non-modal <a class="xref" href="Hi.NcParsers.Keywords.MotionEvent.html">MotionEvent</a> with
|
||||
<code>Term: "G53.1"</code> so the source G-code survives in JSON for
|
||||
bidirectional reconstruction (per the precedence rule on
|
||||
<a class="xref" href="Hi.NcParsers.Keywords.IMotionEventDef.html#Hi_NcParsers_Keywords_IMotionEventDef_Term">Term</a>: when set, this is the
|
||||
block's actual motion source; the modal <a class="xref" href="Hi.NcParsers.Keywords.MotionState.html">MotionState</a>
|
||||
remains as inherited context):
|
||||
#Previous:
|
||||
<pre><code class="lang-csharp">{
|
||||
"TiltTransform": { "Term": "G68.2", "X": 0, "Y": 0, "Z": 0, "I": 0, "J": 30, "K": 0 },
|
||||
"ProgramToMcTransform": [
|
||||
@@ -230,20 +263,21 @@ when no previous MC exists), and stamps <code>ProgramXyz</code>:
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
<p>#BeforeBuild:</p>
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G53.1"] } }</code></pre>
|
||||
<p>#AfterBuild:</p>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"MachineCoordinateState": { "X": 0, "Y": 0, "Z": 0, "A": 29.942194198514308, "B": 0 },
|
||||
"ProgramXyz": { "X": 0, "Y": 0, "Z": 0 }
|
||||
"MachineCoordinateState": { "X": 0, "Y": 0, "Z": 0, "A": 29.99999937094331, "B": 0 },
|
||||
"ProgramXyz": { "X": 0, "Y": 0, "Z": 0 },
|
||||
"MotionEvent": { "Form": "McLinear", "IsRapid": true, "Term": "G53.1" }
|
||||
}</code></pre>
|
||||
<p>Explicit ABC override — <code>G53.1 A0 B45</code> on top of the same
|
||||
Explicit ABC override — <code>G53.1 A0 B45</code> on top of the same
|
||||
G68.2 tilt + kinematics + axis-config set up. The IK still solves,
|
||||
but the explicit <code>A=0</code> and <code>B=45</code> overrides what IK
|
||||
returned for those axes; C stays at the IK-solved value (C-axis
|
||||
is not present in the table-A/head-B layout, so the rotaryAxes
|
||||
loop only writes A and B):
|
||||
#Previous:</p>
|
||||
#Previous:
|
||||
<pre><code class="lang-csharp">{
|
||||
"TiltTransform": { "Term": "G68.2", "X": 0, "Y": 0, "Z": 0, "I": 0, "J": 30, "K": 0 },
|
||||
"ProgramToMcTransform": [
|
||||
@@ -259,14 +293,15 @@ loop only writes A and B):
|
||||
}
|
||||
]
|
||||
}</code></pre>
|
||||
<p>#BeforeBuild:</p>
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"Parsing": { "Flags": ["G53.1"], "A": 0, "B": 45 }
|
||||
}</code></pre>
|
||||
<p>#AfterBuild:</p>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"MachineCoordinateState": { "X": 0, "Y": 0, "Z": 0, "A": 0, "B": 45 },
|
||||
"ProgramXyz": { "X": 0, "Y": 0, "Z": 0 }
|
||||
"ProgramXyz": { "X": 0, "Y": 0, "Z": 0 },
|
||||
"MotionEvent": { "Form": "McLinear", "IsRapid": true, "Term": "G53.1" }
|
||||
}</code></pre>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user