This repository has been archived on 2026-10-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
HiNC-2025-win-desktop-Deploy/App/wwwroot/HiAPI-docsite/manual/run/building-a-mission.html
T
2026-09-15 01:12:50 +08:00

339 lines
20 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Building a Mission | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Building a 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 &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="">
<h1 id="building-a-mission">Building a Mission</h1>
<p>A mission is the list of commands a run executes, in order. Nothing plays until there is one, and
what plays is exactly what the list says — including which entries are ticked and which are not.</p>
<h2 id="where-it-is">Where it is</h2>
<p>The Execution page at <code>/execution</code>, <strong>Mission</strong> branch of the Control Tree; <code>/mission</code> lands on the
same place. This is the page the application opens on.</p>
<p>The list is assembled and rearranged on the tree rows themselves: the <strong>Mission</strong> row and every
<strong>List</strong> row carry a <strong>+</strong> that adds a command, and every command row carries a drag handle in
front of its label and its own move, duplicate and delete buttons. The <strong>Mission</strong> node's panel
below the tree is informational — the command count and a hint naming those affordances. A
command's own settings are edited one level in, on that command's node.</p>
<h2 id="add-a-command">Add a command</h2>
<p>The <strong>+</strong> pinned to the right edge of the <strong>Mission</strong> row, or of any <strong>List</strong> row, is <strong>Add
Command</strong>; it opens a search-first picker. Type to narrow it: the search matches a command's
display name, its internal kind key and the aliases it declares, and an alias matches both by its
English key and by its word in the interface language. Arrow keys walk the results and
<kbd>Enter</kbd> takes the highlighted one.</p>
<p>Results are grouped by category. Thirteen kinds ship:</p>
<table>
<thead>
<tr>
<th>Category</th>
<th>Commands</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Setup</strong></td>
<td>Machining Resolution, Machining Motion Resolution, Collision Detection, Pause on Failure, Physics</td>
</tr>
<tr>
<td><strong>Program</strong></td>
<td>Program File, NC Code, Script</td>
</tr>
<tr>
<td><strong>Optimization</strong></td>
<td>NC Optimization Config</td>
</tr>
<tr>
<td><strong>Output</strong></td>
<td>Post-Execution, Record Meshed Geometry, Export Meshed Geometry (STL)</td>
</tr>
<tr>
<td><strong>Flow</strong></td>
<td>List</td>
</tr>
</tbody>
</table>
<p>What you pick lands in the list whose <strong>+</strong> you pressed, <strong>directly after the focused command</strong> when
that command is an entry of the same list, and at the list's end otherwise. The focus is the
selected command — or, while the selection sits on one of a command's child nodes, the command that
owns it — or the command the last add created; and when a move, duplicate, delete or drag carries
the selection to another row, the focus follows it there. So a run of adds lands in order below the
focus, and the <strong>Mission</strong> row's <strong>+</strong> always adds at root level even while a command inside a
group is selected. The new row is revealed in the tree, but the selection stays where it was rather
than jumping into the new command. Nothing is pinned to a position: the order is entirely yours, and
every command is placeable anywhere.</p>
<p><strong>Add Command is disabled until a project is open.</strong> With nothing open the <strong>Mission</strong> panel reads
<em>No project loaded. Open or create a project first.</em> With a project and an empty mission it reads
<em>No commands yet</em> and names the button.</p>
<p>The set on offer is served by the application rather than built into the interface, so a command
kind can appear in this dialog before this manual has a page for it.</p>
<p>The picker over the demo mission, at <code>/execution?tree=execution/mission</code> with the <strong>Mission</strong>
row's <strong>+</strong> pressed. The five category headings are the grouping in the table above, the search
box at the top is what narrows them, and the first result is highlighted ready for
<kbd>Enter</kbd>.</p>
<p><img src="building-a-mission-img/add-command.en.png" alt="The Add Command dialog open over the Execution page, in front of the Control Tree whose Mission row carries a + at its right edge and whose transport buttons and green ready badge show above it: a Search commands box above thirteen entries, each with its kind icon, under five headings — Setup with Machining Resolution highlighted, Machining Motion Resolution, Collision Detection, Pause on Failure and Physics; Program with Program File, NC Code and Script; Optimization with NC Optimization Config; Output with Post-Execution, Record Meshed Geometry and Export Meshed Geometry STL; and Flow with List"></p>
<h2 id="the-shape-to-start-from">The shape to start from</h2>
<p>An empty list is legal, but it is not where a project should end up. A finished mission has the
same shape whatever it machines: <strong>setup at the top, the program in the middle, the program held
between two Record Meshed Geometry entries, output at the bottom.</strong></p>
<table>
<thead>
<tr>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Setup</td>
<td>Machining Resolution, Machining Motion Resolution, Collision Detection, Pause on Failure, Physics</td>
</tr>
<tr>
<td>Output</td>
<td><strong>Record Meshed Geometry</strong> — <code>Cache/&lt;stage&gt;-init.wct</code>, the stock</td>
</tr>
<tr>
<td>Program</td>
<td>Program File</td>
</tr>
<tr>
<td>Output</td>
<td><strong>Record Meshed Geometry</strong> — <code>Cache/&lt;stage&gt;-done.wct</code>, the result</td>
</tr>
<tr>
<td>Output</td>
<td>Post-Execution</td>
</tr>
</tbody>
</table>
<p>The two records are what make a run restartable, and they are part of the shape rather than an
advanced extra — a mission without them replays the whole job from the stock every time. Two rules
travel with them:</p>
<ul>
<li><strong>Machining Resolution belongs above the first record.</strong> The cache is meshed at whatever
resolution is in force when the record runs, so a resolution set below it is silently baked out
of the file.</li>
<li><strong>Keep the first record where the stock is an STL, drop it where the stock is procedural</strong> (a box
or a cylindroid) or is already a recorded mesh. Meshing an STL is a fixed cost paid on every
play; a box the kernel builds instantly, and caching it costs more than it saves.</li>
</ul>
<p><a href="a-mission-that-resumes.html">A Mission That Resumes</a> is this layout in full, with the reasoning and
the measurements behind each row.</p>
<h2 id="read-a-row">Read a row</h2>
<p>Each row shows the command's kind and, where one detail identifies the command, that detail after
it in brackets. Where you can name a command that detail is the title you typed, so a row still says
what it is after it has been named: <code>List [Roughing]</code>, <code>NC Code [Inline finishing pass]</code> — and
while the title is empty the row is the bare kind, <code>NC Code</code> or <code>Script</code>. Where you cannot, the
command brackets what it holds instead — <code>Program File [NC/circle.ptp]</code>,
<code>Machining Resolution [1 mm]</code>, <code>Collision Detection [On]</code> — so a mission is readable without
opening anything. Two kinds have no single detail to show and read as their kind alone:
<code>NC Optimization Config</code> and <code>Post-Execution</code>, whose settings are the child nodes beneath the row
rather than one value.</p>
<p>Every command row carries four buttons — <strong>Move up</strong>, <strong>Move down</strong>, <strong>Duplicate</strong> and <strong>Delete</strong> —
revealed while the pointer is over the row or while the row is selected, and always shown on a
touch screen. Up and down are disabled at the ends of the list. Delete asks for confirmation, in a
dialog naming the command. Duplicate is a deep copy: a group copies with everything inside it, and
the copy lands directly after the original. The selection follows the operation when it sits on
the acted-on row <strong>or anywhere beneath it</strong>: on an entry inside a group when you act on the group's
row, or on a child node when you act on its command's row. It then lands on the acted-on row itself
— the row at its new position, the copy, or the nearest survivor of a delete (the list itself, once
it is empty) — so an editor you were in beneath that row is replaced by the row's own panel. Acting
on a row the selection is neither on nor under leaves the selection, and the editor you are in,
where they are.</p>
<p>Before a row operation writes anything — for a delete, only after you have confirmed it — it
settles whatever the open editor has not yet saved. If you cancel that prompt, the operation is
dropped and a notice says so.</p>
<p>Clicking a row anywhere but on its checkbox or a button selects that command and opens its editor
below the tree.</p>
<h2 id="tick-what-runs">Tick what runs</h2>
<p><strong>The checkbox at the front of a command row is the only thing that decides whether a command
runs.</strong> Clearing it greys the row; the editor stays open and fully editable, with a note that the
command is disabled. Clearing the box on a group greys the whole group, and the run skips the group
together with everything nested inside it.</p>
<p>Leaving a command in place with its box cleared is how you skip a step without losing its settings,
which is what you want while you narrow down a problem.</p>
<h2 id="group-with-a-list">Group with a list</h2>
<p><strong>List</strong> is an ordinary command in the Flow category, and adding one grows a sub-tree: its children
are its own entries, rows with the same handle and buttons one level down, and its row carries its
own <strong>+</strong>. That nests to any depth, so a mission can be grouped by operation rather than left flat.</p>
<p>A list carries an optional title, and its node's panel holds that <em>Title (optional)</em> field alone —
its entries are its rows in the tree — with, as on any command, the note that it is disabled above
the field while its checkbox is cleared. The row reads <code>List</code> while the title is empty and
<code>List [title]</code> once it says something; a title of nothing but spaces counts as unset. The Mission
root is the one list with no title field — it reads <strong>Mission</strong>.</p>
<p>The demo mission at <code>/execution?tree=execution/mission</code>: two groups and seven loose entries. The
transport buttons and the <strong>ready</strong> badge sit at the top of the Control Tree; <strong>Mission</strong> is its
first root, with <strong>List [Roughing]</strong> and <strong>List [Finishing]</strong> opened and the two Program File
entries inside each bracketing their files, and the <strong>Mission</strong> row and both List rows carry a
<strong>+</strong> at the right edge. The <strong>Program</strong> root sits collapsed beneath. The <strong>Mission</strong> panel below
the tree reads <em>Commands 9</em> and the hint naming the row affordances. The greyed <strong>Program File</strong>
and <strong>Post-Execution</strong> rows are entries left in place with their checkboxes cleared — part of the
mission, and not run.</p>
<p><img src="building-a-mission-img/grouped-mission.en.png" alt="The Control Tree on the Execution page: six transport buttons and a green ready badge above the tree; the Mission root row with a + at its right edge, then Machining Resolution 1 mm and Collision Detection On, List Roughing expanded over Program File NC/circle.ptp and Program File NC/drill_slot.ptp, List Finishing expanded over Program File NC/side.ptp and Program File NC/slide.ptp, both List rows with their own +, then Program File NC/circle.ptp, NC Code Inline finishing pass, a greyed Program File NC/slide-test-resolution-script.ptp with its checkbox cleared, NC Optimization Config with a collapsed expand arrow and a greyed Post-Execution with a collapsed expand arrow and its checkbox cleared, every command row with a checkbox and a drag handle before its label; a collapsed Program root below; under the tree the Mission panel reads Commands 9 and the hint that commands run top-down in the Control Tree, naming the + on the Mission or a List row, drag to reorder, the row's own move, duplicate and delete buttons, and the checkbox that enables or disables the command"></p>
<h2 id="reorder-and-move-in-and-out">Reorder, and move in and out</h2>
<p>Up and down move an entry within its own list and never change which list owns it. Dragging a row
does more — the handle in front of its label marks the row as draggable, but the whole row is the
grip: a drag started on the handle, on the label or on the blank space beside them picks the row
up — and where you drop decides which:</p>
<table>
<thead>
<tr>
<th>Drop it on</th>
<th>What happens</th>
</tr>
</thead>
<tbody>
<tr>
<td>A command row</td>
<td>Land <strong>before</strong> or <strong>after</strong> it — the row splits at its midline. In the same list that is a reorder; in another list, the entry moves there.</td>
</tr>
<tr>
<td>The middle band of a <strong>List</strong> row</td>
<td>Move the entry <strong>into</strong> that list, at its end. The row's outer quarters still land before or after it.</td>
</tr>
<tr>
<td>The <strong>Mission</strong> row</td>
<td>Move the entry <strong>into</strong> the root list, at its end — the whole row is a landing.</td>
</tr>
</tbody>
</table>
<p>While the drag is over a row, a line along the row's top or bottom edge marks <em>before</em> or <em>after</em>
and a tinted row marks <em>into</em>. To take an entry out of a group, drop it on a row outside the group,
or on the <strong>Mission</strong> row. Moving a list into itself, or into one of its own groups, is refused. A
dragged command that was selected — or that held the selection somewhere beneath it, on one of its
entries or child nodes — is selected where it lands; the selection on any other row stays on that
row.</p>
<p>Dragging serves rearrangement only. The tree accepts nothing but its own rows: text or a file
dragged in from outside gets the browser's no-drop cursor over every row, and releasing it there
hands the drop to the browser's own default rather than to the application — nothing is imported,
and a browser typically opens a dropped file in the tab, leaving the page. To bring several
programs in at once, use one Program File command's picker and select them together: the extra
files become Program File commands directly after that one; see
<a href="playing-a-program.html">Playing a Program</a>.</p>
<h2 id="edit-one-command">Edit one command</h2>
<p>Select a command's row. Its editor opens in the panel below the tree — the editor alone, with a
note while the command is switched off. Moving, duplicating and deleting stay on the row.</p>
<p>A command with one job — Program File, NC Code, Script — puts its whole editor on that one node.
A command with several cards spreads them: the general settings stay on the command node and each
remaining card becomes a <strong>child node</strong> beneath it, so a long command is read by walking down the
tree rather than by scrolling one panel. Where a card had its own <em>Enable</em> switch, that switch is
the child node's own checkbox. Which commands do that, and what each card holds, is
<a href="the-other-commands.html">The Other Commands</a>.</p>
<h2 id="see-also">See Also</h2>
<ul>
<li><a href="index.html">Running a Simulation</a> — the rest of running a job</li>
<li><a href="playing-a-program.html">Playing a Program</a> — the two commands that put NC code into a run</li>
<li><a href="the-other-commands.html">The Other Commands</a> — what the rest of the command kinds are for</li>
<li><a href="a-mission-that-resumes.html">A Mission That Resumes</a> — the shape a mission should start from, in full</li>
<li><a href="running-a-simulation.html">Starting and Stepping</a> — the transport that plays the list built here</li>
<li><a class="xref" href="../../anatomy/execution/mission/mission-root-panel.html">Mission Root Panel</a> — the node behind this branch: the row operations, the picker and the three drag landings</li>
<li><a class="xref" href="../../anatomy/execution/mission/ListCommand-panel.html">List Command Panel</a> — the component behind a group: what nesting costs, and what a disabled list skips</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>