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/api/Hi.MachiningProcs.RapidCutMonitor.html
T
2026-09-16 00:00:49 +08:00

421 lines
19 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class RapidCutMonitor | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class RapidCutMonitor | HiAPI-C# 2025 ">
<meta name="description" content="Reports a rapid traverse that removed stock: the steps of one NC line that were commanded as rapid traverse (G00, ) and touched the workpiece fold into one Play-RapidCut&amp;ndash;Detected validation warning, anchored on the line&#39;s first touching step and carrying the line&#39;s total removed volume and its largest cutting depth. A rapid move through material breaks the tool or crashes the machine on a real run, yet with the spindle turning the engine treats it as ordinary cutting: the collision rule () pairs flute and workpiece only while the spindle is stopped, so such a line used to pass with no message at all. One instance per . runs on the sequential post-physics stage of every built step (one thread, step order), closes the last line at the end of a play and drops a pending line on a session reset; both run on the shell thread after , so no lock is needed. Folding: consecutive rapid steps with the same (the NC line number, or the sentence itself where a runner has no line numbers) form one report; a feed step, a different line or the end of the play closes it. A line re-entered later (a subprogram loop) reports again, deliberately. The report is emitted only when the line&#39;s total removed volume reaches (default 0: any contact). Steps with the spindle stopped are skipped while collision detection is on — that rule owns them and raises Collision--Detected — and counted otherwise.">
<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="ManagedReference">
<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="Hi.MachiningProcs.RapidCutMonitor">
<h1 id="Hi_MachiningProcs_RapidCutMonitor" data-uid="Hi.MachiningProcs.RapidCutMonitor" class="text-break">
Class RapidCutMonitor
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.MachiningProcs.html">MachiningProcs</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Reports a rapid traverse that removed stock: the steps of one NC line
that were commanded as rapid traverse (G00,
<a class="xref" href="Hi.MachiningSteps.MachineMotionStep.html#Hi_MachiningSteps_MachineMotionStep_IsRapid">IsRapid</a>) and touched the workpiece fold
into one <code>Play-RapidCut&ndash;Detected</code> validation warning, anchored on
the line's first touching step and carrying the line's total removed
volume and its largest cutting depth. A rapid move through material
breaks the tool or crashes the machine on a real run, yet with the
spindle turning the engine treats it as ordinary cutting: the collision
rule (<a class="xref" href="Hi.Machining.MachiningEquipmentUtils.MachiningEquipment.html#Hi_Machining_MachiningEquipmentUtils_MachiningEquipment_Detect_System_Boolean_">Detect(bool)</a>) pairs flute
and workpiece only while the spindle is stopped, so such a line used to
pass with no message at all.</p>
<p>
One instance per <a class="xref" href="Hi.MachiningProcs.MachiningActRunner.html">MachiningActRunner</a>. <a class="xref" href="Hi.MachiningProcs.RapidCutMonitor.html#Hi_MachiningProcs_RapidCutMonitor_Observe_Hi_MachiningProcs_RapidCutMonitor_Sample__System_Double_System_Boolean_System_IProgress_Hi_MachiningProcs_StepDiagnostic__">Observe(in Sample, double, bool, IProgress&lt;StepDiagnostic&gt;)</a>
runs on the sequential post-physics stage of every built step (one
thread, step order), <a class="xref" href="Hi.MachiningProcs.RapidCutMonitor.html#Hi_MachiningProcs_RapidCutMonitor_Flush_System_Double_System_IProgress_Hi_MachiningProcs_StepDiagnostic__">Flush(double, IProgress&lt;StepDiagnostic&gt;)</a> closes the last line at the end
of a play and <a class="xref" href="Hi.MachiningProcs.RapidCutMonitor.html#Hi_MachiningProcs_RapidCutMonitor_Reset">Reset()</a> drops a pending line on a session reset;
both run on the shell thread after
<a class="xref" href="Hi.MachiningProcs.MachiningActRunner.html#Hi_MachiningProcs_MachiningActRunner_WaitAll">WaitAll()</a>, so no lock is needed.
</p>
<p>
Folding: consecutive rapid steps with the same <a class="xref" href="Hi.MachiningProcs.RapidCutMonitor.Sample.html#Hi_MachiningProcs_RapidCutMonitor_Sample_LineKey">LineKey</a>
(the NC line number, or the sentence itself where a runner has no line
numbers) form one report; a feed step, a different line or the end of
the play closes it. A line re-entered later (a subprogram loop) reports
again, deliberately. The report is emitted only when the line's total
removed volume reaches
<a class="xref" href="Hi.MachiningProcs.MachiningActRunnerConfig.html#Hi_MachiningProcs_MachiningActRunnerConfig_RapidCutVolumeThreshold_mm3">RapidCutVolumeThreshold_mm3</a>
(default 0: any contact). Steps with the spindle stopped are skipped
while collision detection is on — that rule owns them and raises
<code>Collision--Detected</code> — and counted otherwise.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public sealed class RapidCutMonitor</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">RapidCutMonitor</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="fields">Fields
</h2>
<h3 id="Hi_MachiningProcs_RapidCutMonitor_MessageId" data-uid="Hi.MachiningProcs.RapidCutMonitor.MessageId">
MessageId
</h3>
<div class="markdown level1 summary"><p>Id of the warning this monitor emits.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const string MessageId = &quot;Play-RapidCut--Detected&quot;</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_MachiningProcs_RapidCutMonitor_Flush_" data-uid="Hi.MachiningProcs.RapidCutMonitor.Flush*"></a>
<h3 id="Hi_MachiningProcs_RapidCutMonitor_Flush_System_Double_System_IProgress_Hi_MachiningProcs_StepDiagnostic__" data-uid="Hi.MachiningProcs.RapidCutMonitor.Flush(System.Double,System.IProgress{Hi.MachiningProcs.StepDiagnostic})">
Flush(double, IProgress&lt;StepDiagnostic&gt;)
</h3>
<div class="markdown level1 summary"><p>Closes the pending rapid line: reports it when its total removed volume
reaches <code class="paramref">volumeThreshold_mm3</code>, then forgets it. Called
by <a class="xref" href="Hi.MachiningProcs.RapidCutMonitor.html#Hi_MachiningProcs_RapidCutMonitor_Observe_Hi_MachiningProcs_RapidCutMonitor_Sample__System_Double_System_Boolean_System_IProgress_Hi_MachiningProcs_StepDiagnostic__">Observe(in Sample, double, bool, IProgress&lt;StepDiagnostic&gt;)</a> at a line boundary and by the session at the
end of a play, for the last line.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Flush(double volumeThreshold_mm3, IProgress&lt;StepDiagnostic&gt; sink)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>volumeThreshold_mm3</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd><p>Line-total removed volume below which the line is not reported.</p>
</dd>
<dt><code>sink</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a>&lt;<a class="xref" href="Hi.MachiningProcs.StepDiagnostic.html">StepDiagnostic</a>&gt;</dt>
<dd><p>Step-anchored sink for the report; no-op if null.</p>
</dd>
</dl>
<a id="Hi_MachiningProcs_RapidCutMonitor_Observe_" data-uid="Hi.MachiningProcs.RapidCutMonitor.Observe*"></a>
<h3 id="Hi_MachiningProcs_RapidCutMonitor_Observe_Hi_MachiningProcs_RapidCutMonitor_Sample__System_Double_System_Boolean_System_IProgress_Hi_MachiningProcs_StepDiagnostic__" data-uid="Hi.MachiningProcs.RapidCutMonitor.Observe(Hi.MachiningProcs.RapidCutMonitor.Sample@,System.Double,System.Boolean,System.IProgress{Hi.MachiningProcs.StepDiagnostic})">
Observe(in Sample, double, bool, IProgress&lt;StepDiagnostic&gt;)
</h3>
<div class="markdown level1 summary"><p>Feeds one built step, in step order. A feed step or a step of another
line closes the pending rapid line (see <a class="xref" href="Hi.MachiningProcs.RapidCutMonitor.html#Hi_MachiningProcs_RapidCutMonitor_Flush_System_Double_System_IProgress_Hi_MachiningProcs_StepDiagnostic__">Flush(double, IProgress&lt;StepDiagnostic&gt;)</a>); a rapid
step that touched the stock opens or extends it.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Observe(in RapidCutMonitor.Sample sample, double volumeThreshold_mm3, bool collisionDetectionEnabled, IProgress&lt;StepDiagnostic&gt; sink)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>sample</code> <a class="xref" href="Hi.MachiningProcs.RapidCutMonitor.html">RapidCutMonitor</a>.<a class="xref" href="Hi.MachiningProcs.RapidCutMonitor.Sample.html">Sample</a></dt>
<dd><p>The step, see <a class="xref" href="Hi.MachiningProcs.RapidCutMonitor.html#Hi_MachiningProcs_RapidCutMonitor_SampleOf_Hi_MachiningSteps_MachiningStep_">SampleOf(MachiningStep)</a>.</p>
</dd>
<dt><code>volumeThreshold_mm3</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd><p>Line-total removed volume below which the line is not reported.</p>
</dd>
<dt><code>collisionDetectionEnabled</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>When true, steps with the spindle stopped are left to collision detection.</p>
</dd>
<dt><code>sink</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a>&lt;<a class="xref" href="Hi.MachiningProcs.StepDiagnostic.html">StepDiagnostic</a>&gt;</dt>
<dd><p>Step-anchored sink for the report; no-op if null.</p>
</dd>
</dl>
<a id="Hi_MachiningProcs_RapidCutMonitor_Reset_" data-uid="Hi.MachiningProcs.RapidCutMonitor.Reset*"></a>
<h3 id="Hi_MachiningProcs_RapidCutMonitor_Reset" data-uid="Hi.MachiningProcs.RapidCutMonitor.Reset">
Reset()
</h3>
<div class="markdown level1 summary"><p>Forgets a pending line without reporting it (session reset).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Reset()</code></pre>
</div>
<a id="Hi_MachiningProcs_RapidCutMonitor_SampleOf_" data-uid="Hi.MachiningProcs.RapidCutMonitor.SampleOf*"></a>
<h3 id="Hi_MachiningProcs_RapidCutMonitor_SampleOf_Hi_MachiningSteps_MachiningStep_" data-uid="Hi.MachiningProcs.RapidCutMonitor.SampleOf(Hi.MachiningSteps.MachiningStep)">
SampleOf(MachiningStep)
</h3>
<div class="markdown level1 summary"><p>Builds the monitor's view of a built step. The removed volume is the
step's material removal rate (<a class="xref" href="Hi.MachiningSteps.MachiningStep.html#Hi_MachiningSteps_MachiningStep_Mrr_mm3ds">Mrr_mm3ds</a>,
the swept engagement cross-section times the tip feedrate) over the
step duration — a geometry-only quantity, so the report needs no
physics; a NaN rate (undefined tip feedrate) counts as 0 but the
contact still counts.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static RapidCutMonitor.Sample SampleOf(MachiningStep step)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>step</code> <a class="xref" href="Hi.MachiningSteps.MachiningStep.html">MachiningStep</a></dt>
<dd><p>A built step.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.MachiningProcs.RapidCutMonitor.html">RapidCutMonitor</a>.<a class="xref" href="Hi.MachiningProcs.RapidCutMonitor.Sample.html">Sample</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</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>