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/anatomy/execution/selected-step-info-panel.html
T
2026-09-09 17:35:23 +08:00

158 lines
9.6 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Selected-Step Info Panel | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Selected-Step Info Panel | 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="Anatomy-SelectedStepInfoPanel">
<h1 id="selected-step-info-panel">Selected-Step Info Panel</h1>
<p>The panel that shows the selected machining step's properties. It sits in the <a href="index.html">Execution Page</a>'s Step Info column, where the app labels it <strong>Step Properties</strong>.</p>
<p>The model is <a class="xref" href="../../api/Hi.MachiningSteps.MachiningStep.html">MachiningStep</a> and <code>UserService</code>.</p>
<p>The <a class="xref" href="../../api/Hi.MachiningSteps.MachiningStep.html">MachiningStep</a> is assigned by <a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_ClStrip">ClStrip</a>.<a class="xref" href="../../api/Hi.CutterLocations.ClStrips.ClStrip.html#Hi_CutterLocations_ClStrips_ClStrip_PosSelected">PosSelected</a>.</p>
<p>Show step information from <code>UserService.DisplayedStepPresentAccessList</code>.</p>
<p>The resx of <a class="xref" href="../../api/Hi.MachiningSteps.MachiningStep.html">MachiningStep</a> contains the translation of <a class="xref" href="../../api/Hi.MachiningSteps.PresentAttribute.html">PresentAttribute</a>.<a class="xref" href="../../api/Hi.MachiningSteps.PresentAttribute.html#Hi_MachiningSteps_PresentAttribute_Name">Name</a>; apply the translation to the GUI, and fall back to the original value when no translation exists.</p>
<p>Which properties are listed is chosen on the <a class="xref" href="step-present-dialog.html">Step Present Preference Page</a>, opened from the <strong>Step Present</strong> button on this panel's title bar.</p>
<h2 id="layout">Layout</h2>
<p>A plain key / value list, not a <code>q-list</code>: the value cell has to shrink and wrap, because a step carries arbitrarily long values (a file path, a whole NC line) and a non-shrinking cell would widen the entire column.</p>
<p>Each row is labelled <code>shortName</code>, falling back to <code>name</code> and then to the raw key, with the full <code>name</code> as the row's tool-tip; the unit follows the value, and an absent value renders as <code>-</code>. With nothing selected the panel shows <em>No step selected. Click a step in the canvas to inspect its info.</em></p>
<p>The <code>StepIndex</code> row is filtered out even when the configured list contains it — the column's group bar already carries the step index as a badge.</p>
<h2 id="behavior">Behavior</h2>
<p>Selection bursts (a <code>SetSelectedPos</code> per step while a mission runs) are coalesced into one trailing fetch on an 80 ms timer, and responses are sequence-guarded so a slower earlier fetch cannot overwrite a newer one. A language change re-pulls, because the field names arrive already localized.</p>
<h2 id="sample-code">Sample Code</h2>
<p>Refer to this code to show step information.</p>
<pre><code class="lang-csharp" name="SampleCode-ShowStepPresent">internal static void ShowStepPresent(
UserService userEnv, MachiningStep machiningStep)
{
foreach (var entry in userEnv.DisplayedStepPresentAccessList)
{
var present = entry.Value.Present;
var valueText = string.Format(&quot;{0:&quot; + present.DataFormatString + &quot;}&quot;, entry.Value.GetValueFunc.Invoke(machiningStep));
Console.WriteLine($&quot;{present.ShortName}: {valueText} {present.TailUnitString} ({present.Name} [{entry.Key}])&quot;);
}
}
</code></pre><h2 id="selection-push-web-service-only">Selection Push (Web Service Only)</h2>
<p><code>SelectedStepInfoService</code> answers the payload on demand: the REST endpoint <code>GET /api/Execution/selected-step-info</code> calls it. It has <strong>no SignalR hub of its own</strong> — the &ldquo;selection changed&rdquo; push rides <code>/clStripHub</code>, whose <code>StepSelected</code> broadcast follows the same <a class="xref" href="../../api/Hi.CutterLocations.ClStrips.ClStrip.html#Hi_CutterLocations_ClStrips_ClStrip_PosSelected">PosSelected</a> event. The panel and the cycle-line charts watch that broadcast and re-pull this payload.</p>
<h2 id="source-code-path">Source Code Path</h2>
<p>See <a class="xref" href="../index.html">HiNC App Anatomy</a> for git repository links.</p>
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
<ul>
<li><code>wwwroot-src/src/components/execution/SelectedStepInfoPanel.vue</code> — the panel.</li>
<li><code>wwwroot-src/src/components/execution/StepInfoGroupBar.vue</code> — the group bar above it, shared by the step-based panels of the column.</li>
<li><code>Execution/ExecutionController.cs</code> — <code>GET /api/Execution/selected-step-info</code>.</li>
<li><code>Execution/SelectedStepInfoService.cs</code> — the payload.</li>
<li><code>Execution/ClStripBroadcastService.cs</code> — the <code>StepSelected</code> broadcast that tells the panel to re-pull.</li>
</ul>
<h2 id="see-also">See Also</h2>
<ul>
<li><a href="index.html">Execution Page</a> — the page whose Step Info column hosts this panel</li>
<li><a class="xref" href="step-present-dialog.html">Step Present Preference Page</a> — chooses which properties are listed</li>
<li><a href="../../manual/run/inspecting-a-step.html">Inspecting a Step</a> — the task this panel serves, and the rest of the column around it</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>