This repository has been archived on 2026-10-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
HiNC-2025-win-desktop-Deploy/App/wwwroot/HiAPI-docsite/release-note/upgrading-to-3.2/results-that-change-on-upgrade.html
T
2026-09-12 18:16:27 +08:00

238 lines
16 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Results that change on upgrade | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Results that change on upgrade | HiAPI-C# 2025 ">
<link rel="icon" href="../../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../../public/docfx.min.css">
<link rel="stylesheet" href="../../public/main.css">
<meta name="docfx:navrel" content="../../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Release-Upgrading-ResultsThatChange">
<h1 id="results-that-change-on-upgrade">Results that change on upgrade</h1>
<p>None of the following breaks a build. All of them change what a simulation produces, so a
byte-for-byte comparison against 3.1.175 output will differ — usually because 3.1.175 was wrong.</p>
<p><strong>Silent wrong geometry, now fixed.</strong> Each of these produced a plausible-looking simulation of the
wrong thing.</p>
<ul>
<li><strong>The kinematic pivot anchor.</strong> The pivot-transform chain entry was built as <code>K(0)·K(abc)⁻¹</code>,
folding the whole machine-zero forward kinematic — its linear part included — into the pre-pivot
anchor. That linear part encodes each axis' motion sense and tool/workpiece-side ownership, so it
mirrored the program components of every workpiece-side linear axis before the IK ran. On a
table-side chain whose machine-zero linear part is <code>diag(1,1,-1)</code>, every program Z was mirrored and
a near-180° swing amplified it into metres of machine-Z error, floating the toolpath above the
workpiece. The anchor is now the translation alone, matching what HardNc has always kept. Machines
whose linear axes all ride the tool side are unaffected.</li>
<li><strong>G68 2D coordinate rotation was a silent no-op.</strong> <a class="xref" href="../../api/Hi.NcParsers.LogicSyntaxs.TiltTransformUtil.html">TiltTransformUtil</a>
judged the active mode from the current block but always took the matrix from the previous one, so
every G68 activation past the first block had its freshly authored rotation overwritten with an
identity that then propagated. G68 rotation did nothing at all while the block's term still read
<code>G68</code>, and the simulation machined the unrotated pattern. Re-running an existing G68 program now
gives different — correct — geometry.</li>
<li><strong>A blank line reset G90/G91.</strong> A piece with no parsing section — a blank line, a comment-only line,
<code>%</code>, an O-number — left the next block's single-step lookback empty, and it fell back to the G90
default. A program that was incremental throughout silently flipped to absolute mid-file. Such
pieces now carry the positioning section forward like every other modal syntax.</li>
<li><strong>A Siemens D offset with no <code>$TC_DP</code> row resolved to zero length, in silence.</strong> A whole TRAORI
program machined one tool length low. The read point now falls back to the generic tool-number-keyed
height and emits <code>SiemensToolOffset--TcdpRowMissing</code>.</li>
<li><strong>G43.4 with an unresolvable H word activated RTCP with a zero-length tool.</strong> It now reports
<code>Comp-ToolHeight--001</code> as a warning and keeps processing the block. An absent H stays silent —
re-activating G43.4 on the modal offset id is legitimate input.</li>
<li><strong>Heidenhain DIN/ISO arc centres.</strong> <code>I</code> / <code>J</code> / <code>K</code> are <strong>absolute</strong> circle centres on Heidenhain —
the ISO face of the klartext <code>CC</code> pole — not start-to-centre offsets. Reading them incrementally
turned arcs into near-full phantom circles. Fixed in all three engines: the HardNc reader
(<a class="xref" href="../../api/Hi.Numerical.NcArgs.ArcNcArg.html#Hi_Numerical_NcArgs_ArcNcArg_IsIjkAbsolute">IsIjkAbsolute</a>), the SoftNc reader
(<a class="xref" href="../../api/Hi.NcParsers.LogicSyntaxs.CircularMotionSyntax.html#Hi_NcParsers_LogicSyntaxs_CircularMotionSyntax_IsIjkAbsolute">IsIjkAbsolute</a>) and the optimizer's write-back.
<code>G91</code> is the exception: an incremental block switches the words back to start-to-centre offsets, so
an arc programmed under <code>G91</code> is unaffected by this change. Also delivered on the 3.1.175.x service
line.</li>
<li><strong>Feed per tooth, MRR and cutting forces follow the equipped tool's tip, not the controller's F
word.</strong> The physics used to read the commanded CL feedrate. It now reads the step's real tip
feedrate (<a class="xref" href="../../api/Hi.MachiningSteps.MachineMotionStep.html#Hi_MachiningSteps_MachineMotionStep_ActualTipFeedrate_mmds">ActualTipFeedrate_mmds</a>, client key
<a class="xref" href="../../api/Hi.MachiningSteps.MachiningStep.html#Hi_MachiningSteps_MachiningStep_ActualTipFeedrate_mmdmin">ActualTipFeedrate_mmdmin</a>): the tip's displacement relative
to the workpiece over the step duration. On XYZ moves, CL files and RTCP with the equipped tool's own
offset the two agree (the recomputation moves forces by at most about 1e-4 relative, from the
<code>TimeSpan</code>-quantised step duration); they part under RTCP with a tool-length offset that does not
describe the equipped tool, on rotary-axis-limited simultaneous five-axis blocks (the tip is slower
than F, up to a few percent), and wherever the commanded value was stale. One such stale case is
fixed alongside: a feed block that repeats the current position (<code>X.. Y.. Z.. F1600.</code> right after
the same point at <code>F800.</code>) lost its F word, so every following block showed and cut at the old
feed; its <code>ActFeedrate</code> now lands.</li>
<li><strong>A <code>K0</code> word on a HardNc G02/G03 saturated the turn count.</strong> Under the default G17 plane a
written-but-zero plane-normal word divided the axial travel by zero, the additional-turn count
saturated to <code>int.MaxValue</code>, and one arc block became a spiral act of roughly 302 simulated years —
the play appeared to hang on a single NC line. The reading now falls back to the closed-circle rule
for a zero pace, matching the guard the SoftNc side already had.</li>
<li><strong>Indexed-rotary programs folded the pivot into plain moves.</strong> A block with no active G68.2 or
G43.4 no longer folds the kinematic pivot transform into a plain XYZ move, which is what a real
controller does with a table-side rotary program.</li>
<li><strong>The radius-compensation arc transient cache landed on the wrong block.</strong> Any non-motion line
between the corner and the arc orphaned the cache, so the arc lost its leading linear bridge and
began at the corner intersection instead of on the offset arc.</li>
<li><strong>Cutter radius compensation on G18 / G19 ran out of the plane.</strong> Both engines built the
perpendicular as <code>Z × axis</code> whatever plane was selected, so under G18 or G19 the whole offset went
one radius along the plane normal (a <code>G41</code> region in the ZX plane was displaced in Y), every arc of
the region reported <code>Arc-EndpointOffRadius</code>, and the <code>RadiusComp--Interference</code> gate could not fire
there. Both engines now take the perpendicular, the in-plane test for blocks without movement and
the interference gate from the selected plane: the offset lies in the plane, left/right is judged
looking down the plane's positive normal (the same convention that orients G02/G03), and the
diagnostics behave as on G17. G17 programs are unaffected.</li>
<li><strong>The G68.2 tool-axis IK fallback probed the mirrored tool axis.</strong> Both normal-only fallbacks in
<a class="xref" href="../../api/Hi.NcParsers.LogicSyntaxs.IsoG68p2TiltSyntax.html">IsoG68p2TiltSyntax</a> read the transposed third column instead of the
third row. On the no-hint path this only skewed a warning gate, but the explicit A/B/C path seeds
its hint blend from that solve, so a machine with fewer than three rotary axes composed a mirrored
tilted plane.</li>
<li><strong>A Fanuc <code>WHILE</code> forward jump bound to the wrong <code>END</code>.</strong> Sequential loops idiomatically reuse
<code>DO 1</code>, so a second <code>WHILE</code>'s falsy-condition exit bound to the <em>first</em> loop's <code>END 1</code> and
redirected execution to a point before the second <code>WHILE</code> — an unbounded loop the iteration
watchdog cannot see, because it only ticks on <code>END</code> reverse jumps. The jump now uses the anchored
label scan the Siemens loop family already used.</li>
<li><strong>Heidenhain G28 is MIRROR IMAGE, not a reference-point return.</strong> On the Heidenhain preset the
shared pipeline had been reading it as the Fanuc reference return, so a <code>G28 X</code> block minted a
phantom rapid to home while the mirror silently vanished. It is now simulated as a program-to-MC
transform, <code>ReferenceReturnSyntax</code> leaves the Heidenhain logic list, and klartext <code>CYCL DEF 8</code>
records the same mirror statement so one program mirrors identically in either dialect. <strong>HardNc
keeps the Fanuc reading</strong>, so the two engines are deliberately divergent on Heidenhain G28 files and
any parity comparison must account for it.</li>
<li><strong><code>MathUtil.Convert_inchdmin_To_mmds</code> returned mm/min, not mm/s.</strong> The body multiplied by 25.4 and
never divided by 60, so a caller trusting the name got a 60× feedrate; the sibling
<code>Convert_mmdmin_To_mmds</code> divides as its name demands. No shipped path called it — the CL/APT
feedrate route converts inches-per-minute to mm/min itself — so this changes nothing inside the
product, but a caller who had compensated for the old behaviour must remove that compensation.</li>
<li><strong><code>GetRByZ(List&lt;PairZr&gt;)</code> never interpolated.</strong> The list overload looked up its ceiling node with
the floor lookup, so floor equalled ceiling and the method degenerated into a step function. For a
sharp cone whose inner-beam Z–R list has no node between apex and rim, that pinned the inner radius
to 0 across the whole cone face and produced NaN flute vertices — the root cause of the transparent
cone-tip flute that 3.1.180 addressed at the display layer. It affects every consumer of
radius-by-Z interpolation, force geometry included.</li>
</ul>
<p><strong>Numerical results move even where nothing was renamed.</strong></p>
<ul>
<li>Five-axis IK is roughly <strong>1000× tighter</strong>. The rotary solver behind
<a class="xref" href="../../api/Hi.Numerical.Xyzabc.XyzabcSolver.html">XyzabcSolver</a> now runs coarse→polish: the coarse stage keeps the
original dot residual so solve success and failure
semantics are unchanged, then a <code>[dot, cross, rr-per-axis]</code> system polishes. The dot criterion is
quadratically blind to angle error — an envelope of about 1.4e-3 rad, and the resulting tip error is
that envelope times the tool length — so adding the cross term restores quadratic convergence and
drops the envelope to about 1e-6 rad. Failed solves no longer pollute the implicit seed, and the
measure-zero perfect-saddle case is escaped by a deterministic retry offset instead of by leftover
seed pollution.</li>
<li><a class="xref" href="../../api/Hi.Numerical.Acts.ActMcXyzLinearContour.html">ActMcXyzLinearContour</a> steps by <strong>euclidean</strong> tip travel instead of the
largest per-axis component, so <code>LinearResolution_mm</code> now caps actual tool-tip travel per step and a
diagonal move produces up to √3× more steps at the same setting.</li>
<li>The SoftNc pipeline is the default engine.</li>
<li>Executed <code>SyntaxPiece</code>s freeze to UTF-8 (below), so their <code>JsonObject</code> is a fresh read-only snapshot
per call rather than a retained live graph.</li>
<li><code>SyntaxPiece.SentenceIndex</code> becomes a session-global execution-order counter and is no longer
contiguous per file.</li>
<li>Repeated NC diagnostics fold into per-run summaries at the run boundaries.</li>
<li><strong>HardNc tool changes</strong> fire on M06 / Heidenhain <code>TOOL CALL</code> rather than on a changed <code>T</code> word — a
bare <code>T</code> is magazine pre-selection, and a same-tool M06 still runs the changer cycle — and unset
<code>HardNcEnv</code> tooling defaults become the three-axis shape (XYZ = NaN, NaN, 0; ABC all NaN). The old
defaults swung all three rotary axes home on every M06, which no post expects.</li>
</ul>
</article>
<div class="contribution d-print-none">
</div>
<div class="next-article d-print-none border-top" id="nextArticle"></div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>