Archived
296 lines
17 KiB
HTML
296 lines
17 KiB
HTML
<!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>, labelled <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>How a mission acquires these settings is the first thing to know about this panel.</p>
|
|
<p>The 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="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>
|