Archived
222 lines
16 KiB
HTML
222 lines
16 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>Milling physics, training and measured data | HiAPI-C# 2025 </title>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="title" content="Milling physics, training and measured data | 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 "{query}"">
|
||
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||
<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-MillingPhysics">
|
||
<h1 id="milling-physics-training-and-measured-data">Milling physics, training and measured data</h1>
|
||
|
||
<ul>
|
||
<li><strong>Physics runs in the native kernel.</strong> The per-step milling physics migrated into <code>core.dll</code> in
|
||
stages: the engagement is scan-converted natively at the substraction completion point, the force
|
||
kernel is reached through the same handle with no managed marshal, and the sequential
|
||
cutting-temperature and wear chain runs from a native thermal session held per (tool, cutting
|
||
parameter) pack. The switch is
|
||
<a class="xref" href="../../api/Hi.MillingForces.MillingForceUtil.html#Hi_MillingForces_MillingForceUtil_EnableNativeMillingPhysics">EnableNativeMillingPhysics</a>, surfaced runtime-only (not
|
||
persisted to project XML) as <a class="xref" href="../../api/Hi.MachiningProcs.MachiningActRunnerConfig.html#Hi_MachiningProcs_MachiningActRunnerConfig_EnableNativeMillingPhysics">EnableNativeMillingPhysics</a>
|
||
and <a class="xref" href="../../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_EnableNativeMillingPhysics">EnableNativeMillingPhysics</a>, and it now defaults to <code>true</code>.
|
||
Public entry points that used to reach the managed kernel still work: without a session pack they
|
||
build an ad-hoc physics pack per live (cutting parameter, tool) pair and run natively.</li>
|
||
<li><strong><a class="xref" href="../../api/Hi.Milling.MillingTools.MillingToolPhysicsPack.html">MillingToolPhysicsPack</a></strong> is an immutable record holding one tool's
|
||
scalar derivations for one cutting-parameter set — spindle-buckle-to-tip length, observation height,
|
||
effective cutting diameter, the bending/Z-deflection pair, the simplified rake angle, the minimum
|
||
uncut chip thickness. <a class="xref" href="../../api/Hi.MachiningProcs.MachiningSession.html">MachiningSession</a> owns the packs keyed by tool id
|
||
(<a class="xref" href="../../api/Hi.MachiningProcs.MachiningSession.html#Hi_MachiningProcs_MachiningSession_GetToolPhysicsPack_">GetToolPhysicsPack</a>) and invalidation is <strong>explicit</strong> at
|
||
the points that know the state changed: every run-op start and the tool-change act, plus
|
||
<a class="xref" href="../../api/Hi.MachiningProcs.MachiningSession.html#Hi_MachiningProcs_MachiningSession_InvalidateToolPhysicsPacks_">InvalidateToolPhysicsPacks</a>. The corresponding
|
||
<code>MillingTool</code> / <code>MillingCutter</code> members are now deliberately uncached pure computations.</li>
|
||
<li><strong>Milling-force waveforms are reproducible again.</strong> The parallel per-step force build read lazily
|
||
built scalar caches on the shared tool objects; a thread could pass a cache guard and then read a
|
||
value a concurrent writer had stored in between, so two plays of the same NC exported different
|
||
forces in the thin-chip window of each tooth pass. The caches were first republished as single
|
||
immutable references and then removed in favour of the frozen session pack.</li>
|
||
<li><strong>Thermal gating and seeding.</strong> The sequential cutting-temperature and wear build now checks
|
||
<a class="xref" href="../../api/Hi.MachiningProcs.MachiningActRunnerConfig.html#Hi_MachiningProcs_MachiningActRunnerConfig_EnablePhysics">EnablePhysics</a> (spindle temperature deliberately
|
||
keeps running), and the tool-change thermal seeding re-arms whenever the incoming chain state has no
|
||
flute temperature list — which covers fault and cancel re-seeds, stop-then-replay residue, and
|
||
<code>EnablePhysics</code> being switched on mid-session. The shank temperature list is seeded to the exact node
|
||
count the thermal FEM builds, so trailing shank nodes no longer sit at 0 K after a tool change.</li>
|
||
<li><strong>Cutter geometry is validated up front.</strong>
|
||
<a class="xref" href="../../api/Hi.Milling.Cutters.MillingCutter.html#Hi_Milling_Cutters_MillingCutter_GetUpperBeamGeometryIssues_">GetUpperBeamGeometryIssues</a> collects upper-beam and shank
|
||
configuration problems as keyed messages — for example an extended-cylinder beam whose full length
|
||
sits below the flute height (<code>Cutter-UpperBeam--ExtendedCylinderFullLengthTooShort</code>), which
|
||
inverts the shank solid and makes the shank thermal model unbuildable. They are reported once per tool at <code>BeginSession</code> and at
|
||
each tool change, instead of surfacing later as a null-reference cascade inside the thermal physics
|
||
with nothing naming the beam.</li>
|
||
<li><strong><code>RakeFaceCuttingPara3d</code> no longer throws on a six-field parameter string</strong> (the guard read the
|
||
seventh element behind a <code>>= 6</code> check), and the published coefficient index mappings are corrected:
|
||
the <code>LocalProfileMillingPara(Vec3d, Vec3d)</code> constructor maps (x,y,z) to (Ksr, Kst, Ksa) /
|
||
(Kpr, Kpt, Kpa), and the 2d element index range is 0–3 with 0=Ksc, 1=Ksn, 2=Kpc, 3=Kpn.</li>
|
||
<li><strong>Training diagnostics name their cause.</strong> The per-step warnings split into
|
||
<code>Train-StepLuggage--Unreadable</code> (the step luggage row could not be read back) and
|
||
<code>Train-StepEngagement--Missing</code> (the row is present but the engagement was never built because
|
||
physics was inactive at simulation time). The gather pass counts both against the eligible steps:
|
||
silent at zero, one summary warning at or below
|
||
<a class="xref" href="../../api/Hi.MillingForces.Training.MillingTraining.html#Hi_MillingForces_Training_MillingTraining_MissingEngagementAbortRatio">MissingEngagementAbortRatio</a> (default 0.25), and a
|
||
configuration error above it. <strong>The breakdown in that summary is the diagnosis</strong>: misses sitting on
|
||
the engagement level mean the play itself ran with physics inactive, while a scattered few on the
|
||
luggage level are the read-back path, where a segment that covers a step but lacks its row is
|
||
dropped and answers null once before the next read rebuilds it. Above the ratio the training
|
||
aborts instead of continuing on what is left, because a parameter file built from a fraction of
|
||
the play is indistinguishable from a sound one once it has been written — its coefficients are
|
||
read back later as a real effect. Set the ratio to <code>1</code> to never abort. A gather pass that produces
|
||
no samples at all now reports immediately rather than throwing inside the SVD solve, separating
|
||
“not one step touched the workpiece” from “touched steps whose mapped force data yielded no usable
|
||
shots”.</li>
|
||
<li><strong>New training knobs.</strong> <a class="xref" href="../../api/Hi.MillingForces.Training.MillingTraining.html#Hi_MillingForces_Training_MillingTraining_EnableDesignMatrixSolver">EnableDesignMatrixSolver</a>
|
||
(default false) solves the least squares on a thin QR of the design matrix instead of forming the
|
||
normal equations, which square the condition number;
|
||
<a class="xref" href="../../api/Hi.MillingForces.Training.MillingTraining.html#Hi_MillingForces_Training_MillingTraining_DesignMatrixSvdRelativeTol">DesignMatrixSvdRelativeTol</a> is its truncation cutoff.
|
||
<a class="xref" href="../../api/Hi.MillingForces.Training.MillingTraining.html#Hi_MillingForces_Training_MillingTraining_EnableCwePhasePairing">EnableCwePhasePairing</a> (default false) determines each
|
||
step's rotation phase with a cutter-workpiece-engagement block-pairing detector instead of the
|
||
self-bootstrapped lead parameter, for one-flute and symmetric two-flute cutters in light radial side
|
||
cuts. <a class="xref" href="../../api/Hi.MillingForces.Training.MillingTraining.html#Hi_MillingForces_Training_MillingTraining_ReTrainAnchorOutputScale">ReTrainAnchorOutputScale</a> exposes the virtual
|
||
anchor weight.
|
||
<a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_LastMillingParaTrainResult">LastMillingParaTrainResult</a> captures the outcome — kind,
|
||
sample flags, outlier ratio, success, output file, parameter name and note, correlation R, filtered
|
||
sample count, parameter XML, timestamp — so a caller reads it without re-opening the <code>.mp</code> file.</li>
|
||
<li><strong>Time mapping is reworked around absolute wall-clock time.</strong>
|
||
<a class="xref" href="../../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_AddTimeDataByFile_">AddTimeDataByFile</a> accepts <code>DateTime</code> windows, stored as
|
||
<a class="xref" href="../../api/Hi.Mappings.IFileTimeSection.html">IFileTimeSection</a> forms, and the project-scoped
|
||
<a class="xref" href="../../api/Hi.Mapping.TimeMapping.html#Hi_Mapping_TimeMapping_MappingAnchorDateTime">MappingAnchorDateTime</a> — seeded set-once from the date of the first
|
||
controller instant seen — converts controller timestamps onto one run-relative axis.
|
||
<a class="xref" href="../../api/Hi.MachiningSteps.MachiningStep.html#Hi_MachiningSteps_MachiningStep_EndTimecode">EndTimecode</a> replaces <code>AccumulatedTime</code> as the canonical
|
||
end-of-step time.</li>
|
||
<li><strong>CSV timing survives midnight.</strong> Step durations derive from full date-bearing instants, so a
|
||
multi-day recording no longer produces negative durations and a negative chart time axis, and a
|
||
non-physical duration from a spliced recording is clamped with a validation warning instead of
|
||
stalling physics evaluation.</li>
|
||
<li><strong>Wall-clock time is dense.</strong> The trio moved into one optional sub-object,
|
||
<a class="xref" href="../../api/Hi.MachiningSteps.StepActualTime.html">StepActualTime</a> (<code>Timecode</code> / <code>Instant</code> / <code>IsInterpolated</code>), reached through
|
||
<a class="xref" href="../../api/Hi.MachiningSteps.MachiningStep.html#Hi_MachiningSteps_MachiningStep_ActualTime">ActualTime</a>. On CSV plays every built step is stamped: steps
|
||
built from a controller row re-anchor, and the steps between extrapolate along the machine timeline
|
||
and are marked interpolated, which makes the actual-time mapper window per-step exact instead of
|
||
sparse-anchor scaled. Pure NC plays keep null stamps.</li>
|
||
<li><strong>An empty step-shot pairing window is a data gap, not something to interpolate across.</strong> The window
|
||
builder used to expand outward to the rows bracketing the gap, silently pairing such steps with force
|
||
values that were never measured — a training run over a file whose transients had been carved out
|
||
produced a plausible correlation and a full set of coefficients derived entirely from fabricated
|
||
rows. Such a window now skips its step and one <code>Map-ShotGap--StepsSkipped</code> warning per mapping call
|
||
carries the count; a window-edge row is interpolated only when its bracketing rows span at most two
|
||
spindle revolutions.</li>
|
||
<li><strong>“No cut / No data for step” on freshly-simulated steps is fixed.</strong> The bulk step-data readers
|
||
cached the <em>absence</em> of rows the writer had not committed yet, so a step that had just been
|
||
simulated could report no data until the program was re-run. A covered-but-missing index now drops
|
||
the stale segment and re-reads.</li>
|
||
<li><strong>New end-of-play warnings</strong>, each once per session: <code>Play-Touch--None</code> (the play finished without any
|
||
step touching the workpiece), <code>Tool-FluteCount--Zero</code> (physics is on and a milling cutter resolves to
|
||
zero flutes, so feed per tooth is undefined), and <code>Play-Physics--None</code> (physics is on and at least one
|
||
step touched the workpiece but no touched step carries a physics brief — naming the three things that
|
||
gate it: a tool bound to the spindle, the spindle actually rotating, and the workpiece cutting
|
||
parameter). That last state previously surfaced one process later, as a training run gathering zero
|
||
samples.</li>
|
||
<li><strong>Performance</strong> is collected in its own section below.</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>
|