deploy fixed MRR drift and webservice CylindroidHolder buckle branch update issue.
This commit is contained in:
@@ -200,7 +200,9 @@ writes a <a class="xref" href="Hi.NcParsers.Keywords.MotionEvent.html">MotionEve
|
||||
set (as a prior <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a> would have produced)
|
||||
and run with no <code>#Previous:</code>, so <code>GetLastProgramXyz</code>
|
||||
returns <code>Vec3d.Zero</code>. The G17 XY plane is implicit
|
||||
(no <code>PlaneSelect</code> section means <code>PlaneNormalDir = 2</code>).</p>
|
||||
(no <code>PlaneSelect</code> section means
|
||||
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.PlaneSelectSyntax.html#Hi_NcParsers_LogicSyntaxs_PlaneSelectSyntax_GetPlaneNormalDir_System_Text_Json_Nodes_JsonObject_">GetPlaneNormalDir(JsonObject)</a> returns 2 — the
|
||||
XY-plane default — so arc math runs with Z as the perpendicular axis).</p>
|
||||
<p>
|
||||
G02 with I/J — quarter arc from <code>(0,0,0)</code> to <code>(10,0,0)</code>
|
||||
around <code>(5,0,0)</code>; I=5 J=0 are incremental offsets from start
|
||||
@@ -219,7 +221,6 @@ once empty); <code>MotionState</code> + <code>MotionEvent</code> are written:
|
||||
"MotionEvent": {
|
||||
"Form": "McArc",
|
||||
"ArcCenter": { "X": 5, "Y": 0, "Z": 0 },
|
||||
"PlaneNormalDir": 2,
|
||||
"IsCcw": false,
|
||||
"AdditionalCircleNum": 0
|
||||
}
|
||||
@@ -242,7 +243,6 @@ the same way:
|
||||
"MotionEvent": {
|
||||
"Form": "McArc",
|
||||
"ArcCenter": { "X": 5, "Y": 0, "Z": 0 },
|
||||
"PlaneNormalDir": 2,
|
||||
"IsCcw": false,
|
||||
"AdditionalCircleNum": 0
|
||||
}
|
||||
@@ -277,14 +277,13 @@ sqrt drift on this branch:
|
||||
"MotionEvent": {
|
||||
"Form": "McArc",
|
||||
"ArcCenter": { "X": 5, "Y": 0, "Z": 0 },
|
||||
"PlaneNormalDir": 2,
|
||||
"IsCcw": false,
|
||||
"AdditionalCircleNum": 0
|
||||
}
|
||||
}</code></pre>
|
||||
R-format non-trivial: G02 90° arc from <code>(0,0,0)</code> to
|
||||
<code>(10,10,0)</code> with R=10. The center comes from the cross-product
|
||||
+ sqrt + normalize path inside <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">ResolveCenterFromR(Vec3d, Vec3d, int, bool, double)</a>,
|
||||
+ sqrt + normalize path inside <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">ResolveCenterFromSignedRadius(Vec3d, Vec3d, int, bool, double)</a>,
|
||||
but for this particular axis-aligned chord the rounding errors
|
||||
cancel and the center lands at exactly <code>(10, 0, 0)</code> — i.e.
|
||||
no ULP drift here, in contrast to e.g.
|
||||
@@ -301,7 +300,6 @@ no ULP drift here, in contrast to e.g.
|
||||
"MotionEvent": {
|
||||
"Form": "McArc",
|
||||
"ArcCenter": { "X": 10, "Y": 0, "Z": 0 },
|
||||
"PlaneNormalDir": 2,
|
||||
"IsCcw": false,
|
||||
"AdditionalCircleNum": 0
|
||||
}
|
||||
@@ -322,16 +320,15 @@ differentiating output; arc-center math is unchanged:
|
||||
"MotionEvent": {
|
||||
"Form": "McArc",
|
||||
"ArcCenter": { "X": 5, "Y": 0, "Z": 0 },
|
||||
"PlaneNormalDir": 2,
|
||||
"IsCcw": true,
|
||||
"AdditionalCircleNum": 0
|
||||
}
|
||||
}</code></pre>
|
||||
Full circle G02 — start == end (both <code>(0,0,0)</code>), I=5 J=0
|
||||
places center off-start at <code>(5,0,0)</code>. The
|
||||
<code>isFullCircle</code> guard (chord length < 1e-6 and
|
||||
center-to-start > 1e-6) flips <code>AdditionalCircleNum</code> to 1
|
||||
so a downstream motion semantic knows to draw the closed loop:
|
||||
places center off-start at <code>(5,0,0)</code>. Plane-restricted
|
||||
closure (<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">IsClosedOnPlane(Vec3d, Vec3d, int, double)</a>)
|
||||
flips <code>AdditionalCircleNum</code> to 1 so a downstream motion
|
||||
semantic knows to draw the closed loop:
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"Parsing": { "Flags": ["G02"], "I": 5, "J": 0 },
|
||||
@@ -344,11 +341,54 @@ so a downstream motion semantic knows to draw the closed loop:
|
||||
"MotionEvent": {
|
||||
"Form": "McArc",
|
||||
"ArcCenter": { "X": 5, "Y": 0, "Z": 0 },
|
||||
"PlaneNormalDir": 2,
|
||||
"IsCcw": false,
|
||||
"AdditionalCircleNum": 1
|
||||
}
|
||||
}</code></pre>
|
||||
Fanuc L parameter (helix turn count, 1-based) — <code>L3</code> on a
|
||||
start==end closed loop means three total turns, so
|
||||
<code>AdditionalCircleNum = L − 1 = 2</code>. Matches legacy
|
||||
<code>NcProc.cs:442</code>; the L parameter is consumed alongside I/J/K/R:
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"Parsing": { "Flags": ["G02"], "I": 5, "J": 0, "L": 3 },
|
||||
"ProgramXyz": { "X": 0, "Y": 0, "Z": 0 }
|
||||
}</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"ProgramXyz": { "X": 0, "Y": 0, "Z": 0 },
|
||||
"MotionState": { "Term": "G02" },
|
||||
"MotionEvent": {
|
||||
"Form": "McArc",
|
||||
"ArcCenter": { "X": 5, "Y": 0, "Z": 0 },
|
||||
"IsCcw": false,
|
||||
"AdditionalCircleNum": 2
|
||||
}
|
||||
}</code></pre>
|
||||
K-as-pitch helix on G17 (XY plane) — when the plane-normal axis
|
||||
letter (K for G17, J for G18, I for G19) is present on an IJK-format
|
||||
arc, it is the per-turn axial pitch, not a center offset. Here
|
||||
<code>K = −3</code> mm/turn over <code>ΔZ = −9</code> mm gives
|
||||
<code>AdditionalCircleNum = floor(−9 / −3) = 3</code>. The center stays
|
||||
on the begin-plane (Z = 0) — <code>ResolveCenterFromIjk</code> zeros the
|
||||
plane-normal component before adding to begin. Matches legacy
|
||||
<code>NcProc.cs:458</code>:
|
||||
#BeforeBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"Parsing": { "Flags": ["G02"], "I": 5, "J": 0, "K": -3 },
|
||||
"ProgramXyz": { "X": 0, "Y": 0, "Z": -9 }
|
||||
}</code></pre>
|
||||
#AfterBuild:
|
||||
<pre><code class="lang-csharp">{
|
||||
"ProgramXyz": { "X": 0, "Y": 0, "Z": -9 },
|
||||
"MotionState": { "Term": "G02" },
|
||||
"MotionEvent": {
|
||||
"Form": "McArc",
|
||||
"ArcCenter": { "X": 5, "Y": 0, "Z": 0 },
|
||||
"IsCcw": false,
|
||||
"AdditionalCircleNum": 3
|
||||
}
|
||||
}</code></pre>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user