Archived
deploy.
This commit is contained in:
@@ -0,0 +1,207 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Cycle-Line Charts | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Cycle-Line Charts | 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="Anatomy-CycleLineCharts">
|
||||
<h1 id="cycle-line-charts">Cycle-Line Charts</h1>
|
||||
|
||||
<p>The cycle-line charts visualise a <strong>per-step, per-cycle detail view</strong> of force / moment signals around the currently-selected step. They are re-fetched whenever the step selection changes, so the operator can zoom into one spindle revolution (or the configured cycle window) while scrubbing through the mission timeline on the strip charts.</p>
|
||||
<p>They sit in the Step Info column of the <a href="index.html">Execution Page</a>, below Step Properties and CWE. The anatomy covers four, all sharing <code>BaseCycleLineChart.vue</code>, in the order the column stacks them:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Chart</th>
|
||||
<th>Source Data</th>
|
||||
<th>Cycle parameter</th>
|
||||
<th>Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Sim Cutting Force Cycle</td>
|
||||
<td><code>MachiningStep.ForceToWorkpieceOnProgramCoordinate</code> or <code>ForceToToolOnToolRunningCoordinate</code></td>
|
||||
<td>spindle angle (deg)</td>
|
||||
<td>Header dropdown picks between the two flag values; swaps the <code>fetcher</code> prop so <code>BaseCycleLineChart</code> refetches.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sim Spindle Moment Cycle</td>
|
||||
<td><code>MachiningStep.MomentsToToolAboutObservationPointOnSpindleRotationCoordinate_Nm</code></td>
|
||||
<td>spindle angle (deg)</td>
|
||||
<td>Simulated moment from the physics model. Carries the locus (dartboard) mode.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sensor Cutting Force Cycle</td>
|
||||
<td><code>IForceShot</code> via <code>TimeMapping.GetShots(stepIndex)</code></td>
|
||||
<td>time (s)</td>
|
||||
<td>Dynamometer-measured force. Returns an empty shape when there is no dynamometer data.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sensor Spindle Moment Cycle</td>
|
||||
<td><code>IMomentShot</code> via <code>MachiningProject.TimeMapping.GetShots(stepIndex)</code></td>
|
||||
<td>time (s)</td>
|
||||
<td>Sensor-measured moment. Rendered as a sibling card to the sim chart rather than a twin overlay, which keeps the two uplot instances independent. Carries the locus (dartboard) mode.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>The parameter split is the reason the two pairs never share a cursor: a simulated cycle is indexed by phase, a measured one by clock.</p>
|
||||
<p>Key Model: <a class="xref" href="../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>.<a class="xref" href="../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_TimeMapping">TimeMapping</a> + the selected <a class="xref" href="../../api/Hi.MachiningSteps.MachiningStep.html">MachiningStep</a>.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<p>Each cycle-line chart is a collapsible panel:</p>
|
||||
<ul>
|
||||
<li>Header Row
|
||||
<ul>
|
||||
<li>Title label.</li>
|
||||
<li>Flag picker (Sim Cutting Force chart only) — a <code><q-btn-dropdown></code> between <code>ForceToWorkpieceOnProgramCoordinate</code> (default) and <code>ForceToToolOnToolRunningCoordinate</code>.</li>
|
||||
<li>Mode picker (<code>enableLocus</code> charts only — the two spindle-moment charts) — <code>Line</code> / <code>Dartboard</code>.</li>
|
||||
<li>Value-boundary dropdown — <code>Auto</code>, or <code>Fixed</code> with a ± bound that pins the y range symmetrically so two steps can be compared without the axis moving. Its label reads the bound when one is set.</li>
|
||||
<li>Reload.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Body — <code>UplotChart.vue</code> rendering three series (X / Y / Z channels) over the cycle parameter <code>ts</code>, or <code>XyLocusChart.vue</code> in dartboard mode, which plots the same samples as a locus in the plane. The line-mode legend width is shared by every line-mode cycle chart, as the strip charts share theirs; the locus view has no legend divider and is unaffected.</li>
|
||||
<li>Empty-state overlay — <code>No step selected</code> with nothing picked, <code>Not ready</code> before the payload arrives, <code>No data for step</code> when the step carries none. The underlying series still carry a shape-preserving <code>ts=[0,360]</code>, <code>xs/ys/zs=[NaN,NaN]</code> payload so the canvas does not jump. The two sensor charts read <code>No data for step</code> for every step of a project with no <code>TimeMapping</code> shot data, which is the normal state of a project that has not been measured.</li>
|
||||
</ul>
|
||||
<h2 id="behavior">Behavior</h2>
|
||||
<ul>
|
||||
<li><strong>Step-driven refetch.</strong> <code>BaseCycleLineChart</code> accepts a <code>fetcher: () => Promise<CycleLineResponse></code> prop. The step-selection push arrives on <code>/clStripHub</code> as <code>StepSelected</code>; the fetcher is re-invoked and the chart re-renders.</li>
|
||||
<li><strong>Server-resolved step.</strong> The cycle-line endpoints resolve “currently-selected step” from <code>LocalProjectService.ClStrip.GetSelectedPos()</code> rather than accepting <code>stepIndex</code> as a query parameter. This keeps the contract simple and matches the event-driven model used by the rest of the execution plumbing.</li>
|
||||
<li><strong>Toolbar slot.</strong> The optional <code>#toolbar</code> slot lets callers embed per-chart controls (such as the force chart's flag picker) without subclassing.</li>
|
||||
<li><strong>Shared cursor mark, in two groups.</strong> Clicking a point publishes that sample's cycle <em>parameter</em> — not its index — to a module-scoped mark shared by the group: <code>sim</code> for the two simulated charts (spindle angle), <code>sensor</code> for the two measured ones (seconds). Each chart draws the mark as a vertical line in line mode and a highlighted point in dartboard mode, and the mark survives both a mode switch and a change of selected step. The split is deliberate: a click on a simulated chart must not move a sensor-side cursor, because the two axes are not the same quantity.</li>
|
||||
<li><strong>The <code>sim</code> mark reaches outside the chart family.</strong> The CWE panel of the <a href="index.html">Execution Page</a>'s Step Info column watches it and pushes the angle to its own displayee, so the flute overlay in the engagement view rotates to the phase clicked on a force or moment chart. The angle persists on that displayee across steps — the server re-applies it with each step's spin direction — so it is pushed only on (re)connect and on a new click.</li>
|
||||
</ul>
|
||||
<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/charts/BaseCycleLineChart.vue</code> — shared cycle-line skeleton.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/UplotChart.vue</code> — uplot wrapper (shared with the strip charts).</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/XyLocusChart.vue</code> — the dartboard (locus) renderer used in place of the uplot chart in that mode.</li>
|
||||
<li><code>wwwroot-src/src/composables/useCycleSyncMark.ts</code> — the two module-scoped cursor marks and their group keys.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/StepVolumePanel.vue</code> — the CWE panel that follows the <code>sim</code> mark to rotate its flute overlay.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/ForceCycleLineChart.vue</code> — force cycle-line chart with the flag picker.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/SimSpindleMomentCycleLineChart.vue</code> — simulated spindle moment.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/SensorSpindleMomentCycleLineChart.vue</code> — sensor-measured spindle moment.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/DynamometerForceCycleLineChart.vue</code> — dynamometer force.</li>
|
||||
<li><code>Execution/ExecutionChartsController.cs</code> — cycle-line endpoints:
|
||||
<ul>
|
||||
<li><code>GET /api/execution/cycle-line/force?flag=ForceToWorkpieceOnProgramCoordinate|ForceToToolOnToolRunningCoordinate</code></li>
|
||||
<li><code>GET /api/execution/cycle-line/sim-spindle-moment</code></li>
|
||||
<li><code>GET /api/execution/cycle-line/sensor-spindle-moment</code></li>
|
||||
<li><code>GET /api/execution/cycle-line/dynamometer-force</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>All four endpoints return <code>{ hasData, ts, xs, ys, zs }</code> flattened for direct uplot consumption. Empty payloads use a shape-preserving <code>ts=[0,360]</code>, <code>xs/ys/zs=[NaN,NaN]</code> fill.</p>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">Execution Page</a> — the page whose Step Info column hosts these charts</li>
|
||||
<li><a href="strip-charts.html">Strip Charts</a> — windowed mission-timeline charts that share the same <code>uplot</code> engine and drive step selection</li>
|
||||
<li><a href="../../manual/run/inspecting-a-step.html">Inspecting a Step</a> — the task these charts serve, with the two scales and the shared mark read as a procedure</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>
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Execution Extended RenderingCanvas Tool Bar | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Execution Extended RenderingCanvas Tool Bar | 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="Anatomy-ExecutionExtendedToolBar">
|
||||
<h1 id="execution-extended-renderingcanvas-tool-bar">Execution Extended RenderingCanvas Tool Bar</h1>
|
||||
|
||||
<p>The run-specific half of the canvas header on the <a href="index.html">Execution Page</a>: what the scene shows, and how the tool path is drawn. The generic view controls live next to it on the <a class="xref" href="../widget/renderingcanvas-tool-bar.html">RenderingCanvas Tool Bar</a>.</p>
|
||||
<p>The model of the tool bar is <a class="xref" href="../../api/Hi.Disp.DispEngine.html">DispEngine</a>, assigned from the RenderingCanvas of the <a href="index.html">Execution Page</a>. The content of <a class="xref" href="../../api/Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_Displayee">Displayee</a> here is the project displayee, whose key content is <a class="xref" href="../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li><code>Execution Extended RenderingCanvas Tool Bar</code>
|
||||
<ul>
|
||||
<li><p><code>Tool Path</code> — shows or hides the CL strip.</p>
|
||||
</li>
|
||||
<li><p><code>Path Points</code> — the CL-strip dot markers. Editable only while <a class="xref" href="../../api/Hi.MachiningProcs.RenderingFlag.html#Hi_MachiningProcs_RenderingFlag_ClStrip">ClStrip</a> is set in the displayee's rendering-flag bit array.</p>
|
||||
</li>
|
||||
<li><p><code>Scene ▾</code> — <a class="xref" href="../../api/Hi.MachiningProcs.RenderingFlag.html">RenderingFlag</a>-based checkboxes over that same bit array, in three groups:</p>
|
||||
<ul>
|
||||
<li><strong>Solid</strong> — Machine, Tool, Workpiece, Fixture</li>
|
||||
<li><strong>Coordinate</strong> — Program Zero, ISO Coordinate, Heidenhain Coordinate</li>
|
||||
<li><strong>Display Aids</strong> — Dimension Bar, Color Scale Bar</li>
|
||||
</ul>
|
||||
<p>The ClStrip flag is not offered here; the <code>Tool Path</code> button owns it. Heidenhain Coordinate appears only when <a class="xref" href="../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>.<a class="xref" href="../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_NcEnv">NcEnv</a>.<a class="xref" href="../../api/Hi.Numerical.HardNcEnv.html#Hi_Numerical_HardNcEnv_CncBrand">CncBrand</a> is <a class="xref" href="../../api/Hi.Numerical.CncBrand.html#Hi_Numerical_CncBrand_Heidenhain">Heidenhain</a>. The menu is a shared component because other screens use it too — see the <a class="xref" href="../legacy-controller.html">Legacy Controller Page</a>.</p>
|
||||
</li>
|
||||
<li><p><code>Meshed Geom ▾</code> — the workpiece's rendering cache and geometry-diff settings: the <a class="xref" href="graphic-cache-menu.html">Graphic-Cache SubMenu</a> and Diff Visual Radius, with a <code>Diff</code> badge when a difference is present.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p><strong>Fit View is not on this tool bar.</strong> It moved to the strip-chart group bar, which is where the whole-program time axis it fits against lives; see <a href="strip-charts.html">Strip Charts</a>.</p>
|
||||
<h2 id="shipped-default-flags">Shipped Default Flags</h2>
|
||||
<p>The displayee opens with four bits set — <code>DimensionBar</code>, <code>WorkpieceGeom</code>, <code>Fixture</code> and <code>ClStrip</code> — so a page that has just loaded draws the workpiece, the fixture, the dimension bar and the tool path, and draws neither the machine nor the tool until the operator ticks them. <code>Mech</code> is present in the initializer as a commented-out line rather than absent, so the default is a decision rather than an omission: a machine at its home view fills the frame and hides the cut. The flags live on the displayee, not in the project, so they are session state and every new rendering session starts from this set.</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>The checkboxes in the <code>Scene ▾</code> menu are grouped by the category of <a class="xref" href="../../api/Hi.MachiningProcs.RenderingFlag.html">RenderingFlag</a> — follow the link for the categories.</p>
|
||||
</div>
|
||||
<h2 id="behavior-of-the-tool-path-buttons">Behavior of the Tool-Path Buttons</h2>
|
||||
<p>Apply the displayee's rendering-flag bit array to set the project rendering items.</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>Extract the <a class="xref" href="../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a> from the project displayee and use it to drive the behaviors.</p>
|
||||
</div>
|
||||
<h2 id="behavior-of-the-scene-menu">Behavior of the <code>Scene</code> Menu</h2>
|
||||
<p>See the <code>DemoRenderingMachiningProcessAndStripPosSelection</code> sample in the <a class="xref" href="../../technique/api-foundations/packages-and-samples.html">Hi.Sample.Wpf repository</a> for code that completes the behavior of the buttons.</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/ExecutionExtendedToolBar.vue</code> — the tool bar itself.</li>
|
||||
<li><code>wwwroot-src/src/components/widgets/DisplayOptionsMenu.vue</code> — the shared <code>Scene ▾</code> menu.</li>
|
||||
<li><code>wwwroot-src/src/components/preference/GraphicCacheMenu.vue</code> — the Graphic Cache entry under <code>Meshed Geom ▾</code>.</li>
|
||||
<li><code>Execution/ExecutionController.cs</code> — <code>GET /api/Execution/cl-strip-dots</code> and <code>POST /api/Execution/update-cl-strip-dots</code>.</li>
|
||||
<li><code>Common/RenderingFlagsController.cs</code> — the rendering-flag reads and writes behind the <code>Scene ▾</code> checkboxes.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">Execution Page</a> — the page whose canvas this tool bar decorates</li>
|
||||
<li><a class="xref" href="../widget/renderingcanvas-tool-bar.html">RenderingCanvas Tool Bar</a> — the generic view controls beside it</li>
|
||||
<li><a href="strip-charts.html">Strip Charts</a> — where Fit View now lives</li>
|
||||
<li><a href="../../manual/run/watching-the-run.html">Watching the Run</a> — the task these controls serve, and what the canvas draws by default</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>
|
||||
@@ -0,0 +1,199 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Execution Tool Bar | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Execution Tool Bar | 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="Anatomy-ExecutionToolBar">
|
||||
<h1 id="execution-tool-bar">Execution Tool Bar</h1>
|
||||
|
||||
<p>The transport controls for the run. In the web application they sit atop the <a href="index.html">Execution Page</a>'s primary editor panel, shown for the Execution root and every node under it, and this sole instance registers the F5–F8 shortcuts.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li><code>Execution Tool Bar</code>
|
||||
<ul>
|
||||
<li><code>Status Text Field</code></li>
|
||||
<li><code>Start Button</code> (F5; <strong>Resume</strong> once the run is paused)</li>
|
||||
<li><code>Pause Button</code> (F6)</li>
|
||||
<li><code>Run-One-Line Button</code> (F7 — one NC line)</li>
|
||||
<li><code>Run-One-Step Button</code> (F8 — one machining step)</li>
|
||||
<li><code>Stop Button</code></li>
|
||||
<li><code>Reset Button</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>In the web application the status text moved out of the tool bar and onto the Execution tree item, which carries the run-state badge. The two single-advance buttons there share one <code>skip_next</code> icon and are separated by a letter drawn into the button's corner — <code>L</code> for the line button, <code>S</code> for the step button — rather than by colour; the tool-tips carry the key names.</p>
|
||||
<h2 id="behavior">Behavior</h2>
|
||||
<ul>
|
||||
<li>Both the webservice and the win-desktop application watch <a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> events to track <a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_PacePlayer">PacePlayer</a> status changes.</li>
|
||||
<li>In the webservice, <code>ExecutionStatusService</code> subscribes to those events and broadcasts status changes over SignalR through <code>ExecutionStatusHub</code>.</li>
|
||||
<li>The win-desktop application subscribes to the same <a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> events directly.</li>
|
||||
<li>The frequently used buttons carry hotkeys: Start / Resume, Pause, Run One Line and Run One Step. The app's tool-tips are the only place those key bindings are written down.</li>
|
||||
<li>The background color of the <code>Status Text Field</code> follows the status:
|
||||
<ul>
|
||||
<li>Warning style — Running</li>
|
||||
<li>Secondary style — Paused, No Project</li>
|
||||
<li>Success style — Finished, Ready</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>The action of <code>Reset Button</code> is async, so the UI stays responsive while the session unwinds; the button shows a busy state for the duration, and the flag behind it is shared with the keyboard path so the two agree.</p>
|
||||
<h2 id="enable-rules">Enable Rules</h2>
|
||||
<p>Every button is disabled unless a project is loaded <strong>and</strong> the page has finished initializing its rendering connection — the web transport reads that readiness from the Execution page, so a dropped canvas connection greys the whole bar with a project still open. On top of that gate each button follows the status:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Button</th>
|
||||
<th>Enabled for status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>Start</code> / <code>Resume</code></td>
|
||||
<td><code>Ready</code>, <code>Paused</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Pause</code></td>
|
||||
<td><code>Running</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Run-One-Line</code>, <code>Run-One-Step</code></td>
|
||||
<td><code>Ready</code>, <code>Paused</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Stop</code></td>
|
||||
<td><code>Running</code>, <code>Paused</code>, <code>Finished</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Reset</code></td>
|
||||
<td>any, while no reset is in flight</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Neither single-advance button is enabled while the run is <code>Running</code></strong> — stepping is a <code>Ready</code>-or-<code>Paused</code> operation, so a moving run has to be paused before it can be stepped.</p>
|
||||
<p>The F5–F8 handler applies the same predicates before acting, and declines in two more cases: when the event target is an <code>input</code>, a <code>textarea</code> or a contenteditable element, and when the hosting page is deactivated. The second matters because the shell keep-alives the routed pages, so leaving the Execution route deactivates rather than unmounts this component; without the detach, F5 elsewhere in the app would drive the transport instead of reloading the browser. Every declined key falls through to the browser.</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>Use icons rather than text on the tool-bar buttons. Run One Line and Run One Step share an icon, so they need a second mark to tell them apart — the win-desktop application seasons the icon green and blue, the web application draws an <code>L</code> and an <code>S</code> in the button corner. Either works; the default colour is enough for the rest.</p>
|
||||
</div>
|
||||
<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/ExecutionToolBar.vue</code> — the buttons. All state and handlers come from the shared <code>useExecutionTransport</code> composable, so the component is pure markup.</li>
|
||||
<li><code>Execution/ExecutionController.cs</code> — <code>POST /api/Execution/start | pause | resume | run-line | run-step | stop | reset</code>, and <code>GET /api/Execution/status</code>.</li>
|
||||
<li><code>Execution/ExecutionStatusHub.cs</code> + <code>Execution/ExecutionStatusService.cs</code> — the status broadcast.</li>
|
||||
</ul>
|
||||
<h4 id="signalr-implementation-web-service-only">SignalR Implementation (Web Service Only)</h4>
|
||||
<p><code>ExecutionStatusHub</code> is mapped at <code>/executionStatusHub</code> and answers <code>GetExecutionStatus()</code>. <code>ExecutionStatusService</code> watches the <a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_PacePlayer">PacePlayer</a> events — <a class="xref" href="../../api/Hi.Common.PacePlayer.html#Hi_Common_PacePlayer_IsRunningChangedEvent">IsRunningChangedEvent</a>, <a class="xref" href="../../api/Hi.Common.PacePlayer.html#Hi_Common_PacePlayer_IsLockedChangedEvent">IsLockedChangedEvent</a>, <a class="xref" href="../../api/Hi.Common.PacePlayer.html#Hi_Common_PacePlayer_IsFinishedChangedEvent">IsFinishedChangedEvent</a> and <a class="xref" href="../../api/Hi.Common.PacePlayer.html#Hi_Common_PacePlayer_ResetedEvent">ResetedEvent</a> — and broadcasts each change, so every connected client sees the same run state without polling.</p>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">Execution Page</a> — the page these controls drive</li>
|
||||
<li><a href="../../manual/run/running-a-simulation.html">Starting and Stepping</a> — the task these controls serve, with the enable rules read as a procedure</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>
|
||||
@@ -0,0 +1,155 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Graphic-Cache SubMenu | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Graphic-Cache SubMenu | 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="Anatomy-GraphicCacheMenu">
|
||||
<h1 id="graphic-cache-submenu">Graphic-Cache SubMenu</h1>
|
||||
|
||||
<h2 id="shipped-surface">Shipped Surface</h2>
|
||||
<p>The panel has no route and no Control-Tree node of its own. It is chrome on the Execution page (<code>/execution</code>): the canvas panel's expansion header carries the <code>Meshed Geom ▾</code> dropdown — titled <em>Workpiece rendering cache and geometry-diff settings</em> — whose <code>Graphic Cache</code> row opens this panel in a nested menu. It hangs there because it acts on the workpiece meshed geometry's rendering cache, and its sibling row in the same dropdown is <code>Diff Visual Radius</code>. It is therefore only reachable while the Execution page's canvas column is shown.</p>
|
||||
<p>In the WPF application the same submenu lives on the <a class="xref" href="../shell/preference-menu.html">Preference Menu Dropdown</a>.</p>
|
||||
<p>The panel is self-contained: it takes no parent-supplied model. It holds local lower / upper / current values, loads them on mount, and commits each edit to <code>GET</code>/<code>POST /api/preference/graphic-cache</code>. <code>UserService</code> / <code>UserConfig</code> is the server-side model behind that endpoint.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<p>Titled <strong>Graphic Cache (MB)</strong>, with the caption “Memory budget for rendering cache. Lower & upper bound the slider.”</p>
|
||||
<ul>
|
||||
<li>Graphic-Cache SubMenu
|
||||
<ul>
|
||||
<li><code>Lower</code> numeric field (unit MB)</li>
|
||||
<li><code>Upper</code> numeric field (unit MB)</li>
|
||||
<li><code>Current</code> numeric field (unit MB)</li>
|
||||
<li>Slider</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="behavior">Behavior</h2>
|
||||
<ul>
|
||||
<li>There is no apply step and no Save button: each field posts its own value the moment it is committed — on blur, or on Enter — and the whole panel is loaded once when it is mounted.</li>
|
||||
<li>The <code>Current</code> field is bounded by the two limit fields, so a value below <code>Lower</code> or above <code>Upper</code> is refused with an inline message and never sent. The server clamps a submitted value into the limits regardless, and the panel re-applies the effective state that comes back, so the server's answer is always what ends up on screen.</li>
|
||||
<li>The slider is integer-valued and reflects <code>Current</code> in MB. Its range tracks <code>Lower</code> / <code>Upper</code>, clamped defensively so the minimum never exceeds the maximum. Releasing the slider commits the value.</li>
|
||||
<li>A failed write shows the message inline under the fields, raises a notification, and re-reads from the server so the panel never drifts from stored state.</li>
|
||||
<li>A write lands on the live user configuration, so it takes effect at once — <code>GraphicCacheMb</code> is a pass-through onto <code>CubeTree.DispCacheMb</code>. All three values are part of the user-config XML, so they reach disk with the next save of that config.</li>
|
||||
</ul>
|
||||
<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/preference/GraphicCacheMenu.vue</code> — the panel itself: Lower / Upper / Current numeric fields plus the slider. Loads on mount, commits each edit to the REST endpoint, re-applies the server's clamped response, and reports failures inline plus a notification.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/ExecutionExtendedToolBar.vue</code> — where the entry hangs: the <code>Meshed Geom ▾</code> dropdown on the Execution page canvas panel's expansion header, whose <code>Graphic Cache</code> row opens this panel in a nested menu.</li>
|
||||
<li><code>wwwroot-src/src/components/workpiece/WorkpieceDiffRadiusMenu.vue</code> — the sibling <code>Diff Visual Radius</code> row in the same dropdown.</li>
|
||||
<li><code>wwwroot-src/src/components/widgets/NumericInput.vue</code> — the shared numeric field used for all three values.</li>
|
||||
<li><code>wwwroot-src/src/api/preference.ts</code> — <code>getGraphicCache</code> / <code>setGraphicCache</code> over <code>GET</code>/<code>POST /api/preference/graphic-cache</code>, typed as <code>{ lowerLimit, upperLimit, value }</code>.</li>
|
||||
<li><code>Environments/PreferenceController.cs</code> — <code>GetGraphicCacheSettings</code> returns <code>{ success, lowerLimit, upperLimit, value }</code>; <code>UpdateGraphicCacheSettings</code> takes the same three as nullable fields, clamps <code>value</code> into the limits, writes the live <code>UserConfig</code>, and returns the effective state.</li>
|
||||
<li><code>Environments/UserConfig.cs</code> — <code>GraphicCacheLowerLimitMb</code> (default 10) and <code>GraphicCacheUpperLimitMb</code> (default 1200) are plain stored values; <code>GraphicCacheMb</code> is a pass-through whose getter and setter are <code>CubeTree.DispCacheMb</code>. All three round-trip through the config XML.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="../shell/preference-menu.html">Preference Menu Dropdown</a> — the dropdown that hosts this entry in the WPF client</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>
|
||||
@@ -0,0 +1,254 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Execution Page | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Execution Page | 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="Anatomy-Execution">
|
||||
<h1 id="execution-page">Execution Page</h1>
|
||||
|
||||
<p>The Execution page is the run cockpit: the simulation plays here, and every panel on it reads the run. It is the app's landing route — <code>/</code> redirects to <code>/execution</code> — and its Control Tree, the <strong>Execution</strong> root with <strong>Mission</strong> and <strong>Program</strong> beneath it, rides the <code>?tree=</code> query, so <code>/execution?tree=execution/mission</code> deep-links the Mission editor.</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>The app says <strong>Execution</strong> throughout: the route <code>/execution</code>, the REST endpoints (<code>/api/Execution/*</code>), the status hub (<code>/executionStatusHub</code>) and the stored layout (<code>UserConfig.ExecutionDivConfig</code>). The HiAPI engine keeps its own library vocabulary — <a class="xref" href="../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_PlayerCommand">PlayerCommand</a> <small>(API)</small> and <a class="xref" href="../../api/Hi.Common.PacePlayer.html">PacePlayer</a> <small>(API)</small> — which is a different codebase's naming, not an inconsistency here.</p>
|
||||
</div>
|
||||
<h2 id="key-models">Key Models</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> — the project data service the whole page reads.</li>
|
||||
<li><a class="xref" href="../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a> — reached through the displayee bound to the canvas.</li>
|
||||
<li><code>UserService</code> — per-user configuration, including the stored panel layout.</li>
|
||||
</ul>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<p>Four columns, left to right. The two dock dividers are pixel-sized, so dragging one moves only that dock's edge while the flexible middle absorbs the change.</p>
|
||||
<ul>
|
||||
<li><strong>Left dock</strong> — the Control Tree over the primary editor panel for the selected tree node. The <a href="execution-tool-bar.html">Execution Tool Bar</a> — the transport buttons — sits atop that panel and is shown for the Execution root and every node under it.</li>
|
||||
<li><strong>Main</strong> — the <a class="xref" href="../../technique/rendering/rendering-canvas.html">RenderingCanvas</a> over the <a class="xref" href="../shell/session-message-panel.html">Session Message Panel</a>, stacked as collapsible panels with a draggable divider between them. The canvas panel's header adopts the <a class="xref" href="../widget/renderingcanvas-tool-bar.html">RenderingCanvas Tool Bar</a> and the <a href="execution-extended-renderingcanvas-tool-bar.html">Execution Extended RenderingCanvas Tool Bar</a>.</li>
|
||||
<li><strong>Strip Charts</strong> — the strip-chart group bar over the three <a href="strip-charts.html">Strip Charts</a>: Availability Chart, Surface Roughness Chart and Color Index Time Chart.</li>
|
||||
<li><strong>Step Info</strong> — <em>Sentence Syntax</em> as its own region (an NC sentence need not map to any machining step, so it is not a member of the step-based panels), then the Step Info group bar, then <a href="selected-step-info-panel.html">Step Properties</a>, <em>CWE</em> (cutter–workpiece engagement) and the four <a href="cycle-line-charts.html">Cycle-Line Charts</a>.</li>
|
||||
</ul>
|
||||
<p>The four columns are toggled from the app menu bar; the panels inside them collapse in place from their own expansion headers. The canvas stays mounted while collapsed so its rendering connection survives, and its engine is paused rather than torn down. The page itself also stays mounted while the user is on another route: the shell wraps the router view in a <code>keep-alive</code> keyed on the project epoch, so navigating away pauses the canvas but keeps the page — and its connection — alive until the loaded project changes.</p>
|
||||
<h2 id="control-tree">Control Tree</h2>
|
||||
<p>The page hosts an <code>execution</code>-scoped Control Tree: an <strong>Execution</strong> root with the <strong>Mission</strong> branch above the <strong>Program</strong> branch. Selecting a node fills the primary editor pane below the tree, and the <a href="execution-tool-bar.html">Execution Tool Bar</a> is mounted on top of that pane whenever the selected id is <code>execution</code> or starts with <code>execution/</code> — so the transport stays reachable from every node of this tree.</p>
|
||||
<p><strong>Execution root</strong> is the cockpit's home: a short orientation panel, because the controls it would otherwise hold live where they act — the transport on the primary pane's header, the panel switches on each panel's own expansion header, the column switches on the nav bar. The live run state rides the tree itself: the Execution tree item carries a status badge fed by <code>/executionStatusHub</code>.</p>
|
||||
<p><strong>Mission</strong> (<code>execution/mission</code>) is the editable command list a run executes — the project's <a class="xref" href="../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_PlayerCommand">PlayerCommand</a> <small>(API)</small>, always a list, with nested lists read as sub-trees. Its ItemType registry supplies the tree checkbox that decides whether a command runs. The branch root is the entry-list editor — Add Command over a drag-reorderable row list with up / down / duplicate / delete — each command entry gets a control bar over that kind's own editor, and each of the kind's remaining setting groups becomes a section child of the command node. Every command type has its own page under <a href="mission/index.html">Mission</a>.</p>
|
||||
<p><strong>Program</strong> (<code>execution/program</code>) is the read-only inspection twin of Mission: one node per NC source file the session read, its passes and execution marks filled in from run data rather than typed in. Its nodes, its per-pass line and mark views, and the status changes that rebuild it are on <a href="program.html">Program Branch</a>.</p>
|
||||
<p>Selection and URL are synced two ways through the <code>tree</code> query argument: the URL's <code>?tree=</code> is adopted once the tree is built, and every selection change replaces it. A <code>?tree=</code> id belonging to another page's tree redirects to that page (<code>routeForTreeId</code>), and <code>/mission</code> lands on <code>/execution?tree=execution/mission</code>.</p>
|
||||
<h2 id="renderingcanvas-behavior">RenderingCanvas Behavior</h2>
|
||||
<p>The canvas is split across the two sides: the browser component owns a canvas element and its connection, the server owns the displayee.</p>
|
||||
<ol>
|
||||
<li>The browser component opens a SignalR connection to <code>/renderingHub</code> and streams frames. It holds no displayee of its own.</li>
|
||||
<li><code>POST /api/Execution/initialize/{connectionId}</code> resolves that connection's engine on the server, binds <code>ProjectDisplayeeService.ExecutionDisplayee</code> to the engine's <a class="xref" href="../../api/Hi.Disp.DispEngine.html">DispEngine</a>.<a class="xref" href="../../api/Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_Displayee">Displayee</a> unless one is already bound there, and snaps the camera to the home view through <a class="xref" href="../../api/Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SetViewToHomeView">SetViewToHomeView()</a>.</li>
|
||||
<li>The displayee receives project data from <a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a>.</li>
|
||||
<li>The connection is per rendering session, so a collapsed canvas keeps its connection and only stops drawing; the engine is paused while the panel is collapsed or the page is off-screen.</li>
|
||||
</ol>
|
||||
<p>Isometric is one of the view presets the user picks from the <a class="xref" href="../widget/renderingcanvas-tool-bar.html">RenderingCanvas Tool Bar</a> — alongside front, back, right, left, top and bottom — not the load-time view.</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>
|
||||
<p>Page, routing and Control Tree:</p>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/pages/ExecutionPage.vue</code> — the routed page at <code>/execution</code>: the four columns, their pixel / ratio splitters, the panel-expansion stacks, and the <code>execution</code>-scoped Control Tree host it provides.</li>
|
||||
<li><code>wwwroot-src/src/router/routes.ts</code> — the <code>/</code> → <code>execution</code> redirect, the <code>execution</code> route, and the <code>/mission</code> redirect to <code>/execution?tree=execution/mission</code>.</li>
|
||||
<li><code>wwwroot-src/src/router/treeRoutes.ts</code> — <code>routeForTreeId</code>, which lands a <code>?tree=</code> id on the page that owns that branch.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/useControlTreeHost.ts</code> — the Control Tree state machine: <code>buildExecutionRoot()</code> builds the <code>execution</code> root holding <code>execution/mission</code> above <code>execution/program</code>, syncs <code>?tree=</code>, and re-reads the Program branch whenever the broadcast execution status changes.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/ControlTreeDock.vue</code> — the left dock: the Control Tree row over the primary editor row.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/ControlTreePanel.vue</code> — the tree pane; carries the live execution-status badge on the Execution tree item.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/PrimarySlavePanel.vue</code> — the primary editor pane for the selected node; mounts the Execution Tool Bar on top whenever the selection is <code>execution</code> or a descendant.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/ExecutionRootPanel.vue</code> — the editor panel of the Execution root node.</li>
|
||||
</ul>
|
||||
<p>Mission branch:</p>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/controlTree/missionItemTypes.ts</code> — the branch's ItemType registry and the per-command enable ticks.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionRootPanel.vue</code> — the entry-list editor of a list command, serving the branch root and every nested list.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionCommandSlavePanel.vue</code> — the per-command editor host.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionSectionPanel.vue</code> — one setting section of a command.</li>
|
||||
</ul>
|
||||
<p>Program branch (see the dedicated anatomy page for details):</p>
|
||||
<ul>
|
||||
<li><a href="program.html">Program Branch</a> — the branch's ItemType registry, its root, file and conversion panels, and the read-only endpoints behind them.</li>
|
||||
</ul>
|
||||
<p>Panels and canvas:</p>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/RenderingCanvas.vue</code> — the browser canvas and its <code>/renderingHub</code> connection.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/ExecutionToolBar.vue</code> — the transport controls.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/ExecutionExtendedToolBar.vue</code> — the view and rendering-flag controls adopted onto the canvas panel's header.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/SelectedStepInfoPanel.vue</code> — Step Properties.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/StepVolumePanel.vue</code> — the CWE panel.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/SyntaxPiecePanel.vue</code> — Sentence Syntax.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/SessionMessagePanel.vue</code> — the message panel and its four sink tabs.</li>
|
||||
<li><code>wwwroot-src/src/components/panels/PanelExpansion.vue</code> and <code>wwwroot-src/src/components/panels/ResizablePanelStack.vue</code> — the collapse-in-place panels and their draggable heights.</li>
|
||||
<li><code>wwwroot-src/src/layouts/MainLayout.vue</code> — the shell whose keep-alive wrapper, keyed on the project epoch, holds this page mounted across navigation.</li>
|
||||
</ul>
|
||||
<p>Charts (see the dedicated anatomy pages for details):</p>
|
||||
<ul>
|
||||
<li><a href="strip-charts.html">Strip Charts</a> — three <code>uplot</code>-backed strip charts driven by <code>ClStrip</code>.</li>
|
||||
<li><a href="cycle-line-charts.html">Cycle-Line Charts</a> — four <code>uplot</code>-backed per-step charts.</li>
|
||||
</ul>
|
||||
<p>Shared chart primitives under <code>wwwroot-src/src/components/execution/charts/</code>:</p>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/UplotChart.vue</code> — thin uplot wrapper with <code>ResizeObserver</code> and reactive <code>data</code> / <code>series</code> / <code>bands</code> bindings.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/BaseStripChart.vue</code> — strip-chart skeleton: min / max banded series, header aspect picker, wheel / drag / click pointer handlers.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/BaseCycleLineChart.vue</code> — cycle-line skeleton that takes a <code>fetcher</code> prop and re-fetches when the step selection changes.</li>
|
||||
</ul>
|
||||
<p>Backends:</p>
|
||||
<ul>
|
||||
<li><code>Execution/ExecutionController.cs</code> — <code>POST /api/Execution/start | pause | resume | run-line | run-step | stop | reset</code>; <code>GET status</code>, <code>status/{connectionId}</code>, <code>project-status</code>, <code>selected-step-info</code> and <code>cl-strip-dots</code>; the canvas actions <code>initialize/{connectionId}</code> (binds the displayee and calls <code>SetViewToHomeView</code>) and <code>fit-view/{connectionId}</code>; and the <code>step-volume/{connectionId}</code> family behind the CWE panel.</li>
|
||||
<li><code>Execution/ExecutionStatusHub.cs</code> + <code>Execution/ExecutionStatusService.cs</code> — <code>/executionStatusHub</code>, the run-state broadcast that drives the transport and the tree badge.</li>
|
||||
<li><code>Execution/SessionSinkHub.cs</code> + <code>Execution/SessionSinkBroadcastService.cs</code> — one hub per message sink (<code>/shellMessageHub</code>, <code>/ncDiagnosticHub</code>, <code>/stepDiagnosticHub</code>, <code>/ncManipulationDiagnosticHub</code>), so a client subscribes to exactly the sink it wants.</li>
|
||||
<li><code>Execution/SelectedStepInfoService.cs</code> — the selected-step payload. It has no hub of its own: the “selection changed” push rides <code>/clStripHub</code>.</li>
|
||||
<li><code>Execution/ClStripController.cs</code> + <code>Execution/ClStripHub.cs</code> + <code>Execution/ClStripBroadcastService.cs</code> — CL-strip range state and the zoom / pan / select / enter broadcasts.</li>
|
||||
<li><code>Execution/ExecutionChartsController.cs</code> — the strip-chart and cycle-line-chart data endpoints under <code>/api/execution</code>.</li>
|
||||
<li><code>Disp/RenderingHub.cs</code> + <code>Disp/RenderingService.cs</code> — the shared <code>/renderingHub</code> every page's RenderingCanvas connects to, keyed per rendering connection id.</li>
|
||||
<li><code>Disp/ExecutionDisplayee.cs</code> — the server-side displayee bound to the connection's engine.</li>
|
||||
<li><code>Common/ProjectDisplayeeService.cs</code> — owns the <code>ExecutionDisplayee</code> instance handed to the engine on initialize.</li>
|
||||
</ul>
|
||||
<h2 id="building-an-equivalent-page">Building an Equivalent Page</h2>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>When building an execution cockpit on top of HiAPI:</p>
|
||||
<ol>
|
||||
<li>Create the layout with a RenderingCanvas.</li>
|
||||
<li>Set up the canvas behavior.</li>
|
||||
<li>Add the <a href="execution-tool-bar.html">Execution Tool Bar</a>.</li>
|
||||
<li>Add the <a href="execution-extended-renderingcanvas-tool-bar.html">Execution Extended RenderingCanvas Tool Bar</a> with the CL-strip, fit-view and rendering-items behaviors.</li>
|
||||
<li>Reach the page from the navigation menu on <a class="xref" href="../shell/main-panel.html">Main Panel</a>.</li>
|
||||
<li>Make it the landing page, with its tool bars.</li>
|
||||
<li>Build the <a class="xref" href="../shell/session-message-panel.html">Session Message Panel</a> and the <a href="selected-step-info-panel.html">Selected-Step Info Panel</a>, and put the button that opens the <a class="xref" href="step-present-dialog.html">Step Present Dialog</a> on the latter's title bar.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h2 id="pages">Pages</h2>
|
||||
<p>Ordered as the cockpit reads: the two tool bars across the top, the step column and the charts down
|
||||
the side, the menus and dialogs they open, then the Control-Tree branch the page hosts.</p>
|
||||
<ul>
|
||||
<li><a href="execution-tool-bar.html">Execution Tool Bar</a> — The transport controls on the primary panel header, and the status they read</li>
|
||||
<li><a href="execution-extended-renderingcanvas-tool-bar.html">Execution Extended RenderingCanvas Tool Bar</a> — The run-specific canvas controls: the CL strip, fit view and the Scene menu</li>
|
||||
<li><a href="selected-step-info-panel.html">Selected-Step Info Panel</a> — The Step Properties panel in the Step Info column</li>
|
||||
<li><a href="strip-charts.html">Strip Charts</a> — The whole-program charts in the Strip Charts column</li>
|
||||
<li><a href="cycle-line-charts.html">Cycle-Line Charts</a> — The per-step charts in the Step Info column</li>
|
||||
<li><a href="graphic-cache-menu.html">Graphic-Cache Menu</a> — The meshed-geometry cache limits, edited from the canvas header</li>
|
||||
<li><a href="step-present-dialog.html">Step Present Dialog</a> — The step-property presentation settings, opened from the Step Properties panel</li>
|
||||
<li><a href="mission/index.html">Mission</a> — The command-list branch this page hosts, one page per command type</li>
|
||||
<li><a href="program.html">Program Branch</a> — The read-only inspection twin of Mission: one node per NC source file the run read, its passes and its execution marks</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a href="execution-tool-bar.html">Execution Tool Bar</a> — the transport buttons and their status feed</li>
|
||||
<li><a href="execution-extended-renderingcanvas-tool-bar.html">Execution Extended RenderingCanvas Tool Bar</a> — CL strip, fit view and the rendering-items menu</li>
|
||||
<li><a href="selected-step-info-panel.html">Selected-Step Info Panel</a> — the Step Properties panel in the Step Info column</li>
|
||||
<li><a href="strip-charts.html">Strip Charts</a> — the whole-program charts in the Strip Charts column</li>
|
||||
<li><a href="cycle-line-charts.html">Cycle-Line Charts</a> — the per-step charts in the Step Info column</li>
|
||||
<li><a class="xref" href="../shell/session-message-panel.html">Session Message Panel</a> — the run log under the canvas</li>
|
||||
<li><a class="xref" href="../widget/renderingcanvas-tool-bar.html">RenderingCanvas Tool Bar</a> — the view controls the canvas header adopts</li>
|
||||
<li><a class="xref" href="../shell/main-panel.html">Main Panel</a> — the shell that routes to this page</li>
|
||||
<li><a href="mission/index.html">Mission</a> — the command-list branch this page hosts, one page per command type</li>
|
||||
<li><a class="xref" href="../general-setup/index.html">General Setup Page</a> — the other Control-Tree page, and the equipment this run consumes</li>
|
||||
<li><a href="program.html">Program Branch</a> — the read-only inspection twin of Mission this page hosts below it</li>
|
||||
<li><a class="xref" href="../platform/control-tree.html">Control Tree</a> — the engine behind this page's tree, shared with General Setup</li>
|
||||
<li><a class="xref" href="../platform/tree-ids-and-routes.html">Tree Ids and Routes</a> — the <code>?tree=</code> surface this page's selection rides on</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>
|
||||
@@ -0,0 +1,322 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>List Command Panel | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="List Command 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 "{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="Anatomy-ListCommandPanel">
|
||||
<h1 id="list-command-panel">List Command Panel</h1>
|
||||
|
||||
<p>A <a class="xref" href="../../../api/Hi.SessionCommands.ListCommand.html">ListCommand</a> is the container command: an optional title plus a list of
|
||||
enable-wrapped commands. Running one walks
|
||||
<a class="xref" href="../../../api/Hi.SessionCommands.ListCommand.html#Hi_SessionCommands_ListCommand_CommandEntryList">CommandEntryList</a> top-down and skips a disabled entry together
|
||||
with everything nested under it — the wrapper yields nothing while its flag is clear. The mission's
|
||||
own command is always a list, so the <a class="xref" href="mission-root-panel.html">Mission branch root</a> <em>is</em> a
|
||||
list, and every nested one is the same shape one level down.</p>
|
||||
<p><code>List</code> is an ordinary catalog kind — category Flow — so a list is added the way any command is, and
|
||||
adding one grows a sub-tree: the node's children are its own entries, and its panel embeds the same
|
||||
entry-list editor the branch root uses, scoped to the nested list.</p>
|
||||
<p>This page covers what a list is, how its title reads, and what moving commands in and out of one
|
||||
costs. The entry-list editor itself — Add Command, the row actions, the three drag landings — is
|
||||
documented once, on <a class="xref" href="mission-root-panel.html">Mission Root Panel</a>.</p>
|
||||
<h2 id="key-models">Key Models</h2>
|
||||
<ul>
|
||||
<li><strong>Primary</strong>: <a class="xref" href="../../../api/Hi.SessionCommands.ListCommand.html">ListCommand</a> — <a class="xref" href="../../../api/Hi.SessionCommands.ListCommand.html#Hi_SessionCommands_ListCommand_Title">Title</a>
|
||||
and <a class="xref" href="../../../api/Hi.SessionCommands.ListCommand.html#Hi_SessionCommands_ListCommand_CommandEntryList">CommandEntryList</a>.</li>
|
||||
<li><strong>Supporting</strong>:
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../api/Hi.SessionCommands.EnablingWrapper.html">EnablingWrapper</a> — one entry:
|
||||
<a class="xref" href="../../../api/Hi.SessionCommands.EnablingWrapper.html#Hi_SessionCommands_EnablingWrapper_Command">Command</a> plus
|
||||
<a class="xref" href="../../../api/Hi.SessionCommands.EnablingWrapper.html#Hi_SessionCommands_EnablingWrapper_IsEnabled">IsEnabled</a>.</li>
|
||||
<li><a class="xref" href="../../../api/Hi.SessionCommands.ITitleCommand.html">ITitleCommand</a> — <code>ListCommand</code> implements it, and
|
||||
<a class="xref" href="../../../api/Hi.SessionCommands.ITitleCommand.html#Hi_SessionCommands_ITitleCommand_GetCommandTitle_">GetCommandTitle</a> composes the label a row shows.</li>
|
||||
<li><a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_PlayerCommand">PlayerCommand</a> — the mission's command, a list.</li>
|
||||
<li><a class="xref" href="../../../api/Hi.SessionCommands.CommandCatalogAttribute.html">CommandCatalogAttribute</a> and <a class="xref" href="../../../api/Hi.SessionCommands.CommandCategory.html">CommandCategory</a>
|
||||
— what makes <code>List</code> addable, and the group it is offered under.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="the-panel-of-a-list-entry">The Panel of a List Entry</h2>
|
||||
<p>Selecting a list command in the Control Tree opens, top to bottom:</p>
|
||||
<ul>
|
||||
<li>List Entry Panel
|
||||
<ul>
|
||||
<li>Control Bar
|
||||
<ul>
|
||||
<li>Up / Down / Duplicate / Delete — labelled buttons for the operations that rewrite the
|
||||
<strong>parent</strong> list. Delete asks for confirmation in a dialog naming the command.</li>
|
||||
<li>At the bar's left, a caption while the command is disabled: skipped during play, still
|
||||
editable.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Title (optional) Input</li>
|
||||
<li>Embedded Entry-List Editor
|
||||
<ul>
|
||||
<li>This list's own entries, scoped to the node's path.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>The Title input holds the <strong>raw</strong> title — empty when unset — while the label the row and the tree
|
||||
show is composed by the engine: <code>List</code> when the title is blank, <code>List [title]</code> when it is not. A
|
||||
titled list still says what it is. A whitespace-only title counts as unset and is never written into
|
||||
the project file, so it cannot come back as a changed title on the next load.</p>
|
||||
<p>Keystrokes debounce into one title save. The pending save is flushed before anything that shifts the
|
||||
entry paths — a structural operation, a duplicate, a selection change — and cancelled on delete and
|
||||
on unmount, so a late write cannot land on whichever command slid into the old path. Once it is
|
||||
saved the tree label refreshes in place rather than by rebuilding the branch, which would remount
|
||||
the open editor mid-edit.</p>
|
||||
<p>The root list is the one list without a title input: the branch root reads <code>Mission</code>.</p>
|
||||
<h2 id="enabling-and-what-a-disabled-list-skips">Enabling, and What a Disabled List Skips</h2>
|
||||
<p>The enable switch is the checkbox on the command's own Control Tree item, not a control in the entry
|
||||
row. It decides only whether the command <strong>runs</strong>: while it is clear the row and the tree node dim,
|
||||
and the editor stays open and fully editable. Unticking a list dims its whole sub-tree — the dim
|
||||
rides ancestor propagation in the tree while each nested entry keeps its own flag, which is exactly
|
||||
what the run does: a disabled entry is skipped with everything under it.</p>
|
||||
<h2 id="paths">Paths</h2>
|
||||
<p>A command node's key is its Mission API path — <code>"0"</code>, <code>"1"</code>, nested <code>"0.2"</code> for entry 2 inside the
|
||||
list at index 0. Every structural change re-mints them: deleting entry 2 slides the next command
|
||||
into path <code>"2"</code>. Each branch build therefore stamps its nodes, so the editor panel remounts onto the
|
||||
new path instead of going on showing the command that used to live there.</p>
|
||||
<h2 id="moving-commands-in-and-out">Moving Commands In and Out</h2>
|
||||
<ul>
|
||||
<li><strong>Into a list</strong> — drag a row onto the middle band of a list row; that row's outer quarters still
|
||||
reorder around it.</li>
|
||||
<li><strong>Out of a list</strong> — drag onto the drop-out zone of a nested list's editor, which is visible only
|
||||
while a row inside that editor is being dragged. The entry lands right after the list command
|
||||
itself in the owning list.</li>
|
||||
</ul>
|
||||
<p>Both are the same reparent call. The server resolves the source list and the target list to object
|
||||
references before it mutates either, so the index shift the removal causes cannot misroute the
|
||||
insert, and it refuses to move a list into itself or into one of its own descendants. That guard
|
||||
compares identity rather than path-string prefixes, because <code>"02"</code>, <code>"+2"</code> and <code>" 2"</code> all parse to
|
||||
index 2.</p>
|
||||
<p>Two more properties of a list follow from the same API:</p>
|
||||
<ul>
|
||||
<li><strong>A new command lands at the end</strong> of the list it was added to, root or nested. Nothing is pinned;
|
||||
the order is entirely the user's, changed with the row's up / down buttons or by dragging.</li>
|
||||
<li><strong>Duplicate is a deep copy.</strong> The entry is cloned through the same XML round-trip the project file
|
||||
uses, so a nested list copies with its whole sub-tree, and the clone lands right after the source.</li>
|
||||
</ul>
|
||||
<p>Dragging serves rearrangement only: a drag carrying text or files is ignored, because the row's drag
|
||||
handling returns as soon as the drag did not start on a row. To bring several program files in at
|
||||
once, open a <a class="xref" href="NcFileCommand-panel.html">Program File</a> command's picker and pick them
|
||||
together — the first pick lands on that command and each further pick becomes another Program File
|
||||
command right after it, in pick order, inside the same list at any depth.</p>
|
||||
<h2 id="which-commands-a-list-can-hold">Which Commands a List Can Hold</h2>
|
||||
<p>The addable set is the server's command catalog: every engine command carrying <code>[CommandCatalog]</code>,
|
||||
reflected into the picker Add Command opens, which searches by display label, kind key and alias.
|
||||
<code>List</code> is one of those commands, which is what makes nesting an ordinary act rather than a special
|
||||
case. The frontend contributes an icon per kind, and its own label where it has one; the server
|
||||
supplies the localized label otherwise, so a newly attributed engine command becomes addable with no
|
||||
frontend change.</p>
|
||||
<p>A command without that attribute stays loadable from a project file but is never offered for
|
||||
creation. General Config is the one such command with an editor of its own: it is the legacy
|
||||
settings bundle, so a project file storing one loads as the individual setting commands it stands
|
||||
for and saving never writes the bundle back — editable when a project still constructs one through
|
||||
the API, and absent from the catalog.</p>
|
||||
<p>Selecting an entry row selects that command's tree node, and the command's editor opens on that
|
||||
node — the kind's own panel when one exists, otherwise a generic editor built from the scalar fields
|
||||
the command declares. Selection is one row at a time: there is no multi-selection here, and every
|
||||
action acts on the row that carries it. Because the server composes every entry label, a command
|
||||
carrying no title of its own still reads as its localized display name.</p>
|
||||
<p>There is no second column inside this editor: the entry list is a single column in the tree's editor
|
||||
pane. The draggable vertical divider on screen belongs to the Execution page, between the left dock
|
||||
— the Control Tree over the editor panel — and the central area; a second divider inside that dock
|
||||
drags the height between the tree and the editor.</p>
|
||||
<h2 id="the-wpf-clients-list-panel">The WPF Client's List Panel</h2>
|
||||
<p>The WPF panel edits the <strong>root</strong> list only. It binds the project's player command as a list, its Add
|
||||
menu offers no List item, and its content switch has no List arm, so a nested list entry selected
|
||||
there renders the literal text “No editor available for ListCommand”. Nesting is a web surface.</p>
|
||||
<ul>
|
||||
<li>Two columns: a 400px entry column, a <code>GridSplitter</code>, and the selected command's content column,
|
||||
both columns floored at 300px.</li>
|
||||
<li>One toolbar over the list — Add, Remove, Move Up, Move Down — acting on the list selection. There
|
||||
is no duplicate.</li>
|
||||
<li>Add is a plain button that pops a fixed six-item context menu built in its click handler:
|
||||
“Pre-Setting Command”, “NC Opt Option Command”, “NC File Command”, “NC Code Command”,
|
||||
“Script Command” and “Post Execution Command”.</li>
|
||||
<li>The list box is extended-select. Remove takes every selected entry, prompting with a count when
|
||||
more than one is selected, and a drag can carry a whole selection; Move Up and Move Down stay
|
||||
disabled unless exactly one entry is selected.</li>
|
||||
<li>Each entry box carries a labelled Enable checkbox at its left, the command's title in bold, and a
|
||||
pin icon with a “Pin at beginning” / “Pin at end” label — shown on the first entry when it is a
|
||||
General Config command, and on the last when it is a Post-Execution command.</li>
|
||||
<li>Insertion works around the ends: a new entry lands before a trailing Post-Execution when that is
|
||||
the list's only one, and a General Config lands at the top unless the list already starts with
|
||||
one. A drag that would move a pinned entry — or drop another entry onto it — is refused, the guard
|
||||
testing that the entry is the only command of its kind and sits at that end. The Move Up / Move
|
||||
Down buttons are not covered by that guard.</li>
|
||||
<li>The content panel is greyed and made read-only while the selected entry's Enable box is clear.</li>
|
||||
<li>Files dropped from the file explorer onto the entry list create one enabled NC File command per
|
||||
file, taking a project-relative path when the file sits under the project directory.</li>
|
||||
<li>The entry label falls back to the raw class name for a command that composes no title of its
|
||||
own — <code>GeomDiffCommand</code>, <code>OptimizeToFilesCommand</code>, <code>WriteStepFilesCommand</code> and
|
||||
<code>WriteShotFilesCommand</code>.</li>
|
||||
</ul>
|
||||
<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>
|
||||
<h3 id="web-application">Web Application</h3>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionCommandSlavePanel.vue</code> — a list entry's panel: the
|
||||
control bar, the optional Title input with its debounce / flush / cancel discipline, the embedded
|
||||
entry-list editor of a list entry, and the bespoke-or-generic editor choice for every other kind.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionRootPanel.vue</code> — the entry-list editor embedded
|
||||
here and serving the branch root: the rows and their actions, the three drag landings, and the
|
||||
drop-out zone shown only during a drag inside a nested editor.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/missionItemTypes.ts</code> — the child builders that recurse
|
||||
into a list's own entries, the per-kind editor override map, the kind and category icons, and the
|
||||
per-build stamp that forces the panel remount.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/useControlTreeHost.ts</code> — which nodes show a checkbox, the
|
||||
dim that flows down a disabled command's sub-tree, the enable write, and the in-place label
|
||||
refresh after a title edit or a language switch.</li>
|
||||
<li><code>wwwroot-src/src/api/mission.ts</code> — the typed wrapper over the Mission API and the path convention
|
||||
(<code>root</code> or empty = the root list, <code>0.2</code> = a nested entry).</li>
|
||||
<li><code>wwwroot-src/src/components/mission/GenericCommandPanel.vue</code> — the editor a catalog kind gets when
|
||||
it ships no bespoke panel, built from the command's declared scalar fields.</li>
|
||||
<li><code>wwwroot-src/src/components/mission/NcFileCommandPanel.vue</code> — the multi-pick file dialog: the
|
||||
first pick lands on the command, each further pick becomes another Program File command right
|
||||
after it.</li>
|
||||
<li><code>wwwroot-src/src/pages/ExecutionPage.vue</code> — the page-level splitter between the left dock and the
|
||||
central area.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/tree.ts</code> — the <code>tree.mission.*</code> strings: the kind names, the drop-out
|
||||
zone, the run-order hint, the disabled hint and the operation labels.</li>
|
||||
<li><code>Missions/MissionController.cs</code> — the entry lifecycle: <code>GET list-command/entries</code> (recursive),
|
||||
<code>POST list-command/entries</code> and <code>POST list-command/entries/{path}</code> (append at the tail of the root
|
||||
or of a nested list), <code>DELETE list-command/entries/{path}</code>,
|
||||
<code>POST list-command/entries/{path}/move</code>, <code>PUT list-command/reorder</code>,
|
||||
<code>POST list-command/entries/{path}/duplicate</code> (the XML-round-trip deep clone),
|
||||
<code>POST list-command/entries/{path}/reparent</code> (drag-into-list and drop-out, with the self/descendant
|
||||
guard), <code>PUT commands/{path}/listcommand</code> for the title, and <code>PUT commands/{path}/enabled</code> for an
|
||||
entry's enable flag. <code>GetCommandTitle</code> composes every entry label the tree shows.</li>
|
||||
<li><code>Missions/MissionCommandCatalog.cs</code> — reflects the <code>[CommandCatalog]</code> commands into the addable
|
||||
set and constructs the picked kind.</li>
|
||||
</ul>
|
||||
<h3 id="hiapi-engine">HiAPI Engine</h3>
|
||||
<ul>
|
||||
<li><code>HiNc/SessionCommands/ListCommand.cs</code> — the container: the optional title, the entry list a run
|
||||
walks top-down, the whitespace-only-title-is-unset XML rule, the Flow catalog attribute, and the
|
||||
<code>List</code> / <code>List [title]</code> composition.</li>
|
||||
<li><code>HiNc/SessionCommands/EnablingWrapper.cs</code> — the enable flag plus the wrapped command that together
|
||||
make one entry.</li>
|
||||
<li><code>HiNc/SessionCommands/ITitleCommand.cs</code> — the interface a command implements to compose its own
|
||||
title from the caller's vocabulary.</li>
|
||||
<li><code>HiNc/SessionCommands/CommandCatalogAttribute.cs</code> — <code>CommandCategory</code> and the attribute (category,
|
||||
order, kind key, aliases) that makes the addable set backend-owned.</li>
|
||||
<li><code>HiNc/SessionCommands/PreSettingCommand.cs</code> — the General Config bundle: no catalog attribute, and
|
||||
a loaded project expands a stored one into the split setting commands.</li>
|
||||
<li><code>HiNc/MachiningProcs/MachiningProject.cs</code> — declares the mission's command and keeps it a list.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="mission-root-panel.html">Mission Root Panel</a> — the entry-list editor this command embeds, documented once</li>
|
||||
<li><a href="../../../manual/run/building-a-mission.html">Building a Mission</a> — the task this command serves: grouping a mission and moving entries between groups</li>
|
||||
<li><a href="index.html">Mission</a> — the rest of the command panels</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>
|
||||
@@ -0,0 +1,212 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>NcCodeCommand Panel | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="NcCodeCommand 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 "{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="Anatomy-NcCodeCommandPanel">
|
||||
<h1 id="nccodecommand-panel">NcCodeCommand Panel</h1>
|
||||
|
||||
<p>The key model is <a class="xref" href="../../../api/Hi.SessionCommands.NcCodeCommand.html">NcCodeCommand</a>.</p>
|
||||
<p>The command carries two values: <a class="xref" href="../../../api/Hi.SessionCommands.NcCodeCommand.html#Hi_SessionCommands_NcCodeCommand_NcText">NcText</a>, the NC program
|
||||
itself, and <a class="xref" href="../../../api/Hi.SessionCommands.NcCodeCommand.html#Hi_SessionCommands_NcCodeCommand_Title">Title</a>, the name that program runs under. Both
|
||||
are written into the project file — the command emits a title element and an NC-text element, and
|
||||
the project nests the whole command list into its own XML — so the program travels with the project
|
||||
instead of existing as a file beside it. That is the whole difference from
|
||||
<a class="xref" href="NcFileCommand-panel.html">Program File</a>, which stores a path and leaves the program on disk.
|
||||
A mission can therefore carry a short program without producing an artifact of its own.</p>
|
||||
<p>Title is not decoration. <code>Run</code> passes it to <a class="xref" href="../../../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_RunNc_">RunNc</a> as the
|
||||
program name the run log shows, which is why the model defaults it to the command's own name,
|
||||
<code>NC Code</code>, rather than to an empty string. It is also the detail the mission row brackets: the row
|
||||
reads <code>NC Code</code> while the title is empty or still that default, and <code>NC Code [title]</code> once it says
|
||||
something else.</p>
|
||||
<p>The panel renders on the command's own node in the Mission branch of the Execution page's Control
|
||||
Tree, below the move / duplicate / delete control bar. A single-purpose kind like this one embeds
|
||||
its whole editor on that node rather than growing section child nodes.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li>NcCodeCommand Panel
|
||||
<ul>
|
||||
<li>Title Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.NcCodeCommand.html#Hi_SessionCommands_NcCodeCommand_Title">Title</a>.</li>
|
||||
<li>Labelled "Title (optional)". A newly added command arrives with the model's default name,
|
||||
<code>NC Code</code>, already in the field; renaming it renames the program in the run log and in the
|
||||
mission row.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>NC Code Editor Area
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.NcCodeCommand.html#Hi_SessionCommands_NcCodeCommand_NcText">NcText</a>.</li>
|
||||
<li>A plain monospace text area: on the web an 18-row field with a 360 px floor, on WPF a Consolas
|
||||
text box in an NC Code group box that takes the panel's remaining height.</li>
|
||||
<li>No line-number gutter and no syntax highlighting on either client. The rich editor in this
|
||||
folder is the <a class="xref" href="script-command-panel.html">Script command</a>'s — that command ships
|
||||
CodeMirror with a C# grammar, this one ships a text area.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Stats and Actions Row (web)
|
||||
<ul>
|
||||
<li>Line count and character count, both recomputed as the text changes.</li>
|
||||
<li>Trim Blank Lines Button — trims every line and drops the ones left empty, then saves at once.</li>
|
||||
<li>Clear Button — confirms in a dialog before emptying the NC text.</li>
|
||||
<li>Both buttons stay disabled while the code is empty.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="saving">Saving</h2>
|
||||
<p>Typing in either field schedules one save 400 ms after the last keystroke, so a burst of typing
|
||||
costs one request instead of one per character. Trim Blank Lines and Clear save immediately rather
|
||||
than through that timer.</p>
|
||||
<p>The write is a single patch endpoint carrying the NC text and the title. Each field is applied only
|
||||
when the body actually carries it, which is why the client sends the field it changed and a null for
|
||||
the one it did not.</p>
|
||||
<p>NC text is not validated while it is edited: there is no parse at edit time and no error surface on
|
||||
the panel — the server stores whatever string arrives. Errors surface when the mission plays the
|
||||
text.</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>
|
||||
<h3 id="web-application">Web Application</h3>
|
||||
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/mission/NcCodeCommandPanel.vue</code> — this panel: the Title input, the
|
||||
18-row monospace text area, the 400 ms debounced saves, the live line and character stats, Trim
|
||||
Blank Lines, and Clear behind a confirm dialog.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/missionItemTypes.ts</code> — maps the <code>nccode</code> kind to this
|
||||
panel, and states the rule it belongs to: a single-purpose kind embeds its whole editor on the
|
||||
command node.</li>
|
||||
<li><code>wwwroot-src/src/api/mission.ts</code> — <code>loadNcCode</code> and <code>setNcCode</code>, and the command shape the panel
|
||||
edits (NC code plus title).</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/mission.ts</code> — the panel's wording: the NC Code label, the character
|
||||
count, Trim Blank Lines, and the line count it shares with the other panels.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/dialog.ts</code> — the Clear confirmation's title and message.</li>
|
||||
<li><code>Missions/MissionController.cs</code> — the single patch PUT for this command, whose NC-code and title
|
||||
fields are each applied when the body carries them, and the command-snapshot arm that returns both
|
||||
back to the panel.</li>
|
||||
</ul>
|
||||
<h3 id="hiapi-engine">HiAPI Engine</h3>
|
||||
<ul>
|
||||
<li><code>HiNc/SessionCommands/NcCodeCommand.cs</code> — the model: <code>NcText</code>, <code>Title</code> defaulting to the command's
|
||||
own display name, the Program-category catalog registration, the XML round-trip that puts the NC
|
||||
text into the project file, <code>Run</code> handing text and title to the session shell, and the row-label
|
||||
rule that shows the bare name while the title is unset or still the default.</li>
|
||||
<li><code>HiNc/MachiningProcs/SessionShell.cs</code> — <code>RunNc</code> takes the NC text plus an alternative file name,
|
||||
and that name is the title this command supplies for the log.</li>
|
||||
<li><code>HiNc/MachiningProcs/MachiningProject.cs</code> — nests the command list into the project XML, which is
|
||||
how this command's NC text persists with the project.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="NcFileCommand-panel.html">NcFileCommand Panel</a> — the other Program command: a path to a file instead of text stored in the project</li>
|
||||
<li><a class="xref" href="script-command-panel.html">Script Command Panel</a> — the rich editor this folder does have, and why this command ships a plain text area instead</li>
|
||||
<li><a href="../../../manual/run/playing-a-program.html">Playing a Program</a> — the task these two commands serve</li>
|
||||
<li><a href="index.html">Mission</a> — the rest of the command panels</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>
|
||||
@@ -0,0 +1,273 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>NcFileCommand Panel (Program File) | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="NcFileCommand Panel (Program File) | 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="Anatomy-NcFileCommandPanel">
|
||||
<h1 id="ncfilecommand-panel-program-file">NcFileCommand Panel (Program File)</h1>
|
||||
|
||||
<p>The key model is <a class="xref" href="../../../api/Hi.SessionCommands.NcFileCommand.html">NcFileCommand</a>.</p>
|
||||
<p>The command carries exactly two values: <a class="xref" href="../../../api/Hi.SessionCommands.NcFileCommand.html#Hi_SessionCommands_NcFileCommand_NcFile">NcFile</a>, the path of
|
||||
the program to play, and <a class="xref" href="../../../api/Hi.SessionCommands.NcFileCommand.html#Hi_SessionCommands_NcFileCommand_NcKind">NcKind</a>, the runner that plays it.
|
||||
The program text stays a file on disk — the project stores the path and nothing else, which is what
|
||||
separates this command from <a class="xref" href="NcCodeCommand-panel.html">NC Code</a>, whose text is serialized
|
||||
into the project itself.</p>
|
||||
<p><code>NcFile</code> is normally a path relative to the project folder — that is what the browse dialog yields —
|
||||
and an absolute path on the server is accepted just as well. No base directory is stored with the
|
||||
command: at play time <a class="xref" href="../../../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_RunNcFile_">RunNcFile</a> hands the stored path
|
||||
together with the project's own base directory to the local project service, and that is where a
|
||||
relative path acquires its root. The WPF panel's <code>BaseDirectory</code> is the code-behind assistant
|
||||
property the <a class="xref" href="../../conventions/gui-file-path-assignment.html">Load Pattern</a> asks a file-assigning GUI to carry,
|
||||
assigned to the panel by its parent — a panel member, not a model member.</p>
|
||||
<p>The panel renders on the command's own node in the Mission branch of the Execution page's Control
|
||||
Tree, below the move / duplicate / delete control bar. This command has no title of its own, so the
|
||||
row and tree label read <code>Program File [path]</code>, the path being the detail the label brackets.</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>The GUI labels this command “Program File”: it plays NC, CL (CLSF) and CSV files — the runner is
|
||||
picked by <a class="xref" href="../../../api/Hi.SessionCommands.NcFileCommand.html#Hi_SessionCommands_NcFileCommand_NcKind">NcKind</a>, and
|
||||
<a class="xref" href="../../../api/Hi.MachiningProcs.NcKind.html#Hi_MachiningProcs_NcKind_Auto">Auto</a> reads it off the extension
|
||||
(<a class="xref" href="../../../api/Hi.MachiningProcs.NcKindUtil.html#Hi_MachiningProcs_NcKindUtil_DetectByPath_">DetectByPath</a>: <code>.cl</code>, <code>.cls</code> and <code>.clsf</code> play as CL, <code>.csv</code>
|
||||
as CSV, and every other extension as brand NC).</p>
|
||||
</div>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li>NcFileCommand Panel
|
||||
<ul>
|
||||
<li>Head Line
|
||||
<ul>
|
||||
<li>Program File Path Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.NcFileCommand.html#Hi_SessionCommands_NcFileCommand_NcFile">NcFile</a>.</li>
|
||||
<li>Its hint names both accepted forms: an absolute path on the server, or a path relative to
|
||||
the project folder.</li>
|
||||
<li>Every keystroke saves the path. Leaving the field or pressing Enter additionally refreshes
|
||||
the file-info banner.</li>
|
||||
<li>The web field flexes to fill the row beside the Browse button at any panel width; the WPF
|
||||
field is a fixed 200 px column carrying its own label.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Browse Button
|
||||
<ul>
|
||||
<li>Opens the shared file-explorer dialog — see <a href="#browsing-for-a-program">Browsing for a Program</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Play As Select
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.NcFileCommand.html#Hi_SessionCommands_NcFileCommand_NcKind">NcKind</a>.</li>
|
||||
<li>Four choices: Auto (by extension), Brand NC, CL (CLSF) and CSV. The hint restates what Auto
|
||||
detects, so the runner can be pinned when the extension would route the file elsewhere.</li>
|
||||
<li>This control is the web client's. The WPF panel ships no kind control, so a project edited
|
||||
there keeps the kind it already holds — Auto until something else sets it.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>File Info Banner
|
||||
<ul>
|
||||
<li>Appears once the path field is non-empty. Every fact in it is read on the server.</li>
|
||||
<li>Found: a green banner stating the file size, its modified stamp and its line count, with a
|
||||
Preview button in the banner's action slot.</li>
|
||||
<li>Missing: an orange banner saying the file is not found on the server, and no Preview button.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Preview Dialog
|
||||
<ul>
|
||||
<li>Read-only. The server returns the file's first 100 lines and the dialog shows them in a
|
||||
monospace block that scrolls within 60% of the viewport height, inside a card capped at 80%.
|
||||
An empty file previews as "(empty)".</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="browsing-for-a-program">Browsing for a Program</h2>
|
||||
<p>Browse opens the shared server-side file explorer dialog. File reads happen on the server; the
|
||||
browser never uploads file bytes.</p>
|
||||
<p>The <a class="xref" href="../../conventions/gui-file-path-assignment.html">Load Pattern</a>'s general web convention offers the Admin,
|
||||
Project and Resource roots. This picker narrows to one: it opens on the project directory and allows
|
||||
no other root, so a pick always yields a project-relative path. A file outside the project is
|
||||
reached by typing its absolute path into the path field, which the server accepts.</p>
|
||||
<p>The dialog carries four filter groups rather than one catch-all:</p>
|
||||
<ul>
|
||||
<li><strong>NC Files</strong> — <code>.nc</code>, <code>.anc</code>, <code>.tap</code>, <code>.eia</code>, <code>.mpf</code>, <code>.spf</code>, <code>.cnc</code>, <code>.ptp</code>, <code>.h</code>. The open set:
|
||||
brand controller extensions, of which these are the common ones rather than all of them.</li>
|
||||
<li><strong>CL Files</strong> — <code>.cl</code>, <code>.cls</code>, <code>.clsf</code>.</li>
|
||||
<li><strong>CSV Files</strong> — <code>.csv</code>.</li>
|
||||
<li><strong>All Files</strong> — an empty extension list, which is the empty filter the Load Pattern asks every
|
||||
browser to preserve. It is the backstop for a brand extension the NC group does not name.</li>
|
||||
</ul>
|
||||
<p>CL and CSV are split out because they are closed extension sets: those are exactly the extensions
|
||||
Auto routes to the CL and CSV runners, and everything else falls through to brand NC.</p>
|
||||
<p>The WPF Browse button opens an <code>OpenFileDialog</code> with the panel's file-filter resource, starting at
|
||||
the project directory or at the current file's own directory. A pick under the project directory is
|
||||
stored as a relative path, and a pick outside it as an absolute one.</p>
|
||||
<h2 id="multi-pick-fan-out">Multi-Pick Fan-Out</h2>
|
||||
<p>The dialog is multi-select, and this is the one command editor that grows the mission. The first
|
||||
picked file lands on this command. Each further pick becomes a <strong>new</strong> Program File command, added
|
||||
to the list this command sits in and moved into place directly after it, in pick order — the same
|
||||
list, so a command inside a nested list fans out inside that nested list. The panel then reports a
|
||||
structure change, which rebuilds the owning list's branch around the new rows and leaves the
|
||||
selection on this command.</p>
|
||||
<h2 id="where-the-program-text-is-edited">Where the Program Text Is Edited</h2>
|
||||
<p>The two clients part company here, and the command is the same either way: it stores a path.</p>
|
||||
<ul>
|
||||
<li><strong>Web</strong> — the panel does not edit the file. It assigns the path, picks the runner, reports what
|
||||
the server knows about the file, and previews its first 100 lines read-only. Nothing in the
|
||||
browser writes NC bytes back; the two file endpoints this panel calls are both reads.</li>
|
||||
<li><strong>WPF</strong> — the panel opens the file. A non-text file, or one the panel cannot find, disables the
|
||||
editor and states why in the Head Message Place above it. A text file within 20000 lines opens for
|
||||
editing, with its line count in the group-box header; a longer one shows its first 20000 lines
|
||||
read-only and warns in the Head Message Place. Two seconds after the last keystroke the editor
|
||||
writes the file back, and reports the save in that same message place. The editor is AvalonEdit
|
||||
with line numbers where that assembly resolves, and a plain Consolas text box otherwise.</li>
|
||||
</ul>
|
||||
<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>
|
||||
<h3 id="web-application">Web Application</h3>
|
||||
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/mission/NcFileCommandPanel.vue</code> — this panel: the path field and
|
||||
Browse, the “Play As” kind select, the file-info banner and its Preview button, the read-only
|
||||
preview dialog, the four filter groups, and the multi-pick fan-out.</li>
|
||||
<li><code>wwwroot-src/src/components/widgets/FileExplorerDialog.vue</code> — the shared server-side browser
|
||||
Browse opens: the pickable / multi / filters / initial-root / allowed-roots props, and the pick
|
||||
event whose emitted strings pair a root name with a relative path — that relative half is what the
|
||||
command stores.</li>
|
||||
<li><code>wwwroot-src/src/components/widgets/fileFilter.ts</code> — the filter shape the four groups are built
|
||||
from; an empty extension list means all files.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/missionItemTypes.ts</code> — maps the <code>ncfile</code> kind to this
|
||||
panel. A kind absent from that map is served by the generic field editor instead.</li>
|
||||
<li><code>wwwroot-src/src/api/mission.ts</code> — <code>loadNcFile</code>, <code>setNcFilePath</code>, <code>setNcFileNcKind</code>,
|
||||
<code>getNcFileInfo</code> and <code>previewNcFile</code>, plus the kind union and the file-info shape.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/mission.ts</code> — the panel's wording: the path hint, the Play As hint, the
|
||||
four filter labels, the banner's found and not-found lines, and the preview titles.</li>
|
||||
<li><code>Missions/MissionController.cs</code> — four endpoints serve this command: a PUT for the path, a PUT for
|
||||
the NC kind, and the two server-side reads behind the banner and the preview (both POSTs, both
|
||||
resolving a relative path against the project folder). The command-snapshot builder emits the file
|
||||
path and the NC kind for this kind of command.</li>
|
||||
</ul>
|
||||
<h3 id="hiapi-engine">HiAPI Engine</h3>
|
||||
<ul>
|
||||
<li><code>HiNc/SessionCommands/NcFileCommand.cs</code> — the model: <code>NcFile</code>, <code>NcKind</code> defaulting to Auto, the
|
||||
“Program File” display name and its Program-category catalog registration, the XML round-trip that
|
||||
writes the path verbatim, the <code>Program File [path]</code> row label, and <code>Run</code> handing path and kind to
|
||||
the session shell.</li>
|
||||
<li><code>HiMech/MachiningProcs/NcKind.cs</code> — the kind enum (Auto / BrandNc / Cl / Csv) and the
|
||||
detect-by-path helper, the authority for what Auto does.</li>
|
||||
<li><code>HiNc/MachiningProcs/SessionShell.cs</code> — <code>RunNcFile</code> passes the stored path together with the
|
||||
project's base directory to the local project service.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="NcCodeCommand-panel.html">NcCodeCommand Panel</a> — the other Program command: NC text stored in the project instead of a path to a file</li>
|
||||
<li><a href="../../../manual/run/playing-a-program.html">Playing a Program</a> — the task these two commands serve</li>
|
||||
<li><a href="index.html">Mission</a> — the rest of the command panels</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>
|
||||
@@ -0,0 +1,411 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>NC Optimization Option Panel (NC Optimization Config) | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="NC Optimization Option Panel (NC Optimization Config) | 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="Anatomy-NcOptOptionPanel">
|
||||
<h1 id="nc-optimization-option-panel-nc-optimization-config">NC Optimization Option Panel (NC Optimization Config)</h1>
|
||||
|
||||
<p>The key model is <a class="xref" href="../../../api/Hi.SessionCommands.NcOptOptionCommand.html">NcOptOptionCommand</a>; the options it carries are a
|
||||
<a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html">NcOptOption</a>.</p>
|
||||
<p>The command exists so the optimizer's settings are a step in the mission rather than a global
|
||||
preference. <code>Run</code> assigns the command's option object onto the session shell — the whole body is
|
||||
<code>sessionShell.NcOptOption = NcOptOption</code> — so the settings take effect at the point the entry sits
|
||||
in the list. Everything played below it optimizes under them, and a second NC Optimization Config
|
||||
further down the list re-points them mid-mission.</p>
|
||||
<p>The command carries no title on either client. Its row and its tree label always read
|
||||
<code>NC Optimization Config</code>: <code>GetCommandTitle</code> returns that fixed name and takes nothing from the user.</p>
|
||||
<h2 id="where-it-renders">Where It Renders</h2>
|
||||
<p>The web client has one editor component for this command and mounts it once per tree node, each
|
||||
mount scoped to one group of options:</p>
|
||||
<ul>
|
||||
<li>The <strong>NC Optimization Config</strong> node itself carries the four enable checkboxes, below the
|
||||
move / duplicate / delete control bar every command node shows.</li>
|
||||
<li>The node grows five <strong>section children</strong> — Distances, Feedrate, Motion Dynamics, Force & Safety,
|
||||
Compensation — and each mounts the same component scoped to its own section.</li>
|
||||
</ul>
|
||||
<p>Unlike the General Config and Post-Execution sections, none of these five section nodes carries an
|
||||
enable checkbox: this kind declares no section enable flags, so the tree hides the tick on them. The
|
||||
command node's own checkbox is the only switch, and it only decides whether the mission runs the
|
||||
command — a disabled command is skipped during play and stays fully editable.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li><p>NC Optimization Config Node</p>
|
||||
<ul>
|
||||
<li>Enable Optimization CheckBox
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_EnableOpt">EnableOpt</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Enable Feedrate Optimization CheckBox
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_EnableOptFeedrate">EnableOptFeedrate</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Enable Depth Splition CheckBox
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_EnableDepthSplition">EnableDepthSplition</a>.</li>
|
||||
<li>The desktop client labels the same switch “Enable Depth Splitting”.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Enable Interpolation CheckBox
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_EnableInterpolation">EnableInterpolation</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p>Distances Section</p>
|
||||
<ul>
|
||||
<li>Extended Pre Distance Numeric Field (mm)
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_ExtendedPreDistance_mm">ExtendedPreDistance_mm</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Extended Post Distance Numeric Field (mm)
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_ExtendedPostDistance_mm">ExtendedPostDistance_mm</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p>Feedrate Section</p>
|
||||
<ul>
|
||||
<li>Min Feedrate Numeric Field (mm/min)
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_MinFeedrate_mmdmin">MinFeedrate_mmdmin</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Max Feedrate Numeric Field (mm/min)
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_MaxFeedrate_mmdmin">MaxFeedrate_mmdmin</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Rapid Feed Numeric Field (mm/min)
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_RapidFeed_mmdmin">RapidFeed_mmdmin</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Min Feed Per Tooth Numeric Field (mm)
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_MinFeedPerTooth_mm">MinFeedPerTooth_mm</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Max Feed Per Tooth Numeric Field (mm)
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_MaxFeedPerTooth_mm">MaxFeedPerTooth_mm</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Feedrate Assignment Ratio Numeric Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_FeedrateAssignmentRatio">FeedrateAssignmentRatio</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p>Motion Dynamics Section</p>
|
||||
<ul>
|
||||
<li>Max Acceleration Numeric Field (mm/s²)
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_MaxAcceleration_mmds2">MaxAcceleration_mmds2</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Max Jerk Numeric Field (mm/s³)
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_MaxJerk_mmds3">MaxJerk_mmds3</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p>Force & Safety Section</p>
|
||||
<ul>
|
||||
<li>Preferred Force Numeric Field (N)
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_PreferedForce_N">PreferedForce_N</a>.</li>
|
||||
<li>The one field hinted "Accepts Infinity.", and the one field with no lower bound.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Yielding Safety Factor Numeric Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_YieldingSafetyFactor">YieldingSafetyFactor</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Thermal Yield Safety Factor Numeric Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_ThermalYieldSafetyFactor">ThermalYieldSafetyFactor</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Spindle Torque Safety Factor Numeric Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_MaxSpindleTorqueSafetyFactor">MaxSpindleTorqueSafetyFactor</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Spindle Power Safety Factor Numeric Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_MaxSpindlePowerSafetyFactor">MaxSpindlePowerSafetyFactor</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p>Compensation Section</p>
|
||||
<ul>
|
||||
<li>Enable Forward Compensation CheckBox
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_EnableForwardCompensation">EnableForwardCompensation</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Enable Side Compensation CheckBox
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_EnableSideCompensation">EnableSideCompensation</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Enable Depth Compensation CheckBox
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.NcOpt.NcOptOption.html#Hi_NcOpt_NcOptOption_EnableDepthCompensation">EnableDepthCompensation</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>The three compensation switches are bit accessors over the model's compensation mask — forward is
|
||||
bit 0, side bit 1, depth bit 2 — so all three travel as one integer in the project file.</p>
|
||||
<h2 id="saving">Saving</h2>
|
||||
<p>Every edit writes at once. There is no Save button and no dirty state: a checkbox saves on click, a
|
||||
numeric field saves when it loses focus or on Enter, and each write is one PUT for that one
|
||||
property. The value is applied locally first; if the request fails, the panel re-reads the whole
|
||||
command and raises a toast, so the field snaps back to what the server holds.</p>
|
||||
<p>The read side is a single command snapshot rather than one GET per property: the panel loads the
|
||||
command and takes its <code>ncOptOption</code> object. Two keys in that object drop the engine's <code>Max</code> prefix —
|
||||
the spindle torque and spindle power safety factors travel as <code>spindleTorqueSafetyFactor</code> and
|
||||
<code>spindlePowerSafetyFactor</code>.</p>
|
||||
<h2 id="infinity-and-bounds">Infinity and Bounds</h2>
|
||||
<p><code>Infinity</code> is a legal value for Preferred Force and Max Feed Per Tooth, and those two are exactly
|
||||
the properties whose endpoints take a string body: the client sends the literal <code>Infinity</code> (or
|
||||
<code>-Infinity</code>), and the reader parses the same spelling back. Every other property's endpoint takes a
|
||||
typed <code>bool</code> or <code>double</code>.</p>
|
||||
<p>Every numeric field except Preferred Force is bounded at 0 — a smaller number is refused in the
|
||||
field with “Must be ≥ 0” and never reaches the server.</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>The engine's XML form parses these values through <code>XmlConvert.ToDouble</code>, which is why an infinite
|
||||
feed per tooth or preferred force survives a project save and reload.</p>
|
||||
</div>
|
||||
<h2 id="defaults">Defaults</h2>
|
||||
<p>A freshly added command carries the option model's own initial values, so the panel opens on them:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Option</th>
|
||||
<th>Default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>The four enable switches</td>
|
||||
<td>all on</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extended Pre / Post Distance</td>
|
||||
<td>2 mm</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Min / Max Feedrate</td>
|
||||
<td>1 / 20000 mm/min</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rapid Feed</td>
|
||||
<td>20000 mm/min</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Min / Max Feed Per Tooth</td>
|
||||
<td>0 mm / <code>Infinity</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Feedrate Assignment Ratio</td>
|
||||
<td>0.01</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Max Acceleration / Max Jerk</td>
|
||||
<td>10 mm/s² / 100 mm/s³</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Preferred Force</td>
|
||||
<td><code>Infinity</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Yielding / Thermal Yield Safety Factor</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Spindle Torque / Power Safety Factor</td>
|
||||
<td>1.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>The three compensation switches</td>
|
||||
<td>all off</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2 id="the-two-clients">The Two Clients</h2>
|
||||
<p>The desktop client edits the same command in one scrolling panel of six group boxes, and it names 17
|
||||
of the model's options — the four enable switches, the two distances, the three feedrates,
|
||||
acceleration and jerk, Preferred Force with the two spindle safety factors, and the three
|
||||
compensation switches.</p>
|
||||
<p>The web client edits five more, and that is the whole difference between the two editors: Min Feed
|
||||
Per Tooth, Max Feed Per Tooth and Feedrate Assignment Ratio in the Feedrate section, and Yielding
|
||||
Safety Factor and Thermal Yield Safety Factor in Force & Safety.</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>
|
||||
<h3 id="web-application">Web Application</h3>
|
||||
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/mission/NcOptOptionCommandPanel.vue</code> — this panel. A <code>section</code> prop
|
||||
picks the one group it renders, a setter map routes each field to its API call, and a failed write
|
||||
re-reads the command and notifies.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/missionItemTypes.ts</code> — registers the <code>ncoptoption</code> kind's
|
||||
bespoke editor, declares its five section children, gives it the <code>tune</code> icon and the
|
||||
<code>NC Optimization Config</code> display name, and leaves it out of the section-enable readers and writers
|
||||
so its section nodes carry no checkbox.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionCommandSlavePanel.vue</code> — the control bar above the
|
||||
command node's checkboxes.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionSectionPanel.vue</code> — mounts this panel once per
|
||||
section node, scoped to that node's section.</li>
|
||||
<li><code>wwwroot-src/src/api/mission.ts</code> — the option shape the panel edits, the reader that takes the
|
||||
<code>ncOptOption</code> snapshot and parses <code>Infinity</code>, and one setter per property over
|
||||
<code>commands/{path}/ncoptoption/{endpoint}</code>.</li>
|
||||
<li><code>wwwroot-src/src/components/widgets/NumericInput.vue</code> — the field every non-boolean option uses:
|
||||
it commits on blur or Enter, spells infinity as <code>Infinity</code>, and enforces the minimum the panel
|
||||
passes.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/mission.ts</code> — the option labels and the “Accepts Infinity.” hint.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/tree.ts</code> — the kind name and the five section names the tree shows.</li>
|
||||
<li><code>Missions/NcOptOptionEndpoints.cs</code> — a partial of the same <code>MissionController</code>: one PUT per
|
||||
editable property, two of them string-bodied so <code>Infinity</code> round-trips. Each creates the option
|
||||
object when the command has none, and answers a command-type mismatch when the path holds another
|
||||
kind.</li>
|
||||
<li><code>Missions/MissionController.cs</code> — builds the command snapshot the panel reads, re-keying the two
|
||||
spindle safety factors onto their wire names, and owns the entry lifecycle — add, delete, move,
|
||||
duplicate, reparent — that puts this command in the list.</li>
|
||||
</ul>
|
||||
<h3 id="hiapi-engine">HiAPI Engine</h3>
|
||||
<ul>
|
||||
<li><code>HiNc/SessionCommands/NcOptOptionCommand.cs</code> — the mission entry: the <code>NC Optimization Config</code>
|
||||
display name, its Optimization catalog registration, the single option property, the fixed command
|
||||
title, the XML round-trip that nests the options in the project file, and the <code>Run</code> that assigns
|
||||
them onto the session shell.</li>
|
||||
<li><code>HiMech/NcOpt/NcOptOption.cs</code> — the option model: the engine-side names
|
||||
<code>MaxSpindleTorqueSafetyFactor</code> and <code>MaxSpindlePowerSafetyFactor</code>, the compensation booleans as bit
|
||||
accessors over one mask, and the mm/min feedrates as conversions over mm/s storage.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="PostExecutionCommand-panel.html">PostExecutionCommand Panel</a> — where the optimized programs are written out, under the settings this command puts in force</li>
|
||||
<li><a href="../../../manual/run/the-other-commands.html">The Other Commands</a> — the task this command serves</li>
|
||||
<li><a href="index.html">Mission</a> — the rest of the command panels</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>
|
||||
@@ -0,0 +1,310 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PostExecutionCommand Panel (Post-Execution) | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="PostExecutionCommand Panel (Post-Execution) | 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="Anatomy-PostExecutionCommandPanel">
|
||||
<h1 id="postexecutioncommand-panel-post-execution">PostExecutionCommand Panel (Post-Execution)</h1>
|
||||
|
||||
<p>The key model is <a class="xref" href="../../../api/Hi.SessionCommands.PostExecutionCommand.html">PostExecutionCommand</a>, the command both clients label
|
||||
<strong>Post-Execution</strong>. It is the Output category's first catalog entry, and it carries five outputs
|
||||
derived from what the session has played: step files, shot files, optimization files, a CL → NC
|
||||
writeback, and a geometry-difference detection.</p>
|
||||
<h2 id="when-it-runs-and-what-it-covers">When It Runs, and What It Covers</h2>
|
||||
<p>Post-Execution is an ordinary entry in the command list, not an end-of-run hook. Its name describes
|
||||
what it consumes, not a fixed position: the list runs its entries in order and skips any whose
|
||||
Enable box is clear, and everything this command writes is derived from what the session has played
|
||||
<strong>so far</strong>.</p>
|
||||
<p>That makes its placement the whole question. Put it after two program entries and it writes both.
|
||||
Put a second one halfway down the list and it writes an interim snapshot of the same accumulating
|
||||
state. The CL → NC writeback says this outright in the panel — place the CL-playing Program File
|
||||
command before this command — and it re-serializes every control file the session played, so an NC
|
||||
play is written back too. Read this together with
|
||||
<a class="xref" href="PreSettingCommand-panel.html">General Config</a>, the other half of the pair: those settings
|
||||
apply from their position forward, these outputs cover everything up to this position.</p>
|
||||
<p>The web client places the command anywhere in the list, like any other. The WPF client pins it to
|
||||
the end: a new command is inserted before a trailing Post-Execution while that is the list's only
|
||||
one, and the drag guard refuses to move it off the last position.</p>
|
||||
<p><code>Run</code> executes the enabled outputs in an order of its own, which is <strong>not</strong> the order the tree and
|
||||
the list below show them in: shot files, then step files, then optimization, then the CL → NC
|
||||
writeback, then the geometry difference. Output timestamps follow that order rather than the layout.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<p>Every output is a section child node of the command, and each section's enable flag is that node's
|
||||
own tree checkbox. The command node itself carries only a caption saying so; the section panels hold
|
||||
the template and numeric fields, which stay editable whether or not the output is switched on —
|
||||
the flag decides what runs, not what can be edited.</p>
|
||||
<ul>
|
||||
<li>Step Files Output Section
|
||||
<ul>
|
||||
<li>The node's checkbox is <a class="xref" href="../../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_EnableWriteStepFiles">EnableWriteStepFiles</a>.</li>
|
||||
<li>Step File Template Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_StepFileTemplate">StepFileTemplate</a>.</li>
|
||||
<li>Default value: <code>Output/[NcName].step.csv</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Writes the step-series data of what the session has played.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Shot Files Output Section
|
||||
<ul>
|
||||
<li>The node's checkbox is <a class="xref" href="../../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_EnableWriteShotFiles">EnableWriteShotFiles</a>.</li>
|
||||
<li>Shot File Template Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_ShotFileTemplate">ShotFileTemplate</a>.</li>
|
||||
<li>Default value: <code>Output/[NcName].shot.csv</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Shot File Time Resolution Number Field (ms)
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_ShotFileTimeResolution_ms">ShotFileTimeResolution_ms</a>.</li>
|
||||
<li>Default value: 1</li>
|
||||
<li>This sampling period — not the machining resolution — sets the accuracy ceiling of the
|
||||
time-series data, and a fine period produces a large file: a six-cut program writes about
|
||||
13 MB at 1 ms and about 128 MB at 0.1 ms.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Optimization Output Section
|
||||
<ul>
|
||||
<li>The node's checkbox is <a class="xref" href="../../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_EnableOptimizeToFiles">EnableOptimizeToFiles</a>.</li>
|
||||
<li>Optimization File Template Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_OptimizationFileTemplate">OptimizationFileTemplate</a>.</li>
|
||||
<li>Default value: <code>Output/Opt-[NcName]</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>The SoftNc pipeline runs when the SoftNc runner is on and the session holds played syntax
|
||||
layers; otherwise the HardNc path runs. Both clear every cutter's optimization-limit cache
|
||||
first.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>CL → NC Writeback Section
|
||||
<ul>
|
||||
<li>The node's checkbox is <a class="xref" href="../../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_EnableConvertClToNcFiles">EnableConvertClToNcFiles</a>.</li>
|
||||
<li>NC Output Template Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_ClToNcFileTemplate">ClToNcFileTemplate</a>.</li>
|
||||
<li>Default value: <code>Output/[NcName].nc</code></li>
|
||||
<li>Its hint states the substitution: <code>[NcName]</code> is replaced by the source file name, extension
|
||||
kept.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>A caption below the field explains the synthesis: the MSYS frame becomes a <code>G68.2</code> tilted
|
||||
working plane, tool posture becomes <code>G43.4</code> RTCP with rotary words, and motions become
|
||||
<code>G00</code>/<code>G01</code>/<code>G02</code>/<code>G03</code>. The CL must have been played on an XYZABC machine chain first. The
|
||||
converted files appear as <code>→ file.nc</code> nodes on the Execution Program branch, with source ⇄
|
||||
output line jumps.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Geometry Difference Detection Section
|
||||
<ul>
|
||||
<li>The node's checkbox is <a class="xref" href="../../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_EnableGeomDiff">EnableGeomDiff</a>.</li>
|
||||
<li>Detect Radius Number Field (mm)
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_GeomDiffDetectRadius_mm">GeomDiffDetectRadius_mm</a>.</li>
|
||||
<li>Default value: 1</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Compares the workpiece geometry at that radius. With no workpiece in the session it reports
|
||||
“No Workpiece exist” and does nothing.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Shot Files Output and Optimization Output are the two physics-gated sections. The condition is the
|
||||
physics preference <strong>and</strong> the advanced-physics licence, served to the client already combined; when
|
||||
it is off, the tree builder omits those two nodes entirely, and a preference flip shows up on the
|
||||
next branch rebuild. CL → NC Writeback is deliberately not gated — writeback is a SoftNc syntax
|
||||
feature, not a physics one.</p>
|
||||
<p>Every edit saves as it is made. A rejected save is reported and the panel reloads the command.</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>Post-Execution writes run-derived files only. The meshed-geometry snapshot is a placeable command
|
||||
of its own, because a snapshot can be taken at any spot in a mission: Record Meshed Geometry
|
||||
(<a class="xref" href="../../../api/Hi.SessionCommands.RecordMeshedGeomCommand.html">RecordMeshedGeomCommand</a>, with its No Action / Read / Write / Read On
|
||||
First Or Write modes) and Export Meshed Geometry (STL)
|
||||
(<a class="xref" href="../../../api/Hi.SessionCommands.ExportMeshedGeomToStlCommand.html">ExportMeshedGeomToStlCommand</a>) are both Output-category catalog entries
|
||||
with editors of their own. Opening a project that still carries an enabled meshed-geometry output
|
||||
on this command raises a system warning naming the replacement, and re-saving the project drops
|
||||
the element.</p>
|
||||
</div>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><a class="xref" href="../../../api/Hi.SessionCommands.GeomDiffCommand.html">GeomDiffCommand</a> exists as a standalone command, as do
|
||||
<code>WriteStepFilesCommand</code>, <code>WriteShotFilesCommand</code> and <code>OptimizeToFilesCommand</code>. None of them
|
||||
carries the catalog attribute, so they load from a project file but are not offered in the Add
|
||||
Command dialog. Post-Execution is the catalogued carrier of these outputs, which is why they are
|
||||
edited as its sections.</p>
|
||||
</div>
|
||||
<h2 id="the-wpf-clients-panel">The WPF Client's Panel</h2>
|
||||
<p>There four of the outputs are group boxes on one panel, each an enable checkbox over a grid that is
|
||||
disabled until the box is ticked: Step Files Output, Shot Files Output, Optimization Output and
|
||||
Geometry Difference Detection. The physics condition collapses the Shot Files and Optimization group
|
||||
boxes rather than omitting tree nodes.</p>
|
||||
<p>CL → NC Writeback is the one output the web client has and this panel does not. Its two properties
|
||||
live on the same engine command, and the web section and its two endpoints are where they are
|
||||
edited.</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>
|
||||
<h3 id="web-application">Web Application</h3>
|
||||
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/mission/PostExecutionCommandPanel.vue</code> — the command node's caption
|
||||
and one headerless block per section: step-files, shot-files, optimization, cl-nc-writeback and
|
||||
geom-diff. No checkboxes live here.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/missionItemTypes.ts</code> — declares the five sections with
|
||||
their labels, marks Shot Files and Optimization physics-gated with an explicit note that CL → NC
|
||||
is not, filters the gated sections out of the tree, and maps each section id to its enable-flag
|
||||
reader and writer.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionSectionPanel.vue</code> — renders one section headerless,
|
||||
the breadcrumb already naming it, and passes no enable state down because the flags decide only
|
||||
what runs.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/useControlTreeHost.ts</code> — the ticks: a command node ticks
|
||||
its own enable flag, a section node with an enable flag ticks that, and every other node hides the
|
||||
box.</li>
|
||||
<li><code>wwwroot-src/src/api/mission.ts</code> — <code>loadPostExecution</code> and the eleven <code>postexecution/*</code> PUTs.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/mission.ts</code> — the field labels, the <code>[NcName]</code> hint, the command node's
|
||||
overview caption and the writeback paragraph.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/tree.ts</code> — the five section node labels.</li>
|
||||
<li><code>wwwroot-src/src/stores/appState.ts</code> — the physics preference and licence flags the tree builder
|
||||
reads.</li>
|
||||
<li><code>Environments/PreferenceController.cs</code> — serves the physics preference already combined with the
|
||||
advanced-physics licence, the same condition the WPF panel evaluates.</li>
|
||||
<li><code>Missions/MissionController.cs</code> — the <code>commands/{path}/postexecution/*</code> endpoints: the five enable
|
||||
flags, the four templates, the shot-file time resolution and the geom-diff detect radius.</li>
|
||||
</ul>
|
||||
<h3 id="hiapi-engine">HiAPI Engine</h3>
|
||||
<ul>
|
||||
<li><code>HiNc/SessionCommands/PostExecutionCommand.cs</code> — the model, its display name and Output-category
|
||||
catalog registration, every default above, the run order, and the warning raised for a project
|
||||
still carrying a meshed-geometry output.</li>
|
||||
<li><code>HiNc/SessionCommands/ListCommand.cs</code> — the in-order run that skips disabled entries, which is
|
||||
what makes this command's placement decide what it covers.</li>
|
||||
<li><code>HiNc/MachiningProcs/SessionShell.cs</code> — what each output actually calls: the shot-file writer and
|
||||
its sampling-period guidance, the step-file writer, the optimization routing between the SoftNc
|
||||
and HardNc paths, the CL → NC writeback synthesis, and the workpiece difference.</li>
|
||||
<li><code>HiNc/SessionCommands/GeomDiffCommand.cs</code>, <code>HiNc/SessionCommands/WriteStepFilesCommand.cs</code>,
|
||||
<code>HiNc/SessionCommands/WriteShotFilesCommand.cs</code> and
|
||||
<code>HiNc/SessionCommands/OptimizeToFilesCommand.cs</code> — the standalone commands behind the same four
|
||||
outputs: loadable from a project file, absent from the catalog.</li>
|
||||
<li><code>HiNc/SessionCommands/RecordMeshedGeomCommand.cs</code> and
|
||||
<code>HiNc/SessionCommands/ExportMeshedGeomToStlCommand.cs</code> — the two catalogued Output commands that
|
||||
carry the meshed-geometry snapshot.</li>
|
||||
<li><code>HiNc/SessionCommands/CommandCatalogAttribute.cs</code> — the attribute that separates a loadable
|
||||
command from an addable one.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="PreSettingCommand-panel.html">PreSettingCommand Panel</a> — the other half of the positional pair: those settings apply forward, these outputs cover everything up to here</li>
|
||||
<li><a class="xref" href="NcOptOption-panel.html">NC Optimization Option Panel</a> — the settings the Optimization Output section writes its result under</li>
|
||||
<li><a href="../../../manual/run/the-other-commands.html">The Other Commands</a> — the task this command serves</li>
|
||||
<li><a href="index.html">Mission</a> — the rest of the command panels</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>
|
||||
@@ -0,0 +1,316 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PreSettingCommand Panel (General Config) | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="PreSettingCommand Panel (General Config) | 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="Anatomy-PreSettingCommandPanel">
|
||||
<h1 id="presettingcommand-panel-general-config">PreSettingCommand Panel (General Config)</h1>
|
||||
|
||||
<p>The key model is <a class="xref" href="../../../api/Hi.SessionCommands.PreSettingCommand.html">PreSettingCommand</a>, the command both clients label
|
||||
<strong>General Config</strong>. It is one command carrying a bundle of session settings — the machining
|
||||
resolution, the machining motion resolution, collision detection, pause on failure, physics — plus
|
||||
an optional read of a meshed-geometry file.</p>
|
||||
<h2 id="where-a-general-config-comes-from">Where a General Config Comes From</h2>
|
||||
<p>The two clients differ on how a mission acquires these settings, and that difference is the first
|
||||
thing to know about this panel.</p>
|
||||
<p>The WPF client creates the bundle. Its Add menu carries a hard-coded item that constructs a
|
||||
<code>PreSettingCommand</code>, and the insert rule pins it to the top of the list: a new General Config lands
|
||||
at index 0 unless the list already starts with one, and while it is the list's only General Config
|
||||
the drag guard refuses to move it off that position.</p>
|
||||
<p>The web client's Add Command dialog is served by the server's command catalog, which reflects every
|
||||
engine command carrying <code>[CommandCatalog]</code>. <code>PreSettingCommand</code> carries no such attribute, so the
|
||||
dialog cannot produce one — the catalog keeps <code>presetting</code> only as a readable kind key, and creating
|
||||
a command looks the kind up in the addable set alone. What the web offers instead is the same
|
||||
settings as five separate Setup commands, each placeable anywhere in the list:</p>
|
||||
<ul>
|
||||
<li>Machining Resolution — <a class="xref" href="../../../api/Hi.SessionCommands.MachiningResolutionCommand.html">MachiningResolutionCommand</a>, 0.125 mm by default,
|
||||
reading <code>Machining Resolution [0.125 mm]</code> in the list.</li>
|
||||
<li>Machining Motion Resolution — <a class="xref" href="../../../api/Hi.SessionCommands.MachiningMotionResolutionCommand.html">MachiningMotionResolutionCommand</a>, Feed Per
|
||||
Cycle by default.</li>
|
||||
<li>Collision Detection — <a class="xref" href="../../../api/Hi.SessionCommands.CollisionDetectionCommand.html">CollisionDetectionCommand</a>, on by default.</li>
|
||||
<li>Pause on Failure — <a class="xref" href="../../../api/Hi.SessionCommands.PauseOnFailureCommand.html">PauseOnFailureCommand</a>, off by default.</li>
|
||||
<li>Physics — <a class="xref" href="../../../api/Hi.SessionCommands.PhysicsCommand.html">PhysicsCommand</a>, on by default, its field declared
|
||||
physics-licence gated.</li>
|
||||
</ul>
|
||||
<p>Machining Motion Resolution ships an editor of its own. The other four declare their one scalar with
|
||||
<code>[CommandField]</code> and are served by the generic field editor, which builds their input and its
|
||||
server-localized label from that declaration — so the web ships strictly more here than one bundle
|
||||
panel, and none of the four needed frontend code.</p>
|
||||
<p>A project file never brings a reader to this panel either. Reading a stored bundle materializes
|
||||
those five commands in its place, in the order the bundle applies them, preceded by a Read-mode
|
||||
Record Meshed Geometry entry whenever the meshed-geometry read is enabled or a file is set. The
|
||||
bundle's own enable state is consumed into every entry the expansion produces, and the Record entry
|
||||
additionally keeps the bundle's read flag. A bundle stored as the project's bare root command
|
||||
expands the same way, and what the project saves from then on is the split commands.</p>
|
||||
<p>That leaves one case this panel serves: a <code>PreSettingCommand</code> an API caller constructed into the
|
||||
list in place, which has not yet round-tripped through a project file. It edits that command through
|
||||
the <code>commands/{path}/presetting/*</code> endpoints, and every field is a PUT of its own.</p>
|
||||
<h2 id="when-the-settings-take-effect">When the Settings Take Effect</h2>
|
||||
<p>A list runs its entries in order and skips any entry whose Enable box is clear. General Config's
|
||||
<code>Run</code> then assigns straight onto the session shell, in this order: the meshed-geometry read when it
|
||||
is enabled, the machining resolution, the motion resolution, collision detection, pause on failure,
|
||||
physics.</p>
|
||||
<p>So these are positional settings, not global pre-run settings. A program entry <strong>above</strong> this
|
||||
command plays under whatever was in force before it; entries <strong>below</strong> it play under these values,
|
||||
until something further down changes the session again. The five Setup commands state the same
|
||||
contract one setting at a time — each is documented as taking effect “from this command on” — and
|
||||
each can sit at a different point in the list, which is what having them separate buys.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<p>In the web client the command owns two tree nodes: the command node carrying the machining settings,
|
||||
and one section child carrying the meshed-geometry file reference.</p>
|
||||
<ul>
|
||||
<li>Command Node
|
||||
<ul>
|
||||
<li>Machining Resolution Number Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.PreSettingCommand.html#Hi_SessionCommands_PreSettingCommand_MachiningResolution_mm">MachiningResolution_mm</a>.</li>
|
||||
<li>Unit mm, floored at 0, default 0.125. A free numeric field — the web offers no option list.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Motion Resolution
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.PreSettingCommand.html#Hi_SessionCommands_PreSettingCommand_MachiningMotionResolution">MachiningMotionResolution</a>.</li>
|
||||
<li>A caption over a select with three choices: Feed Per Cycle, Feed Per Tooth and Fixed.</li>
|
||||
<li>Fixed adds a row of two number fields inline, both floored at 0: Linear Resolution (mm) and
|
||||
Rotary Resolution (deg), the two values of
|
||||
<a class="xref" href="../../../api/Hi.Numerical.MachiningMotionResolutionUtils.FixedMachiningMotionResolution.html">FixedMachiningMotionResolution</a>.</li>
|
||||
<li>Switching the type to Fixed carries the outgoing resolution's current linear and rotary values
|
||||
into the new fixed pair rather than resetting them.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Enable Collision Detection CheckBox
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.PreSettingCommand.html#Hi_SessionCommands_PreSettingCommand_EnableCollisionDetection">EnableCollisionDetection</a>.</li>
|
||||
<li>Default value: true</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Enable Pause On Failure CheckBox
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.PreSettingCommand.html#Hi_SessionCommands_PreSettingCommand_EnablePauseOnFailure">EnablePauseOnFailure</a>.</li>
|
||||
<li>Default value: false</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Enable Physics CheckBox
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.PreSettingCommand.html#Hi_SessionCommands_PreSettingCommand_EnablePhysics">EnablePhysics</a>.</li>
|
||||
<li>Default value: true</li>
|
||||
<li>Disabled unless the advanced-physics licence is held. The engine declares the same gate on the
|
||||
split Physics command's field, so both editors refuse the same edit for the same reason.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Meshed Geometry Section Node
|
||||
<ul>
|
||||
<li>The node's own tree checkbox is
|
||||
<a class="xref" href="../../../api/Hi.SessionCommands.PreSettingCommand.html#Hi_SessionCommands_PreSettingCommand_EnableReadMeshedGeom">EnableReadMeshedGeom</a>; the panel below it holds the
|
||||
file reference only. The flag decides what runs, not what can be edited, so the field stays
|
||||
editable whether or not the box is ticked — a read can be prepared before it is switched on.</li>
|
||||
<li>Meshed Geometry File Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.PreSettingCommand.html#Hi_SessionCommands_PreSettingCommand_MeshedGeomFile">MeshedGeomFile</a>.</li>
|
||||
<li>Hinted as a <code>.wct</code> or <code>.stl</code> path relative to the project folder.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Browse Button
|
||||
<ul>
|
||||
<li>Opens the shared server-side file explorer, filtered to <code>.wct</code> / <code>.stl</code> with an All Files
|
||||
fallback. It opens on the project directory and allows no other root, so a pick always yields
|
||||
a project-relative path.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Every edit saves as it is made. A rejected save is reported and the panel reloads the command, so
|
||||
what is on screen is what the server holds.</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>The session's machining resolution is seeded from the workpiece's initial resolution when a
|
||||
project is loaded or assigned — not on a runtime reset and not when the workpiece is swapped, so
|
||||
an explicit setting survives both. This command carries its own value, and overwrites the
|
||||
session's with it at the moment the command runs.</p>
|
||||
</div>
|
||||
<h2 id="the-wpf-clients-panel">The WPF Client's Panel</h2>
|
||||
<p>There the whole bundle is one panel, in two group boxes.</p>
|
||||
<ul>
|
||||
<li><strong>Meshed Geometry Settings</strong> — an Enable Read Meshed Geometry checkbox over a Geometry File text
|
||||
box and a Browse button; the grid beneath the checkbox is disabled until it is ticked. Browse is
|
||||
an <code>OpenFileDialog</code> filtered to <code>*.wct;*.stl</code>, storing a pick under the project directory as a
|
||||
relative path and one outside it as an absolute path.</li>
|
||||
<li><strong>Machining Settings</strong> — the Machining Resolution control is an editable ComboBox pre-filled with
|
||||
fifteen powers of two, from 0.0009765625 up to 16 in doublings, and a typed value outside that
|
||||
list is accepted. Beside the Motion Resolution ComboBox a content presenter holds the fixed
|
||||
fields, built at runtime and labelled Linear Resolution (mm) and Angle Resolution (deg) — Angle
|
||||
Resolution being this client's wording for the same <code>RotaryResolution_deg</code> the web labels Rotary
|
||||
Resolution. The three checkboxes sit loose in the same grid, and the Enable Physics one carries no
|
||||
licence gate.</li>
|
||||
</ul>
|
||||
<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>
|
||||
<h3 id="web-application">Web Application</h3>
|
||||
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/mission/PreSettingCommandPanel.vue</code> — this editor in both of its
|
||||
modes: the command node's machining settings, and the <code>meshed-geometry</code> section's file field with
|
||||
its Browse button.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/missionItemTypes.ts</code> — maps the <code>presetting</code> kind to this
|
||||
panel, declares its one Meshed Geometry section child, and turns <code>EnableReadMeshedGeom</code> into that
|
||||
node's tree checkbox on read and on write.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/useControlTreeHost.ts</code> — which nodes show a checkbox: a
|
||||
command node ticks its own enable flag, a section node with an enable flag ticks that, and every
|
||||
other node hides the box. A disabled command dims its whole subtree.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionSectionPanel.vue</code> — renders one section of a
|
||||
command's editor headerless, the breadcrumb already naming it.</li>
|
||||
<li><code>wwwroot-src/src/components/widgets/FileExplorerDialog.vue</code> — the server-side browser Browse
|
||||
opens, with the project-directory root and the filter list this panel passes it.</li>
|
||||
<li><code>wwwroot-src/src/components/mission/GenericCommandPanel.vue</code> — the editor the four
|
||||
bespoke-panel-less Setup commands get, built from their declared scalar fields.</li>
|
||||
<li><code>wwwroot-src/src/api/mission.ts</code> — <code>loadPreSetting</code> and the nine <code>presetting/*</code> PUTs behind it.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/mission.ts</code> — the panel's wording, including the Rotary Resolution label
|
||||
and the meshed-geometry hint and filter names.</li>
|
||||
<li><code>wwwroot-src/src/stores/appState.ts</code> — the physics-licence flag the Enable Physics checkbox reads.</li>
|
||||
<li><code>Missions/MissionCommandCatalog.cs</code> — the addable set the Add Command dialog is built from: the
|
||||
reflected <code>[CommandCatalog]</code> entries, plus <code>presetting</code> as a read-only kind key that creation
|
||||
never looks at.</li>
|
||||
<li><code>Missions/MissionController.cs</code> — the <code>commands/{path}/presetting/*</code> endpoints:
|
||||
enable-read-meshed-geom, meshed-geom-file, machining-resolution-mm,
|
||||
machining-motion-resolution-type, fixed-linear-resolution-mm, fixed-rotary-resolution-deg,
|
||||
enable-collision-detection, enable-pause-on-failure and enable-physics. The type switch is where
|
||||
the current linear and rotary values are carried into a new fixed resolution.</li>
|
||||
</ul>
|
||||
<h3 id="hiapi-engine">HiAPI Engine</h3>
|
||||
<ul>
|
||||
<li><code>HiNc/SessionCommands/PreSettingCommand.cs</code> — the model, its defaults, the order <code>Run</code> applies
|
||||
them onto the session shell, and the expansion into the split Setup commands.</li>
|
||||
<li><code>HiNc/SessionCommands/CommandCatalogAttribute.cs</code> — the attribute the catalog reflects, and the
|
||||
five categories. A command without it stays loadable from project files but is not offered for
|
||||
creation.</li>
|
||||
<li><code>HiNc/SessionCommands/CommandFieldAttribute.cs</code> — the scalar-field declaration the generic editor
|
||||
renders, with its label, unit and physics-licence gate.</li>
|
||||
<li><code>HiNc/SessionCommands/ListCommand.cs</code> — the in-order run that skips disabled entries, and the XML
|
||||
read path that expands a stored bundle in place.</li>
|
||||
<li><code>HiNc/MachiningProcs/MachiningProject.cs</code> — the same expansion for a bundle stored as the
|
||||
project's bare root command.</li>
|
||||
<li><code>HiNc/SessionCommands/MachiningResolutionCommand.cs</code>,
|
||||
<code>HiNc/SessionCommands/MachiningMotionResolutionCommand.cs</code>,
|
||||
<code>HiNc/SessionCommands/CollisionDetectionCommand.cs</code>,
|
||||
<code>HiNc/SessionCommands/PauseOnFailureCommand.cs</code> and <code>HiNc/SessionCommands/PhysicsCommand.cs</code> — the
|
||||
five Setup commands the web catalog offers, their defaults and their list titles. The detection,
|
||||
pause and physics settings each carry the “from this command on” wording.</li>
|
||||
<li><code>HiNc/MachiningProcs/LocalProjectService.cs</code> — the session's machining resolution and the seeding
|
||||
from the workpiece's initial resolution on project load or assignment.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="PostExecutionCommand-panel.html">PostExecutionCommand Panel</a> — the other half of the positional pair: these settings apply forward, those outputs cover everything up to there</li>
|
||||
<li><a href="../../../manual/run/the-other-commands.html">The Other Commands</a> — the five Setup commands this bundle expands into, as a task</li>
|
||||
<li><a href="index.html">Mission</a> — the rest of the command panels</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>
|
||||
@@ -0,0 +1,143 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Mission | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Mission | 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="Anatomy-Mission">
|
||||
<h1 id="mission">Mission</h1>
|
||||
|
||||
<p>Mission is a branch of the Execution page's Control Tree, reached as
|
||||
<code>/execution?tree=execution/mission</code>. It holds the command list a run executes: the project's own
|
||||
command is always a list, and nested lists read as sub-trees, so the branch is the mission and the
|
||||
mission is a tree of commands.</p>
|
||||
<p>Each command type has its own editor panel. The pages below document one type each; the root panel
|
||||
documents the list itself — adding, ordering and removing what the run will play.</p>
|
||||
<p>Ordered by where a command falls in a run: the branch root and its container first, then what is
|
||||
set up before the run, what the run plays, and what happens after it.</p>
|
||||
<h2 id="pages">Pages</h2>
|
||||
<ul>
|
||||
<li><a href="mission-root-panel.html">Mission Root Panel</a> — The branch root: the command list, and how a mission is assembled</li>
|
||||
<li><a href="ListCommand-panel.html">List Command Panel</a> — The container command; a nested one becomes a sub-tree of the mission</li>
|
||||
<li><a href="PreSettingCommand-panel.html">PreSetting Command Panel</a> — What is applied to the machine state before the run reaches a program</li>
|
||||
<li><a href="NcOptOption-panel.html">NC Optimization Option Panel</a> — The optimizer's options as a command in the list, so a run can change them mid-mission</li>
|
||||
<li><a href="NcFileCommand-panel.html">NcFile Command Panel</a> — Playing a program file from disk</li>
|
||||
<li><a href="NcCodeCommand-panel.html">NcCode Command Panel</a> — Playing NC text held in the project rather than in a file</li>
|
||||
<li><a href="script-command-panel.html">Script Command Panel</a> — Driving the session from C# script rather than from NC</li>
|
||||
<li><a href="PostExecutionCommand-panel.html">PostExecution Command Panel</a> — What runs once the program above it has finished</li>
|
||||
</ul>
|
||||
<p>The pages above do not cover every command kind a mission can hold. Three more ship an editor of
|
||||
their own — Machining Motion Resolution, Record Meshed Geom and Export Meshed Geom — and the rest
|
||||
fall back to a generic field editor built from the scalars the command declares, so a kind becomes
|
||||
addable and editable before anyone writes a panel for it. The set on offer is whatever the server's
|
||||
command catalog returns, which is why this folder cannot be a closed list.</p>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="../index.html">Execution Page</a> — the run cockpit this branch belongs to</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>
|
||||
@@ -0,0 +1,357 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Mission Root Panel | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Mission Root 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 "{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="Anatomy-MissionRootPanel">
|
||||
<h1 id="mission-root-panel">Mission Root Panel</h1>
|
||||
|
||||
<p>The Mission branch root of the <a class="xref" href="../index.html">Execution page</a>'s Control Tree: route
|
||||
<code>/execution</code>, Control-Tree path <code>execution/mission</code>, panel <code>MissionRootPanel.vue</code>. <code>/mission</code>
|
||||
resolves to the same place — it redirects onto <code>/execution?tree=execution/mission</code>.</p>
|
||||
<p>The panel edits one list of commands: the mission's own command, which is always a
|
||||
<a class="xref" href="../../../api/Hi.SessionCommands.ListCommand.html">ListCommand</a>. The branch root is therefore a list editor — Add Command, the
|
||||
entries in run order, and the operations that rewrite the list. Editing a command is not this
|
||||
panel's job: clicking a row selects that command's tree node, and the command's own editor renders
|
||||
on that node's panel.</p>
|
||||
<p>Command nodes are addressed by index-derived tree ids and by dotted API paths (<code>"0"</code>, <code>"1"</code>, nested
|
||||
<code>"0.2"</code>). A command node id extends its parent's, so a root entry is <code>execution/mission/{index}</code> and
|
||||
an entry inside a nested list is <code>execution/mission/{index}/{index}</code>; a command's section children
|
||||
extend it once more, as <code>execution/mission/{index}/{id}</code> keyed on the section. Both forms shift on
|
||||
every structural change — deleting entry 2 slides the next command into path <code>"2"</code> — so each branch
|
||||
build stamps its nodes afresh and the editor panels remount onto the new paths.</p>
|
||||
<h2 id="key-models">Key Models</h2>
|
||||
<ul>
|
||||
<li><strong>Primary</strong>: <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_PlayerCommand">PlayerCommand</a> — the mission's command,
|
||||
always a <code>ListCommand</code>.</li>
|
||||
<li><strong>Supporting</strong>:
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a></li>
|
||||
<li><a class="xref" href="../../../api/Hi.SessionCommands.ListCommand.html">ListCommand</a> — the root command and every nested one.
|
||||
<a class="xref" href="../../../api/Hi.SessionCommands.ListCommand.html#Hi_SessionCommands_ListCommand_CommandEntryList">CommandEntryList</a> is the row list, and a run walks it
|
||||
top-down.</li>
|
||||
<li><a class="xref" href="../../../api/Hi.SessionCommands.EnablingWrapper.html">EnablingWrapper</a> — one entry: the command plus
|
||||
<a class="xref" href="../../../api/Hi.SessionCommands.EnablingWrapper.html#Hi_SessionCommands_EnablingWrapper_IsEnabled">IsEnabled</a>.</li>
|
||||
<li><a class="xref" href="../../../api/Hi.SessionCommands.CommandCatalogAttribute.html">CommandCatalogAttribute</a> and <a class="xref" href="../../../api/Hi.SessionCommands.CommandCategory.html">CommandCategory</a>
|
||||
— what Add Command offers, and the group it is offered under.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li>Mission Root Panel
|
||||
<ul>
|
||||
<li>Head Line
|
||||
<ul>
|
||||
<li>Add Command Button
|
||||
<ul>
|
||||
<li>Opens the Add Command dialog. Disabled while no project is open.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Commands Caption</li>
|
||||
<li>Command Count Badge
|
||||
<ul>
|
||||
<li>Outlined, and grey rather than primary while the list is empty.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Separator</li>
|
||||
<li>Empty State
|
||||
<ul>
|
||||
<li>“No project loaded” while nothing is open; otherwise “No commands yet”, naming Add Command.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>(Each) Command Row
|
||||
<ul>
|
||||
<li>Drag Handle Icon
|
||||
<ul>
|
||||
<li>The whole row is draggable; the handle is the affordance for it.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Command Label
|
||||
<ul>
|
||||
<li>The command's title as the engine composes it: the kind's localized display name, with a
|
||||
title the user typed appended as <code>Name [title]</code>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Move Up Button / Move Down Button
|
||||
<ul>
|
||||
<li>Disabled at the ends of the list.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Duplicate Button</li>
|
||||
<li>Delete Button</li>
|
||||
<li>A disabled command's row is dimmed, and its buttons stay live.</li>
|
||||
<li>Clicking the row anywhere but on a button selects that command's tree node.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Drop-Out Zone
|
||||
<ul>
|
||||
<li>Present in a nested list editor only, and shown only while a row is being dragged. It sits
|
||||
below the rows, so the rows do not shift under the pointer at drag start.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Run-Order Hint
|
||||
<ul>
|
||||
<li>Commands run top-down, and the checkbox on each command's tree item enables or disables it.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Enable/disable is not a control on this panel. It is the tree item's checkbox on the command node; a
|
||||
disabled command is skipped when the mission plays and stays fully editable.</p>
|
||||
<h2 id="add-command">Add Command</h2>
|
||||
<p>The button opens a search-first picker. The search box matches a command's display label, its kind
|
||||
key, or one of its declared aliases — each alias searchable both by its English key and by its word
|
||||
in the request language. Arrow keys walk the results and Enter takes the highlighted one. Results
|
||||
are grouped by category, in the catalog's own display order.</p>
|
||||
<p>The picked command is appended to the list this editor is scoped to, and the branch rebuilds in
|
||||
place: the selection stays on the list rather than jumping into the new command's panel.</p>
|
||||
<p>The addable set is served by the backend rather than mirrored in a frontend menu. Every engine
|
||||
command carrying <code>[CommandCatalog]</code> is reflected into the catalog, so attributing a new engine
|
||||
command is all it takes for it to appear in the dialog. Thirteen kinds ship:</p>
|
||||
<ul>
|
||||
<li><strong>Setup</strong> — Machining Resolution, Machining Motion Resolution, Collision Detection, Pause on
|
||||
Failure, Physics</li>
|
||||
<li><strong>Program</strong> — Program File, NC Code, Script</li>
|
||||
<li><strong>Optimization</strong> — NC Optimization Config</li>
|
||||
<li><strong>Output</strong> — Post-Execution, Record Meshed Geometry, Export Meshed Geometry (STL)</li>
|
||||
<li><strong>Flow</strong> — List</li>
|
||||
</ul>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>Program File plays NC, CL or CSV. The runner is picked from the file extension, and the command
|
||||
can override that choice.</p>
|
||||
</div>
|
||||
<h2 id="ordering-duplicating-and-deleting">Ordering, Duplicating and Deleting</h2>
|
||||
<p>Move Up and Move Down move an entry within its own list; they never change which list owns it.
|
||||
Duplicate deep-clones the entry through the same XML round-trip the project file uses — so a nested
|
||||
list copies with its whole subtree — and the clone lands right after the source. Delete asks for
|
||||
confirmation in a dialog naming the command.</p>
|
||||
<p>Dragging a row has three landings:</p>
|
||||
<ul>
|
||||
<li>On another row — reorder within this list. A plain row splits at its midline into before and
|
||||
after, and the whole new order is sent as one ordered path list.</li>
|
||||
<li>On the middle band of a <code>list</code> row — move the entry inside that list. That row's outer quarters
|
||||
still reorder around it.</li>
|
||||
<li>On the drop-out zone of a nested list editor — move the entry out, landing right after the list
|
||||
command itself in the owning list.</li>
|
||||
</ul>
|
||||
<p>The last two are the same reparent call. The server resolves both lists to object references before
|
||||
it mutates either, so the index shift the removal causes cannot misroute the insert, and it refuses
|
||||
to move a list into itself or into one of its own descendants.</p>
|
||||
<h2 id="nesting">Nesting</h2>
|
||||
<p>A <code>list</code> entry grows the same structure one level down: its children are its own entries, so nested
|
||||
lists read as sub-trees at any depth, and the very same panel edits them. The differences are the
|
||||
scope — the root list, versus the node's own dotted path — and the drop-out zone, which appears only
|
||||
in a nested editor. A nested list's node adds an optional title above the embedded editor, and that
|
||||
title is appended to the List name in the row and tree label.</p>
|
||||
<p>Because the mission's own command is always a list, the root and a nested list are one editor at two
|
||||
scopes. A project file whose stored command is something else loads with that command wrapped into
|
||||
the root list, so the panel always has a list to edit.</p>
|
||||
<h2 id="where-a-command-is-edited">Where a Command Is Edited</h2>
|
||||
<p>A command's editor renders on its own tree node, below the control bar carrying the operations that
|
||||
rewrite the parent list (Up, Down, Duplicate, Delete):</p>
|
||||
<ul>
|
||||
<li>Nine kinds have a bespoke editor: General Config, Machining Motion Resolution,
|
||||
<a class="xref" href="NcFileCommand-panel.html">Program File</a>, <a class="xref" href="NcCodeCommand-panel.html">NC Code</a>,
|
||||
<a class="xref" href="script-command-panel.html">Script</a>, <a class="xref" href="NcOptOption-panel.html">NC Optimization Config</a>,
|
||||
<a class="xref" href="PostExecutionCommand-panel.html">Post-Execution</a>, Record Meshed Geometry and Export Meshed
|
||||
Geometry.</li>
|
||||
<li><code>list</code> is edited inline by the control-bar panel: the optional title over the embedded
|
||||
<a class="xref" href="ListCommand-panel.html">list editor</a>.</li>
|
||||
<li>The four remaining Setup kinds — Machining Resolution, Collision Detection, Pause on Failure and
|
||||
Physics — are served by the generic field editor, which renders the command's reflected
|
||||
<code>[CommandField]</code> scalars with server-localized labels. That is what the app does instead of
|
||||
shipping one panel per kind: a catalog kind needs frontend code only when it wants a richer
|
||||
editor.</li>
|
||||
</ul>
|
||||
<p><a class="xref" href="PreSettingCommand-panel.html">General Config</a> is the one asymmetry. Its editor ships and
|
||||
reads a command, but the catalog does not offer it: a project file that stores the bundle loads as
|
||||
the individual commands it stands for, and the panel serves projects that construct one through the
|
||||
API.</p>
|
||||
<p>The multi-card kinds — General Config, NC Optimization Config and Post-Execution — put their extra
|
||||
cards on section child nodes of the command, one node per card, with the card's own enable flag
|
||||
surfaced as that section node's tree checkbox. Post-Execution's Shot Files Output and Optimization
|
||||
Output sections appear only while the physics preference is on.</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>
|
||||
<h3 id="web-application">Web Application</h3>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionRootPanel.vue</code> — this panel: Add Command, the entry
|
||||
rows and their four actions, the three drag landings, and the delete confirmation. It serves the
|
||||
Mission root and, embedded under a command's control bar, every nested <code>list</code> node.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/AddCommandDialog.vue</code> — the search-first catalog picker.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionCommandSlavePanel.vue</code> — one entry's panel: the
|
||||
move / duplicate / delete control bar over the kind's editor, or over the title input and embedded
|
||||
list editor of a <code>list</code> entry.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionSectionPanel.vue</code> — the panel of a command's
|
||||
section child, rendering that one card.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/missionItemTypes.ts</code> — the Mission wave of the Control
|
||||
Tree: the item types, the child builders that carry the recursion, the per-kind editor map, the
|
||||
section definitions and their enable flags, and the kind and category icons.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/useControlTreeHost.ts</code> — builds the Execution root with
|
||||
the Mission branch node above the Program branch, and drives the command and section checkboxes.</li>
|
||||
<li><code>wwwroot-src/src/api/mission.ts</code> — typed wrapper over <code>/api/Mission/*</code>: <code>listCommandEntries</code>,
|
||||
<code>addEntry</code>, <code>removeEntry</code>, <code>moveEntry</code>, <code>duplicateEntry</code>, <code>reparentEntry</code>, <code>reorderEntries</code>,
|
||||
<code>setListTitle</code>, <code>getCommandCatalog</code>, <code>loadCommandFields</code> / <code>setCommandField</code>, and the per-kind
|
||||
readers and writers.</li>
|
||||
<li><code>wwwroot-src/src/components/mission/GenericCommandPanel.vue</code> — the fallback editor for a catalog
|
||||
kind with no bespoke panel: the command's reflected <code>[CommandField]</code> scalars.</li>
|
||||
<li>The bespoke editors:
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/mission/PreSettingCommandPanel.vue</code></li>
|
||||
<li><code>wwwroot-src/src/components/mission/MachiningMotionResolutionCommandPanel.vue</code></li>
|
||||
<li><code>wwwroot-src/src/components/mission/NcFileCommandPanel.vue</code></li>
|
||||
<li><code>wwwroot-src/src/components/mission/NcCodeCommandPanel.vue</code></li>
|
||||
<li><code>wwwroot-src/src/components/mission/ScriptCommandPanel.vue</code></li>
|
||||
<li><code>wwwroot-src/src/components/mission/NcOptOptionCommandPanel.vue</code></li>
|
||||
<li><code>wwwroot-src/src/components/mission/PostExecutionCommandPanel.vue</code></li>
|
||||
<li><code>wwwroot-src/src/components/mission/RecordMeshedGeomCommandPanel.vue</code></li>
|
||||
<li><code>wwwroot-src/src/components/mission/ExportMeshedGeomCommandPanel.vue</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/tree.ts</code> — the <code>tree.mission.*</code> strings this panel renders: Add Command,
|
||||
the Commands caption, the no-commands-yet state, the drop-out zone, the run-order hint, the kind
|
||||
display names, the section names and the operation labels.</li>
|
||||
<li><code>wwwroot-src/src/router/routes.ts</code> — resolves <code>/mission</code> onto <code>/execution?tree=execution/mission</code>.</li>
|
||||
<li><code>Missions/MissionController.cs</code> — the entry lifecycle (<code>GET list-command/entries</code>,
|
||||
<code>POST list-command/entries</code> and <code>POST list-command/entries/{path}</code> to add at the root or inside a
|
||||
nested list, <code>DELETE list-command/entries/{path}</code>, <code>POST list-command/entries/{path}/move</code>,
|
||||
<code>PUT list-command/reorder</code>, <code>POST list-command/entries/{path}/duplicate</code> and
|
||||
<code>POST list-command/entries/{path}/reparent</code>), the <code>GET command-catalog</code> the Add Command dialog
|
||||
reads, and the per-command endpoints including the generic <code>commands/{path}/fields[/{key}]</code> pair.
|
||||
<code>reparent</code> is what backs both drag-into-a-list and drop-out-to-the-parent, and it is the endpoint
|
||||
that rejects moving a list into itself or its own descendants.</li>
|
||||
<li><code>Missions/MissionCommandCatalog.cs</code> — reflects every <code>[CommandCatalog]</code> command into the addable
|
||||
set served to Add Command, and creates the picked kind.</li>
|
||||
<li><code>Missions/MissionCommandFields.cs</code> — the reflection layer behind the generic field endpoints: it
|
||||
describes and updates a command's <code>[CommandField]</code> scalars.</li>
|
||||
<li><code>Missions/NcOptOptionEndpoints.cs</code> — the NC Optimization Config per-property PUT endpoints.</li>
|
||||
</ul>
|
||||
<h3 id="hiapi-engine">HiAPI Engine</h3>
|
||||
<ul>
|
||||
<li><code>HiNc/SessionCommands/CommandCatalogAttribute.cs</code> — <code>CommandCategory</code> and the <code>[CommandCatalog]</code>
|
||||
attribute (category, order, kind key, aliases), plus the class-name-minus-<code>Command</code> derivation of
|
||||
the kind key. This is what makes the addable set backend-owned.</li>
|
||||
<li><code>HiNc/SessionCommands/ListCommand.cs</code> — the container command: the entry list a run walks
|
||||
top-down, skipping disabled entries.</li>
|
||||
<li><code>HiNc/MachiningProcs/MachiningProject.cs</code> — declares the mission's command as a list and keeps it
|
||||
one when a project is read.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="../program.html">Program Branch</a> — the read-only inspection twin of this list: what a
|
||||
run actually read, one node per NC source file</li>
|
||||
<li><a class="xref" href="ListCommand-panel.html">List Command Panel</a> — the same editor one level down, and what moving an entry in or out of a nested list costs</li>
|
||||
<li><a href="../../../manual/run/building-a-mission.html">Building a Mission</a> — the task this panel serves, as a procedure</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>
|
||||
@@ -0,0 +1,274 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Script Command Panel | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Script Command 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 "{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="Anatomy-ScriptCommandPanel">
|
||||
<h1 id="script-command-panel">Script Command Panel</h1>
|
||||
|
||||
<p>The key model is <a class="xref" href="../../../api/Hi.SessionCommands.ScriptCommand.html">ScriptCommand</a>.</p>
|
||||
<p>The command holds two values: <a class="xref" href="../../../api/Hi.SessionCommands.ScriptCommand.html#Hi_SessionCommands_ScriptCommand_ScriptText">ScriptText</a>, a C# script, and
|
||||
<a class="xref" href="../../../api/Hi.SessionCommands.ScriptCommand.html#Hi_SessionCommands_ScriptCommand_ScriptTitle">ScriptTitle</a>, the name it runs under. Both are written into
|
||||
the project file, so the script travels with the project. <code>Run</code> evaluates the text against the
|
||||
session shell as the globals object, and when the script returns a sequence of actions that sequence
|
||||
is yielded into the run.</p>
|
||||
<p>The title is what the mission row and the tree node show: the label is composed as <code>Script [title]</code>,
|
||||
falling back to a bare <code>Script</code> while the title is empty. A newly added command starts empty on both
|
||||
clients — no title, no text.</p>
|
||||
<p>The panel renders on the command's own node in the Mission branch of the Execution page's Control
|
||||
Tree, below the move / duplicate / delete control bar. A single-purpose kind like this one embeds its
|
||||
whole editor on that node rather than growing section child nodes. Its tree checkbox only decides
|
||||
whether the run plays the command; a disabled script is skipped during play and its editor stays
|
||||
fully usable.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li>Head Line
|
||||
<ul>
|
||||
<li>Script Title Text Field
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.ScriptCommand.html#Hi_SessionCommands_ScriptCommand_ScriptTitle">ScriptTitle</a>.</li>
|
||||
<li>Labelled “Title (optional)” on the web, “Script Title” on WPF.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Autosave Indicator (web)
|
||||
<ul>
|
||||
<li>Shares the title row. See <a href="#saving">Saving</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Script Editor Area
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../api/Hi.SessionCommands.ScriptCommand.html#Hi_SessionCommands_ScriptCommand_ScriptText">ScriptText</a>.</li>
|
||||
<li>Fills the rest of the panel.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="the-editor">The Editor</h2>
|
||||
<p>The web editor is CodeMirror 6 running the <code>mission-script</code> mode: a stream tokenizer written for
|
||||
the dialect a mission script actually is — top-level statements, not a compilation unit. It colours
|
||||
keywords and boolean literals, strings (plain, verbatim <code>@""</code>, interpolated <code>$""</code> and <code>$@""</code>),
|
||||
character literals, hex and floating-point numbers, line and block comments, and it tags a call site
|
||||
apart from a plain identifier. Because it is linear rather than a parser, every identifier of the
|
||||
same kind gets the same colour no matter where it sits in the file.</p>
|
||||
<p>The C# Lezer grammar the client also ships is not what this editor runs: its <code>compilationUnit</code> rule
|
||||
rejects top-level statements, so it would recover from an error on line 1 and tag identical names
|
||||
inconsistently. That grammar serves the separate <code>csharp</code> mode a <code>.cs</code> file opens in elsewhere in
|
||||
the app.</p>
|
||||
<p>Nothing in the highlighting is semantic. Everything the editor knows about types and members comes
|
||||
from the backend, through completion.</p>
|
||||
<h2 id="completion">Completion</h2>
|
||||
<p>Typing an identifier — or asking explicitly — sends the whole script text plus the zero-based cursor
|
||||
offset to <code>POST /api/script/completions</code>, and the response is an <code>items</code> array. Each item carries a
|
||||
label, a kind already normalised to CodeMirror's own completion type names, a <code>detail</code> (the
|
||||
signature, shown dim beside the label), a <code>documentation</code> (the XML <code><summary></code>, rendered to plain
|
||||
text by Roslyn and shown in the popup's info pane) and an <code>insertText</code>.</p>
|
||||
<p>Completion is Roslyn in-process, over the very <code>ScriptOptions</code> — the same references and imports —
|
||||
that the run compiles the script with, so the session shell's members and the runtime API surface
|
||||
complete for real rather than by name matching. The service prepends the synthesised
|
||||
<code>using</code> / <code>using static</code> prefix those imports need and offsets the cursor by its length, so what the
|
||||
list offers is what the evaluator will see. A cancelled request is answered 499, and a result that
|
||||
arrives after the editor has moved on is dropped rather than shown.</p>
|
||||
<p>Picking a method inserts the server-formatted call with each argument as a Tab stop, so the cursor
|
||||
lands on the first parameter and Tab walks the rest; a method with no parameters inserts as <code>()</code>.
|
||||
Properties, fields, types and keywords insert as their plain text — a snippet there would be noise.</p>
|
||||
<h2 id="saving">Saving</h2>
|
||||
<p>There is no Save button. Every keystroke in either field updates the model and schedules one save
|
||||
500 ms after the last edit, and the pill beside the title reports the state: Idle, Dirty, Staging…,
|
||||
Staged, or Error with the message in its tooltip. Staged means the server runtime holds the value —
|
||||
its tooltip says so, because a staged script is not yet a committed project.</p>
|
||||
<p>The write is a single PUT carrying the script text, the title and the content hash the last load or
|
||||
save handed back. Each field is applied only when the body carries it. The response returns the new
|
||||
hash to chain into the next save.</p>
|
||||
<p>Two prompts guard the edges, each with three buttons because neither is a yes/no question:</p>
|
||||
<ul>
|
||||
<li><strong>Unsaved Changes</strong>, raised when the Control Tree tries to move the selection off a command whose
|
||||
save is still pending: Save & switch flushes and then allows the switch, Discard drops the pending
|
||||
write, Cancel keeps the selection where it is.</li>
|
||||
<li><strong>Script changed elsewhere</strong>, raised when the server rejects the save because the hash no longer
|
||||
matches — another tab, or a project reload, changed the command underneath. The rejection carries
|
||||
the server's current text, title and hash, so the panel can offer Discard & reload, Force
|
||||
overwrite, or Cancel without a second round trip.</li>
|
||||
</ul>
|
||||
<p>The panel snapshots its command path at mount, and the autosave closes over that snapshot rather
|
||||
than over the live selection, so a flush can never land on whichever command happens to be selected
|
||||
when it fires. After each successful save the tree relabels the node in place instead of rebuilding
|
||||
the branch, which would remount the editor mid-edit.</p>
|
||||
<h2 id="the-compile-gate">The Compile Gate</h2>
|
||||
<p>A script that does not compile does nothing at run time: the command reports the compile failure
|
||||
into the run's message stream and yields no work, so the run continues without it. Starting a run
|
||||
therefore compile-checks every enabled script first — with the same script options and globals type
|
||||
the evaluator uses — and refuses to start when any of them has an error, naming the first offender's
|
||||
title, path, diagnostic id, message and line. The SPA's Start sends nothing to bypass that check, so
|
||||
the refusal is what a user sees. The same check is also an endpoint of its own, per command and for
|
||||
the whole mission.</p>
|
||||
<h2 id="the-two-clients">The Two Clients</h2>
|
||||
<p>The desktop client edits the same command in AvalonEdit: a bold Script Title label with its text
|
||||
box, a Script Text label, and the editor with C# syntax highlighting and a line-number gutter,
|
||||
bound to the command through an attached behaviour. There is no completion popup and no autosave —
|
||||
the binding writes straight into the command as the text changes.</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>
|
||||
<h3 id="web-application">Web Application</h3>
|
||||
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/mission/ScriptCommandPanel.vue</code> — this panel: the title row sharing
|
||||
its line with the autosave indicator, the editor below it, the 500 ms autosave, the two
|
||||
three-button prompts, the path snapshot taken at mount, and the change notice that relabels the
|
||||
tree node.</li>
|
||||
<li><code>wwwroot-src/src/components/widgets/TextEditor.vue</code> — the CodeMirror 6 wrapper: language and
|
||||
read-only swapped through compartments, CRLF normalised on the way in so an unedited file cannot
|
||||
dirty the autosave, an opt-in completion source that overrides the language's own, and a widened
|
||||
monospace popup so full signatures fit before the dim detail column truncates.</li>
|
||||
<li><code>wwwroot-src/src/components/widgets/missionScriptLanguage.ts</code> — the <code>mission-script</code> mode: the
|
||||
keyword set, the string and character rules, numbers, comments, call-site tagging, and its own
|
||||
highlight style.</li>
|
||||
<li><code>wwwroot-src/src/components/mission/csharpCompletionSource.ts</code> — the completion source: fires on
|
||||
an identifier prefix or an explicit request, sends the whole document with the cursor offset,
|
||||
drops stale results, and applies every candidate as a snippet.</li>
|
||||
<li><code>wwwroot-src/src/api/scriptCompletion.ts</code> — the typed wrapper over the completion endpoint and the
|
||||
kind union that maps straight onto CodeMirror's completion types.</li>
|
||||
<li><code>wwwroot-src/src/api/mission.ts</code> — the script command shape (text, title, content hash), its
|
||||
loader, the save that carries the expected hash, and the conflict error that carries the server's
|
||||
current copy.</li>
|
||||
<li><code>wwwroot-src/src/composables/useAutoSave.ts</code> — the debounce, the state machine and the conflict
|
||||
recovery behind the panel's saving, saved and error states.</li>
|
||||
<li><code>wwwroot-src/src/components/widgets/AutoSaveIndicator.vue</code> — the status pill beside the title.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/useControlTreeHost.ts</code> — funnels every selection change
|
||||
through the active panel's switch gate, which is how the Unsaved Changes prompt gets its say.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/missionItemTypes.ts</code> — maps the <code>script</code> kind to this
|
||||
panel and gives it no section children, so the whole editor lives on the command node.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/mission.ts</code> — the panel's wording: both prompts, their buttons, and the
|
||||
load and save error contexts.</li>
|
||||
<li><code>Missions/ScriptCompletionController.cs</code> — <code>POST /api/script/completions</code>: a thin wrapper that
|
||||
returns the items, 499 on cancellation and 500 with the message on failure.</li>
|
||||
<li><code>Missions/ScriptCompletionService.cs</code> — the singleton holding one workspace, built from the same
|
||||
script options the session evaluates with, and the snippet insert text it builds for methods.</li>
|
||||
<li><code>Missions/ScriptCompileCheckService.cs</code> — compiles a script without running it, and walks the
|
||||
mission for every enabled one; it backs the two compile-check endpoints and the pre-start gate.</li>
|
||||
<li><code>Missions/MissionController.cs</code> — the single script PUT with its hash-based concurrency, the
|
||||
content hash stamped into the command snapshot, and the two compile-check endpoints.</li>
|
||||
<li><code>Execution/ExecutionController.cs</code> — the start gate that compile-checks the enabled scripts and
|
||||
refuses to run while one of them has an error.</li>
|
||||
</ul>
|
||||
<h3 id="hiapi-engine">HiAPI Engine</h3>
|
||||
<ul>
|
||||
<li><code>HiNc/SessionCommands/ScriptCommand.cs</code> — the model: the title and text, the Program-category
|
||||
catalog registration, the XML round-trip that puts the script into the project file, the
|
||||
evaluation against the session shell with a compile failure reported into the run's message
|
||||
stream, the returned actions yielded into the run, and the label rule that brackets the title
|
||||
after the command name.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="NcCodeCommand-panel.html">NcCodeCommand Panel</a> — the other command that stores its text in the project, and the one that ships no editor chrome</li>
|
||||
<li><a href="../../../manual/run/the-other-commands.html">The Other Commands</a> — the task this command serves, beside the settings and output kinds</li>
|
||||
<li><a href="index.html">Mission</a> — the rest of the command panels</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>
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
<div id="sidetoggle">
|
||||
<div>
|
||||
<div class="sidefilter">
|
||||
<form class="toc-filter">
|
||||
<span class="glyphicon glyphicon-filter filter-icon"></span>
|
||||
<span class="glyphicon glyphicon-remove clear-icon" id="toc_filter_clear"></span>
|
||||
<input type="text" id="toc_filter_input" placeholder="Filter by title" onkeypress="if(event.keyCode==13) {return false;}">
|
||||
</form>
|
||||
</div>
|
||||
<div class="sidetoc">
|
||||
<div class="toc" id="toc">
|
||||
|
||||
<ul class="nav level1">
|
||||
<li>
|
||||
<a href="index.html" name="" title="Overview">Overview</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="mission-root-panel.html" name="" title="Mission Root Panel">Mission Root Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ListCommand-panel.html" name="" title="List Command Panel">List Command Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="PreSettingCommand-panel.html" name="" title="PreSetting Command Panel">PreSetting Command Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="NcOptOption-panel.html" name="" title="NcOptOption Panel">NcOptOption Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="NcFileCommand-panel.html" name="" title="NcFile Command Panel">NcFile Command Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="NcCodeCommand-panel.html" name="" title="NcCode Command Panel">NcCode Command Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="script-command-panel.html" name="" title="Script Command Panel">Script Command Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="PostExecutionCommand-panel.html" name="" title="PostExecution Command Panel">PostExecution Command Panel</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
{"items":[{"name":"Overview","href":"index.html","topicHref":"index.html"},{"name":"Mission Root Panel","href":"mission-root-panel.html","topicHref":"mission-root-panel.html"},{"name":"List Command Panel","href":"ListCommand-panel.html","topicHref":"ListCommand-panel.html"},{"name":"PreSetting Command Panel","href":"PreSettingCommand-panel.html","topicHref":"PreSettingCommand-panel.html"},{"name":"NcOptOption Panel","href":"NcOptOption-panel.html","topicHref":"NcOptOption-panel.html"},{"name":"NcFile Command Panel","href":"NcFileCommand-panel.html","topicHref":"NcFileCommand-panel.html"},{"name":"NcCode Command Panel","href":"NcCodeCommand-panel.html","topicHref":"NcCodeCommand-panel.html"},{"name":"Script Command Panel","href":"script-command-panel.html","topicHref":"script-command-panel.html"},{"name":"PostExecution Command Panel","href":"PostExecutionCommand-panel.html","topicHref":"PostExecutionCommand-panel.html"}]}
|
||||
@@ -0,0 +1,396 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Program Branch | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Program Branch | 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="Anatomy-ProgramBranch">
|
||||
<h1 id="program-branch">Program Branch</h1>
|
||||
|
||||
<p>Program is the lower of the two Control-Tree branches the Execution page hosts: route <code>/execution</code>,
|
||||
Control-Tree path <code>execution/program</code>, one node per NC source file the session read. It is a
|
||||
read-only view of a run — the file's text, the passes that went over it, the per-line marks the run
|
||||
left behind, and the writeback files the run wrote — assembled from session data rather than from
|
||||
anything typed into it. Its node ids are positional, so an id addresses a node without surviving the
|
||||
branch growing around it.</p>
|
||||
<h2 id="program-against-mission">Program Against Mission</h2>
|
||||
<p>Mission is what a run executes; Program is what the run read. That one difference sets the rest of
|
||||
the branch:</p>
|
||||
<ul>
|
||||
<li>Mission's nodes edit the project. Program's item types declare a panel and a child builder and
|
||||
nothing else — no enable checkbox (the tree hides the tick on every node that is not a Mission
|
||||
command or an enable-bearing Mission section), no control bar, no add, delete, move or duplicate.</li>
|
||||
<li>Mission's shape is authored. Program's shape is a consequence: a subprogram file appears on it
|
||||
only because a run followed a call into it.</li>
|
||||
<li>Mission belongs to the project. Program's contents belong to the session — the index behind it is
|
||||
fed piece by piece as the run executes, and it is dropped when the session ends or the project
|
||||
changes.</li>
|
||||
</ul>
|
||||
<p>Before anything runs the branch is not empty. The server seeds it by walking the mission root-first
|
||||
through its nested lists — skipping a disabled entry along with everything beneath it — and taking
|
||||
the NC file of every <strong>Program File</strong> command and the title of every <strong>NC Code</strong> command. It seeds
|
||||
one placeholder per <em>distinct string</em>, not one per command: both loops append only where no root
|
||||
already carries that string under the same case-insensitive, slash-normalised comparison the sibling
|
||||
merge uses, and they share one namespace, so a Program File path and an NC Code title that normalise
|
||||
alike collapse into one node. A Program File command whose path is still unset is skipped and seeds
|
||||
nothing. A placeholder carries no invocations, so its panel shows the file's text with no marks and
|
||||
an empty, disabled pass selector.</p>
|
||||
<p>The transport bar is the one control the branch does carry, and it is not the branch's own: the
|
||||
primary editor pane pins the <a href="execution-tool-bar.html">Execution Tool Bar</a> above the panel of the
|
||||
Execution root and of every node beneath it, so a run can be started, stepped and reset while a
|
||||
program file is on screen.</p>
|
||||
<h2 id="the-nodes-the-branch-mints">The Nodes the Branch Mints</h2>
|
||||
<p>Three item types, each keyed by position rather than by identity.</p>
|
||||
<p><strong>The branch root</strong> (<code>execution/program</code>) carries the summary panel and the child builder that
|
||||
fetches everything.</p>
|
||||
<p><strong>A file node</strong> is one source file as reached through one call edge. The server groups executed
|
||||
sentences by the file index stamped on them, resolves each invocation's caller from the call-stack
|
||||
record on the executed piece, and nests the callee's node under the caller's; the same subprogram
|
||||
called from two different files therefore appears once under each. Sibling nodes merge on a
|
||||
case-insensitive, slash-normalised path comparison, so repeated passes over one file under one
|
||||
caller collapse into a single node holding several invocations. Placeholders are appended after the
|
||||
nodes a run produced, and one whose path a run node already holds is skipped rather than doubled —
|
||||
that skip is also what keeps an inline command to one node, because the run stamps the command's
|
||||
title as the path of every piece it plays, so the placeholder and the run node carry the same
|
||||
string. A later pass flags every root whose path matches an enabled NC Code command's title as
|
||||
inline; that flag drives three presentational choices — the label prefix, the panel's inline caption
|
||||
and which missing-text wording it shows — and one behavioural one: the root's child builder matches
|
||||
a node against the writeback conversions only when the node is not inline, so an inline root is
|
||||
never stamped with a conversion, never gains the forward links to a converted file, and cannot be
|
||||
the target a conversion's <em>converted from</em> header jumps back to. The tree label is the path's base
|
||||
name, prefixed <code>(inline)</code> for an inline node and suffixed with a multiplication sign and a count
|
||||
when the node holds more than one invocation.</p>
|
||||
<p><strong>A conversion node</strong> is one NC writeback conversion held by the session, labelled with an arrow and
|
||||
the written file's base name. Conversion nodes are appended after all file nodes.</p>
|
||||
<p>A file node's id is its parent's id plus its index among that parent's children
|
||||
(<code>execution/program/0</code>, <code>execution/program/0/1</code>); a conversion node's is the branch root's id plus
|
||||
<code>dst-</code> and the conversion's position in the session's list. Both are positional, and the tree those
|
||||
indices count into grows as a run discovers files, so a <code>?tree=</code> link into this branch names a
|
||||
position and not a file.</p>
|
||||
<p>The whole branch costs two requests. The root's child builder takes the file tree in one response
|
||||
and the conversion list in another, stashes each file's raw subtree on the node it mints, and the
|
||||
file nodes' builder only maps what is already there — no node fetches for itself. A failed
|
||||
file-tree request yields an empty branch rather than an error; a failed conversion request leaves
|
||||
the file tree standing without cross-links.</p>
|
||||
<h2 id="invocations">Invocations</h2>
|
||||
<p>An invocation is one pass over one file, keyed on the file index the run stamps onto every executed
|
||||
sentence. A fresh index is allocated for each top-level play of a file and for every subprogram
|
||||
call, call repetition and loop or jump re-segmentation, so a file entered or looped over more than
|
||||
once contributes one invocation per pass, and the file panel's pass selector is exactly a pick among
|
||||
them. Each entry reads as a hash-prefixed ordinal and a trigger, and the trigger is derived from the
|
||||
piece that opened the pass:</p>
|
||||
<ul>
|
||||
<li>the call term with its P word — <code>M98 P8</code>, <code>M198 P8</code> — when the piece carries a Fanuc
|
||||
subprogram-call record. Only that record is read, so a pass opened by a Siemens or Heidenhain
|
||||
call, or by a Fanuc macro call, falls through to the two cases below;</li>
|
||||
<li><code>re-entry</code> when this session has already seen a pass over the same path;</li>
|
||||
<li><code>top</code> otherwise.</li>
|
||||
</ul>
|
||||
<p>The selector opens on the last invocation in the node's list — the pass that started most recently —
|
||||
and re-defaults whenever a rebuild leaves the current selection absent from the list. It is disabled
|
||||
while the node has none, and it takes typed text as a filter over the entries. Everything below it
|
||||
belongs to the selected pass alone: switching passes drops the mark and link caches and refetches
|
||||
both for every page of text already loaded, not only for the pages on screen. The footer counts the
|
||||
file's lines and, for the selected pass, the number of distinct source lines that executed in it.</p>
|
||||
<h2 id="what-a-run-marks">What a Run Marks</h2>
|
||||
<p>The line viewer is virtualized. Text arrives in 1000-line pages covering the visible window plus two
|
||||
pages either side; the server caps one request at 2000 lines and keeps a small most-recently-used
|
||||
cache of whole files keyed on path and last-write time, so paging through a long program does not
|
||||
re-read it once per page. A path with no file on disk is answered as non-existent, the miss is
|
||||
cached so scrolling does not re-fire it, and the panel captions the file as missing — or, for an
|
||||
inline node, as inline text that is no longer available, because an NC Code command's text is served
|
||||
from the mission command itself and goes when the command is removed or retitled. A disk file wins
|
||||
over a command title that shadows it.</p>
|
||||
<p>Marks are fetched the same way and per selected pass. A line the pass executed carries the sentence
|
||||
index it ran and the range of machining steps that sentence produced; a line absent from the answer
|
||||
did not execute in that pass and is greyed — but only once the node holds at least one invocation,
|
||||
so a placeholder's text renders plain rather than uniformly grey. A line whose sentence produced
|
||||
steps carries a step badge, single-valued or a range.</p>
|
||||
<p>Marks grow as a run advances, so a page cached early would keep later lines looking unexecuted. The
|
||||
panel drops its mark cache and re-fetches the visible window on every throttled CL-strip update
|
||||
broadcast.</p>
|
||||
<p>Clicking a line points the shared sentence cursor at that source position, which is what fills the
|
||||
Step Info column's <strong>Sentence Syntax</strong> panel; when the line's sentence produced steps, the click
|
||||
also selects that sentence's first step, moving the charts and the 3D strip with it. A line with no
|
||||
steps — a <code>G54</code>, a comment, a line that never ran — moves the cursor alone. Hovering a line sends
|
||||
the same anchor as the entered step on a 50 ms leading-edge throttle, and leaving the viewer clears
|
||||
it.</p>
|
||||
<p>The traffic runs the other way too. A step picked on a chart or the 3D strip resolves to a source
|
||||
anchor and lands on the cursor; a file panel whose path matches switches to the pass that step
|
||||
belongs to and scrolls the line into view. The <strong>Follow</strong> toggle beside the pass selector is the
|
||||
live variant: while it is on, the panel scrolls to whatever line the execution-status hub's cursor
|
||||
reports for this file. It is off by default, it belongs to the mounted panel rather than to stored
|
||||
preferences, and it does not change the selected pass.</p>
|
||||
<h2 id="writeback-conversions">Writeback Conversions</h2>
|
||||
<p>The session retains the destination piece streams and source-to-destination maps of its latest
|
||||
CL-to-NC writeback run — <a class="xref" href="../../api/Hi.MachiningProcs.MachiningSession.html#Hi_MachiningProcs_MachiningSession_NcConversions">NcConversions</a><small>(API)</small>,
|
||||
refilled by <a class="xref" href="../../api/Hi.MachiningProcs.MachiningSession.html#Hi_MachiningProcs_MachiningSession_ConvertClToNcFiles_">ConvertClToNcFiles</a><small>(API)</small>. This
|
||||
branch only displays them; the writeback itself is switched on by the mission's <strong>Post-Execution</strong>
|
||||
command, in its <strong>CL → NC Writeback</strong> section. Because the conversions live on the session, they go
|
||||
when it does.</p>
|
||||
<p>A conversion node shows the written file's lines, each line whose piece has a registered source
|
||||
carrying a back-arrow badge naming that source line. The panel's header names this conversion's
|
||||
source file; the link on that name lands on the file's node when a root file node matched the
|
||||
conversion's source path, and otherwise falls back to the first entry of the branch's file-index
|
||||
map, so a conversion whose source was reached only as a nested or inline node can name one file and
|
||||
open another. Clicking a badge selects the source node, switches it to the invocation the piece came
|
||||
from, and scrolls to the line; clicking anywhere else on a row only highlights it.
|
||||
The viewer has no missing-file caption of its own, so a written file no longer on disk renders as an
|
||||
empty viewer.</p>
|
||||
<p>The reverse direction is carried by the file panel. A root file node whose path matches a
|
||||
conversion's source path gets forward-arrow badges naming the destination line, with a count when
|
||||
one source line produced several destination lines, and clicking one selects the conversion node and
|
||||
scrolls to the first of them. That matching is done on root nodes only, and never on an inline node,
|
||||
so a subprogram file reached through a call carries no forward badges of its own even though a
|
||||
backward jump can land on it and switch its pass.</p>
|
||||
<p>The jump itself rides one shared slot, because only one editor panel is mounted at a time: the
|
||||
requesting panel parks the target line and emits a selection, and the twin takes the parked jump
|
||||
when it mounts — or through a watcher, when it was already the selected panel. A target consumed
|
||||
before the first page of text resolves is parked again and re-applied once the line array is sized.</p>
|
||||
<h2 id="when-the-branch-is-rebuilt">When the Branch Is Rebuilt</h2>
|
||||
<ul>
|
||||
<li><strong>Page initialization.</strong> Building the Execution root builds the branch, and only when a project is
|
||||
loaded; without one it stays empty.</li>
|
||||
<li><strong>Any change in the broadcast execution status.</strong> The status the hub reports is one of
|
||||
<code>NoProject</code>, <code>Ready</code>, <code>Running</code>, <code>Paused</code> and <code>Finished</code>, and the host re-reads the branch
|
||||
whenever that value changes. It deliberately does not take the structural-change path used
|
||||
elsewhere in the tree, because that path force-expands the node it rebuilds and a run would then
|
||||
keep re-opening a branch the reader had closed. The panels pick up <strong>part</strong> of the change from
|
||||
the replaced nodes: the path caption, the pass selector, the inline wording and the executed-line
|
||||
count are all derived from the node, but the file text is not — it is fetched once per page on
|
||||
mount and on scroll, with no watcher on the path, and the panel is not remounted because its key
|
||||
is built from the node id, which is positional and therefore unchanged. A rebuild that puts a
|
||||
different file at the same index leaves the previous file's text on screen under the new node's
|
||||
caption and marks.</li>
|
||||
<li><strong>The refresh button on the root panel.</strong> This one does take the structural-change path: it
|
||||
re-reads the file tree from the current session and expands the branch.</li>
|
||||
</ul>
|
||||
<p>A reset is the emptying event: it ends the session and clears the index, so the next read of the
|
||||
branch returns the mission's placeholders and nothing else.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li>Program Node
|
||||
<ul>
|
||||
<li>Intro Caption</li>
|
||||
<li>Status Row
|
||||
<ul>
|
||||
<li>Run-State Badge — reads <code>run data</code> when any of the branch root's direct file children holds at
|
||||
least one invocation and <code>not run yet</code> otherwise; like the count beside it, it looks one level
|
||||
deep and never at nested subprogram nodes. It is computed from the nodes, not from the
|
||||
file-tree response's own run-data flag.</li>
|
||||
<li>File Count Caption — the branch root's direct file children only; nested subprogram nodes are
|
||||
not counted.</li>
|
||||
<li>Converted File Count Caption — shown only when the session holds conversions.</li>
|
||||
<li>Refresh Button</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Not-Run Hint — shown while the badge reads <code>not run yet</code>.</li>
|
||||
<li>Conversions Hint — shown only when the session holds conversions.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Program File Node
|
||||
<ul>
|
||||
<li>Path Caption — the path as the run stamped it; an inline node appends an inline-NC-code tag.</li>
|
||||
<li>Pass Select</li>
|
||||
<li>Follow Toggle</li>
|
||||
<li>Not-Run Hint — shown while the node has no invocations.</li>
|
||||
<li>Missing-Source Caption — the disk-file wording or the inline-text wording.</li>
|
||||
<li>Line Viewer
|
||||
<ul>
|
||||
<li>Line Number</li>
|
||||
<li>Line Text</li>
|
||||
<li>Step Badge</li>
|
||||
<li>Converted-Line Badge</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Count Footer — line count, plus the selected pass's executed-line count.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Converted File Node
|
||||
<ul>
|
||||
<li>Path Caption</li>
|
||||
<li>Converted-From Line — the source file's name, linked to its node when a root file node matched.</li>
|
||||
<li>Line Viewer
|
||||
<ul>
|
||||
<li>Line Number</li>
|
||||
<li>Line Text</li>
|
||||
<li>Source-Line Badge</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Count Footer — line count and converted-piece count.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<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>
|
||||
<h3 id="web-application">Web Application</h3>
|
||||
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/controlTree/programItemTypes.ts</code> — the branch's three item types, the
|
||||
node ids, the labels, the conversion stamping, and the two-request child builder.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/ProgramRootPanel.vue</code> — the branch root: intro, run-state
|
||||
badge, file and conversion counts, hints and the refresh button.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/ProgramFilePanel.vue</code> — one source file: the pass
|
||||
selector, the Follow toggle, the paged line viewer, the execution marks, the step and
|
||||
converted-line badges, and the cursor and hover wiring.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/ProgramConversionFilePanel.vue</code> — one written file: the
|
||||
paged line viewer and the source-line links back into the file panel.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/useControlTreeHost.ts</code> — declares the branch root under
|
||||
the Execution root, re-reads it on every execution-status change without expanding it, and hides
|
||||
the tick on every node that is not a Mission command or an enable-bearing Mission section.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/itemTypes.ts</code> — the node shape carrying the program
|
||||
bookkeeping, the merged item-type registry, and the eager subtree builder.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/ControlTreePanel.vue</code> — the tree pane that renders the
|
||||
branch's nodes and binds the tree's strict tick strategy.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/PrimarySlavePanel.vue</code> — mounts the selected node's panel,
|
||||
forwards its selection request to the host, and pins the transport bar above every Execution-scope
|
||||
node.</li>
|
||||
<li><code>wwwroot-src/src/api/ncProgram.ts</code> — the typed client for the file tree, the paged lines, the line
|
||||
marks, the syntax piece, the sentence-to-step mapping and both directions of conversion links.</li>
|
||||
<li><code>wwwroot-src/src/api/clStrip.ts</code> — the step-select and step-enter posts a line click and a line
|
||||
hover make.</li>
|
||||
<li><code>wwwroot-src/src/composables/useConversionJump.ts</code> — the single parked-jump slot the two viewers
|
||||
hand a target through.</li>
|
||||
<li><code>wwwroot-src/src/composables/useSentenceCursor.ts</code> — the shared source position, written by a line
|
||||
click and by the resolved step selection.</li>
|
||||
<li><code>wwwroot-src/src/composables/useClStripHub.ts</code> — the throttled run-advance counter that
|
||||
invalidates the visible marks.</li>
|
||||
<li><code>wwwroot-src/src/composables/useExecutionStatusHub.ts</code> — the status the branch rebuild watches and
|
||||
the running cursor the Follow toggle scrolls to.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/SyntaxPiecePanel.vue</code> — the Step Info column's Sentence
|
||||
Syntax panel, the other reader of the shared cursor.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/tree.ts</code> — the branch's labels, hints, badges and pluralised counts.</li>
|
||||
<li><code>Execution/NcProgramController.cs</code> — the read-only endpoints: the file tree, the paged file lines
|
||||
with their inline-command fallback and whole-file cache, the line marks, the syntax piece, the
|
||||
sentence and step lookups, the conversion list and both directions of conversion links.</li>
|
||||
<li><code>Execution/NcProgramRegistryService.cs</code> — the session-scoped index: the event feed, the invocation
|
||||
records with their trigger and caller resolution, the file-tree snapshot with its mission
|
||||
placeholders, the per-line marks, and the clear on reset or project change.</li>
|
||||
</ul>
|
||||
<h3 id="hiapi-engine">HiAPI Engine</h3>
|
||||
<ul>
|
||||
<li><code>HiNc/MachiningProcs/LocalProjectService.cs</code> — the app-lifetime bridge that forwards each executed
|
||||
piece and each built machining step, and the reset that ends the session.</li>
|
||||
<li><code>HiMech/MachiningProcs/MachiningSession.cs</code> — the retained conversions and the CL-to-NC writeback
|
||||
run that refills them.</li>
|
||||
<li><code>HiMech/NcParsers/NcWriteback/NcConversion.cs</code> — one conversion: the destination piece stream, its
|
||||
written path and the source-to-destination map the cross-links walk.</li>
|
||||
<li><code>HiMech/NcParsers/Syntaxs/SyntaxPiece.cs</code> — the executed unit the index is keyed on, and the
|
||||
source line stamped on its sentence.</li>
|
||||
<li><code>HiNc/SessionCommands/NcFileCommand.cs</code> — the Program File command whose path seeds a placeholder.</li>
|
||||
<li><code>HiNc/SessionCommands/NcCodeCommand.cs</code> — the NC Code command whose title is the pseudo-path of an
|
||||
inline node and whose text is that node's only source.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="mission/mission-root-panel.html">Mission Root Panel</a> — the editable twin: the command list this branch reports on, and
|
||||
the only place the NC file list is changed</li>
|
||||
<li><a class="xref" href="index.html">Execution Page</a> — the page that hosts both branches, and the transport, canvas and charts
|
||||
the branch's selections drive</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>
|
||||
@@ -0,0 +1,157 @@
|
||||
<!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 "{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="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("{0:" + present.DataFormatString + "}", entry.Value.GetValueFunc.Invoke(machiningStep));
|
||||
Console.WriteLine($"{present.ShortName}: {valueText} {present.TailUnitString} ({present.Name} [{entry.Key}])");
|
||||
}
|
||||
}
|
||||
</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 “selection changed” 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>
|
||||
@@ -0,0 +1,207 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Step Present Dialog | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Step Present Dialog | 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="Anatomy-StepPresentDialog">
|
||||
<h1 id="step-present-dialog">Step Present Dialog</h1>
|
||||
|
||||
<h2 id="shipped-surface">Shipped Surface</h2>
|
||||
<p>The dialog has no route and no Control-Tree node. It is a modal on the Execution page (<code>/execution</code>), opened by the <code>tune</code> icon button on the Step Properties panel's title bar in the Step Info column — so it is reachable only while that column and that panel are shown. The button sits next to the list it configures.</p>
|
||||
<p>In the WPF application the same editor is a window opened from the <a class="xref" href="../shell/preference-menu.html">Preference Menu Dropdown</a>.</p>
|
||||
<p>The dialog's own view models are the two fetched values, <code>categories</code> and <code>displayedKeys</code>. The server models they mirror are <code>UserService.CandidateStepPresentKeyList</code> plus <code>UserService.StepPresentAccessDictionary</code> (the candidates) and <code>UserConfig.DisplayedStepPresentKeyList</code> (the ordered displayed list). The dialog's only prop is its open/closed flag.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li>Header
|
||||
<ul>
|
||||
<li>Title, then the counts — <em>n displayed</em> / <em>n available</em></li>
|
||||
<li>The save-state line (<em>Saving…</em> / <em>Saved</em> / error), which stands in for a Save button</li>
|
||||
<li><code>Reset</code> and close</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Splitter
|
||||
<ul>
|
||||
<li>Candidate Keys Panel (left)
|
||||
<ul>
|
||||
<li>One accordion per category, in the order the server sends them
|
||||
<ul>
|
||||
<li>A tri-state checkbox on the category header</li>
|
||||
<li>One checkbox per key, with the key's label and unit</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><code>Add Selected</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Displayed Keys Panel (right)
|
||||
<ul>
|
||||
<li>One row per displayed key, in <code>UserConfig.DisplayedStepPresentKeyList</code> order, drag-reorderable
|
||||
<ul>
|
||||
<li>Per-row up / down / remove</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><code>Clear</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Rows are labelled from the per-key payload the server sends — <code>key</code>, <code>name</code>, <code>shortName</code>, <code>unit</code>. The visible label is <code>shortName</code>, falling back to <code>key</code>, with a unit appended in parentheses when it is not <code>None</code>. The tooltip carries the full <code>name</code> above the raw <code>key</code>.</p>
|
||||
<h2 id="behavior">Behavior</h2>
|
||||
<p>Adding is a two-step gesture on the left: tick candidates — individually, or a whole category through the header's tri-state checkbox — then press <code>Add Selected</code>. A key that is already displayed has its checkbox disabled and shows a check badge instead. Removing lives only on the right, per row or through <code>Clear</code>.</p>
|
||||
<p>Every add, remove and reorder persists immediately: the dialog POSTs the whole ordered list, the server drops unknown keys and duplicates and answers with the effective list, and the dialog re-syncs to that answer. <code>Reset</code> is a DELETE that empties the list; both <code>Reset</code> and <code>Clear</code> go through a confirmation. A failure flips the header state to its error label and notifies; a failed list write additionally re-reads from the server, so the editor never drifts from persisted state.</p>
|
||||
<p>The dialog fetches fresh on every open, and re-pulls when the UI language changes, because the category and key labels arrive already localized.</p>
|
||||
<p>The list this dialog configures omits <code>StepIndex</code> even when it is displayed: the Step Info column's group bar already shows the step index as a badge, so the panel filters that one row out rather than repeating it.</p>
|
||||
<h3 id="categories">Categories</h3>
|
||||
<p>Categories are a GUI-level grouping of keys. Each ships as a stable code plus a display label: the code is the transport identity the client compares and keys its UI state on, the label is display text only. The seven, in canonical order:</p>
|
||||
<ol>
|
||||
<li><code>fileCmdFlagTimeSystem</code> — “File / Command / Flag / Time / System” (<code>StepIndex</code>, <code>FileNo</code>, <code>LineNo</code>, <code>FilePath</code>, <code>LineText</code>, <code>FlagsText</code>, <code>EndTimecode</code>, <code>StepDuration</code>).</li>
|
||||
<li><code>toolFeedrateSpindle</code> — “Tool / Feedrate / Spindle Speed” (<code>ToolId</code>, <code>SpindleSpeed_rpm</code>, <code>Feedrate_mmdmin</code>, <code>CuttingSpeed_mmds</code>, …).</li>
|
||||
<li><code>coordinateMove</code> — “Coordinate / Move” (<code>Cl</code>, <code>MoveOnProgramCoordinate</code>, <code>MovingLength_mm</code>, and every <code>MC.</code> key).</li>
|
||||
<li><code>cuttingGeometryChip</code> — “Cutting Geometry / Chip / Bias / Roughness” (<code>CuttingDepth_mm</code>, <code>ChipThickness_um</code>, <code>Mrr_mm3ds</code>, …).</li>
|
||||
<li><code>mechanicsPowerEnergy</code> — “Mechanics / Power / Energy” (<code>MaxAbsForce_N</code>, <code>SpindleOutputPower_W</code>, <code>AvgAbsTorque_Nm</code>, …).</li>
|
||||
<li><code>temperatureWear</code> — “Temperature / Wear” (<code>ChipTemperature_C</code>, <code>AccumulatedFlankWearWidth_um</code>, …).</li>
|
||||
<li><code>custom</code> — “Custom”, the catch-all for every key the mapping does not place, including the keys registered at run time through <code>UserService.AdditionalStepPresentAccess</code>.</li>
|
||||
</ol>
|
||||
<p>All seven are always returned; nothing gates any of them, and the candidate list is read from <code>UserService.CandidateStepPresentKeyList</code> rather than from <a class="xref" href="../../api/Hi.MachiningSteps.MachiningStep.html">MachiningStep</a> directly, so runtime-registered keys are included.</p>
|
||||
<p>Each client carries its own copy of the key → category mapping: <code>ResolveStepPresentCategory</code> on the webservice, <code>GetKeyCategory</code> in the WPF window. The two are kept in step by hand, with the seven category codes as the shared contract — adding a property means editing both.</p>
|
||||
<h3 id="labels-and-localization">Labels and Localization</h3>
|
||||
<p>The web app resolves <code>name</code> and <code>shortName</code> server-side for the requested language from the shipped step-present catalog, laid over the live <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> and <a class="xref" href="../../api/Hi.MachiningSteps.PresentAttribute.html#Hi_MachiningSteps_PresentAttribute_ShortName">ShortName</a> values — those are the English truth and the fallback for a missing catalog file or key. <a class="xref" href="../../api/Hi.MachiningSteps.PresentAttribute.html#Hi_MachiningSteps_PresentAttribute_Unit">Unit</a> is sent as-is and does not localize. The dialog pins the language with a <code>?lang=</code> argument on the request and re-pulls when the UI locale changes.</p>
|
||||
<p>The WPF window resolves the same labels locally, through a resource manager over <a class="xref" href="../../api/Hi.MachiningSteps.MachiningStep.html">MachiningStep</a>; a key with no translation keeps its original value.</p>
|
||||
<p>Refer to the code to apply <a class="xref" href="../../api/Hi.MachiningSteps.PresentAttribute.html">PresentAttribute</a>:</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("{0:" + present.DataFormatString + "}", entry.Value.GetValueFunc.Invoke(machiningStep));
|
||||
Console.WriteLine($"{present.ShortName}: {valueText} {present.TailUnitString} ({present.Name} [{entry.Key}])");
|
||||
}
|
||||
}
|
||||
</code></pre><h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="selected-step-info-panel.html">Selected-Step Info Panel</a> — the panel whose property list this page configures</li>
|
||||
<li><a class="xref" href="../shell/preference-menu.html">Preference Menu Dropdown</a> — the dropdown that hosts this entry in the WPF client</li>
|
||||
<li><a href="../../manual/run/inspecting-a-step.html">Inspecting a Step</a> — the task this dialog serves, as a procedure</li>
|
||||
</ul>
|
||||
<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/preference/StepPresentPreferenceDialog.vue</code> — the dialog itself: a Candidate Keys / Displayed Keys splitter, category accordions keyed on the stable category code, the per-category tri-state checkbox, <code>Add Selected</code>, drag-reorder plus up / down / remove and <code>Clear</code>, the header counts, <code>Reset</code> and close, and the auto-save state. Refetches on every open and on a locale change.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/SelectedStepInfoPanel.vue</code> — what opens it: the <code>tune</code> icon button teleported into the panel's title bar (the hosting expansion header, or the panel's own bar when standalone). Also the list the dialog configures, with the <code>StepIndex</code> row filtered out.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/StepInfoGroupBar.vue</code> — the Step Info column's group bar, which carries the step-index badge instead.</li>
|
||||
<li><code>wwwroot-src/src/pages/ExecutionPage.vue</code> — the only surface the dialog is reachable from.</li>
|
||||
<li><code>wwwroot-src/src/api/preference.ts</code> — <code>getStepPresentKeys</code> (language-pinned) / <code>setStepPresentKeys</code> / <code>resetStepPresentKeys</code>, and the <code>StepPresentKeyInfo</code> / <code>StepPresentCategory</code> / <code>StepPresentKeysSnapshot</code> types.</li>
|
||||
<li><code>Environments/PreferenceController.cs</code> — <code>GET</code> / <code>POST</code> / <code>DELETE /api/preference/step-present-keys</code>, the seven-entry category table, the <code>ResolveStepPresentCategory</code> mapping, and persistence of <code>DisplayedStepPresentKeyList</code> through <code>SaveUserConfig()</code>.</li>
|
||||
<li><code>Environments/PresentCatalogService.cs</code> — server-side localization of <code>name</code> and <code>shortName</code> from the shipped step-present catalog, with the live <a class="xref" href="../../api/Hi.MachiningSteps.PresentAttribute.html">PresentAttribute</a> data as the English base and fallback.</li>
|
||||
<li><code>Environments/UserService.cs</code> — <code>StepPresentAccessDictionary</code> and <code>CandidateStepPresentKeyList</code>, the candidate-key model.</li>
|
||||
<li><code>Environments/UserConfig.cs</code> — <code>DisplayedStepPresentKeyList</code>, the ordered displayed-key model.</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>
|
||||
@@ -0,0 +1,219 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Strip Charts | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Strip Charts | 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="Anatomy-StripCharts">
|
||||
<h1 id="strip-charts">Strip Charts</h1>
|
||||
|
||||
<p>The strip charts visualise a <strong>windowed, downsampled view of the full mission timeline</strong> for physics / quality aspects that are computed per step across the whole NC program. They are rendered as min/max banded series over the <code>ClStrip.GetDispBegin() .. AbsDispEnd</code> window. Operators use them to spot which segments of the mission are loading the spindle, degrading surface quality, or hitting thermal limits.</p>
|
||||
<p>They occupy the Strip Charts column of the <a href="index.html">Execution Page</a>. The anatomy covers three, all sharing <code>BaseStripChart.vue</code>:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Chart</th>
|
||||
<th>Source Aspect</th>
|
||||
<th>Items</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Availability Chart</td>
|
||||
<td><code>Availability</code></td>
|
||||
<td>Yielding-stress / max-spindle-torque / max-spindle-power / spindle-working-temperature / thermal-yield ratios (5 series).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Surface Roughness Chart</td>
|
||||
<td><code>SurfaceRoughness</code></td>
|
||||
<td>Re-cut depth + program-side cusp + Δ tip deflection X / Y / Z in µm (5 series).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Color Index Time Chart</td>
|
||||
<td><code>Individual</code></td>
|
||||
<td>One series of a user-picked <code>StepPropertyAccessDictionary</code> key (≈90 keys).</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Key Model: <a class="xref" href="../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a> via <code>LocalProjectService.ClStrip</code> + <code>LocalProjectService.StepPropertyAccessDictionary</code>.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<p>One group bar drives all three charts, and each chart is a collapsible panel below it.</p>
|
||||
<ul>
|
||||
<li>Group Bar
|
||||
<ul>
|
||||
<li>Range chip — <code>[{dispBegin}..{absDispEnd}] / {count}</code>, with <code>Showing steps {begin}..{end} of {count} total</code> as its tool-tip.</li>
|
||||
<li>Cursor x readout — the hovered x value, shared by all three charts and reserving a fixed width so hovering never reflows the bar. It is the one place the hovered value is printed; the charts themselves carry no per-chart cursor row.</li>
|
||||
<li>X-axis mode — <code>IndexByTime</code> (default) / <code>IndexByStep</code>, applied to every strip chart at once.</li>
|
||||
<li>Fit View — fits the 3D canvas to the tool path / home position. Disabled without a rendering connection id, and the only control here that acts on something other than the charts.</li>
|
||||
<li>Stick disp-end to live end — keeps the window pinned to the running end of the mission. The state <em>is</em> <code>dispEnd === -1</code>, so a pan or a wheel turns it off by writing a concrete end, and Reset re-arms it.</li>
|
||||
<li>Reset display range — returns the window to the whole mission.</li>
|
||||
<li>Reload all strip charts.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Each chart panel
|
||||
<ul>
|
||||
<li>Header — title label; the aspect picker on the Color Index chart, a dropdown listing every <code>StepPropertyAccessDictionary</code> key with a <code>GetQuantityFunc</code>, sorted by <code>PresentAttribute.Name</code> and filtered by a type-to-search field; the Y-axis range editor (Fit / Lock / Symmetric with a ± bound); and, on the Color Index chart only, a <code>Colors</code> dropdown editing the colour guide's floor / ceiling / tone function. <strong>That editor drives the 3D workpiece colouring and the colour-scale bar, not the chart's own line.</strong></li>
|
||||
<li>Body — <code>UplotChart.vue</code> rendering one min/max band pair per item (two stroked series of the same colour plus a filled band at 15% opacity), with uPlot's own legend panel in a splitter pane beside the plot. The legend carries the swatches, labels and live values; its width is shared by all three charts, so dragging one divider moves them together.</li>
|
||||
<li>Empty-state overlay — in order: “No project loaded”; “Pick a property to inspect” (Color Index with no key chosen); “No mission data” when the fetch returned none; “No physics data” when every item's min / max arrays are all NaN, which is what Availability looks like without a physics licence.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="behavior">Behavior</h2>
|
||||
<ul>
|
||||
<li><strong>Windowed fetch.</strong> Only the <code>ClStrip.GetDispBegin() .. AbsDispEnd</code> window is fetched, at a bucket count matching the chart's pixel width. The server-side <code>ClStrip.GetMinMaxList(threshold, itemCount)</code> handles down-sampling.</li>
|
||||
<li><strong>Pointer interactions</strong> — every one of them writes the shared <code>ClStrip</code>, so a gesture on one chart moves all three:
|
||||
<ul>
|
||||
<li><code>wheel</code> over the plot area → <code>POST /api/execution/cl-strip/wheel</code> with <code>scale = Math.pow(1.05, deltaY * 1/166)</code> + <code>xPositionPercentage</code>.</li>
|
||||
<li>Right / middle-button drag → <code>POST /api/execution/cl-strip/pan</code> with accumulated <code>xOffsetPercentage</code>. Frame-batched via <code>requestAnimationFrame</code>. Pen drags also pan without a button modifier.</li>
|
||||
<li><strong>Left-button drag → a rubber-band x-range zoom</strong>: a translucent band tracks the drag over the plot area and the release POSTs the swept fractions to <code>/api/execution/cl-strip/zoom-range</code>. A drag under 6 px, or under half a percent of the plot width, is discarded so the trailing click selects a step instead — which is what makes click-to-select survive an unsteady hand. The gesture is mouse-only.</li>
|
||||
<li>Left click → <code>POST /api/execution/cl-strip/select-step</code> with the nearest bucket's original step index (via <code>chart.valToPos</code> reverse lookup). A click that ended a pan or a zoom drag is ignored.</li>
|
||||
<li>Touch → one finger pans, a second finger converts the pan into an x-axis pinch-zoom; the trailing synthetic click is swallowed so panning past a step never selects it.</li>
|
||||
<li>Mouse move (debounced 80 ms) → <code>POST /api/execution/cl-strip/enter-step</code> for hover, which is also what fills the group bar's cursor readout.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Live refresh.</strong> <code>useClStripHub</code> subscribes to <code>DispRangeChanged</code> (re-fetch when anyone else zooms / pans) and <code>Updated</code> (coalesced re-broadcast while a mission is running). A rising edge on the execution status hub's <code>hasProject</code> also triggers a refetch.</li>
|
||||
<li><strong>Client-side debounce.</strong> <code>BaseStripChart.load()</code> is debounced 50 ms on the client so a burst of <code>Updated</code> events during a fast-running mission coalesces into one fetch.</li>
|
||||
</ul>
|
||||
<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/charts/StripChartGroupBar.vue</code> — the group bar over the three charts.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/BaseStripChart.vue</code> — shared strip-chart skeleton.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/UplotChart.vue</code> — uplot wrapper.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/PluralStripAvailabilityChart.vue</code> — availability chart.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/PluralStripRoughnessChart.vue</code> — surface-roughness chart.</li>
|
||||
<li><code>wwwroot-src/src/components/execution/charts/StripIndividualChart.vue</code> — aspect-picker individual chart.</li>
|
||||
<li><code>wwwroot-src/src/api/clStrip.ts</code> — typed REST wrappers for the range calls.</li>
|
||||
<li><code>wwwroot-src/src/composables/useClStripHub.ts</code> — singleton hub wrapper (the same ref-counting pattern as the other execution hubs).</li>
|
||||
<li><code>Execution/ExecutionChartsController.cs</code> — strip-chart data:
|
||||
<ul>
|
||||
<li><code>GET /api/execution/strip-chart?aspect=Availability|SurfaceRoughness|Individual&xValueCategory=IndexByTime|IndexByStep&widthHint=…&dispBegin=…&dispEnd=…&inspectingKey=…</code> → <code>{ xs, indexes, items:[{ key, label, unit, min, max }], isXTicksRangeMode, dispBegin, absDispEnd, count }</code>. The Color Index chart's picked key rides the <code>inspectingKey</code> query parameter of that same call.</li>
|
||||
<li><code>GET /api/execution/strip-chart-item-config</code> and <code>GET /api/execution/color-guide</code> — the per-item display config and the colour legend.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><code>Execution/ClStripController.cs</code> — range manipulation at <code>/api/execution/cl-strip/*</code> (the server-side counterparts of the pointer handlers above):
|
||||
<ul>
|
||||
<li><code>GET range</code> — snapshot <code>{ dispBegin, absDispEnd, count, selectedIndex, enteredIndex }</code>.</li>
|
||||
<li><code>POST disp-range</code> body <code>{ dispBegin, dispEnd }</code>, and <code>POST zoom-range</code>.</li>
|
||||
<li><code>POST wheel</code> body <code>{ scale, xPositionPercentage, xValueCategory }</code>.</li>
|
||||
<li><code>POST pan</code> body <code>{ xOffsetPercentage, xValueCategory }</code>. Legacy <code>feelingRatio=2</code>.</li>
|
||||
<li><code>POST select-step</code> body <code>{ stepIndex }</code> → <code>ClStrip.SetSelectedPos(...)</code>.</li>
|
||||
<li><code>POST enter-step</code> body <code>{ stepIndex }</code> (nullable) → <code>ClStrip.SetEnteredPos(...)</code>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><code>Execution/ClStripHub.cs</code> + <code>Execution/ClStripBroadcastService.cs</code> — SignalR at <code>/clStripHub</code>. Broadcasts <code>DispRangeChanged(snapshot)</code>, <code>StepSelected({ stepIndex })</code>, <code>StepEntered({ stepIndex })</code>, <code>Updated(snapshot)</code>. A single-flight <code>Interlocked</code> mutex coalesces re-broadcasts; the client debounce handles the rest of the rate-limiting.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">Execution Page</a> — the page whose Strip Charts column hosts these charts</li>
|
||||
<li><a href="cycle-line-charts.html">Cycle-Line Charts</a> — per-selected-step charts that share the same <code>uplot</code> engine</li>
|
||||
<li><a href="execution-extended-renderingcanvas-tool-bar.html">Execution Extended RenderingCanvas Tool Bar</a> — the tool-path display this column's Fit View acts on</li>
|
||||
<li><a href="../../manual/run/watching-the-run.html">Watching the Run</a> — the task this column serves, with the pointer contract read as a procedure</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>
|
||||
@@ -0,0 +1,49 @@
|
||||
|
||||
<div id="sidetoggle">
|
||||
<div>
|
||||
<div class="sidefilter">
|
||||
<form class="toc-filter">
|
||||
<span class="glyphicon glyphicon-filter filter-icon"></span>
|
||||
<span class="glyphicon glyphicon-remove clear-icon" id="toc_filter_clear"></span>
|
||||
<input type="text" id="toc_filter_input" placeholder="Filter by title" onkeypress="if(event.keyCode==13) {return false;}">
|
||||
</form>
|
||||
</div>
|
||||
<div class="sidetoc">
|
||||
<div class="toc" id="toc">
|
||||
|
||||
<ul class="nav level1">
|
||||
<li>
|
||||
<a href="index.html" name="" title="Overview">Overview</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="execution-tool-bar.html" name="" title="Execution Tool Bar">Execution Tool Bar</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="execution-extended-renderingcanvas-tool-bar.html" name="" title="Execution Extended RenderingCanvas Tool Bar">Execution Extended RenderingCanvas Tool Bar</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="selected-step-info-panel.html" name="" title="Selected-Step Info Panel">Selected-Step Info Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="strip-charts.html" name="" title="Strip Charts">Strip Charts</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cycle-line-charts.html" name="" title="Cycle-Line Charts">Cycle-Line Charts</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="graphic-cache-menu.html" name="" title="Graphic-Cache Menu">Graphic-Cache Menu</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="step-present-dialog.html" name="" title="Step Present Dialog">Step Present Dialog</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="mission/index.html" name="mission/toc.html" title="Mission">Mission</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="program.html" name="" title="Program Branch">Program Branch</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
{"items":[{"name":"Overview","href":"index.html","topicHref":"index.html"},{"name":"Execution Tool Bar","href":"execution-tool-bar.html","topicHref":"execution-tool-bar.html"},{"name":"Execution Extended RenderingCanvas Tool Bar","href":"execution-extended-renderingcanvas-tool-bar.html","topicHref":"execution-extended-renderingcanvas-tool-bar.html"},{"name":"Selected-Step Info Panel","href":"selected-step-info-panel.html","topicHref":"selected-step-info-panel.html"},{"name":"Strip Charts","href":"strip-charts.html","topicHref":"strip-charts.html"},{"name":"Cycle-Line Charts","href":"cycle-line-charts.html","topicHref":"cycle-line-charts.html"},{"name":"Graphic-Cache Menu","href":"graphic-cache-menu.html","topicHref":"graphic-cache-menu.html"},{"name":"Step Present Dialog","href":"step-present-dialog.html","topicHref":"step-present-dialog.html"},{"name":"Mission","href":"mission/index.html","tocHref":"mission/toc.html","topicHref":"mission/index.html","homepage":"mission/index.html"},{"name":"Program Branch","href":"program.html","topicHref":"program.html"}]}
|
||||
Reference in New Issue
Block a user