Archived
358 lines
20 KiB
HTML
358 lines
20 KiB
HTML
<!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>
|