Archived
167 lines
12 KiB
HTML
167 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Holder Panel | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Holder 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-HolderPanel">
|
|
<h1 id="holder-panel">Holder Panel</h1>
|
|
|
|
<p>This section describes the user interface and behavior for managing different types of tool holders in the application. Tool holders are crucial components in defining a complete tool assembly.</p>
|
|
<div class="NOTE">
|
|
<h5>Note</h5>
|
|
<p>While tool holders are essential components in real-world machining operations, some users may choose not to define them in simulation environments for convenience, particularly when collision detection is not a primary concern. The system allows for this flexibility, though it's recommended to include holders for accurate representation and comprehensive collision analysis.</p>
|
|
</div>
|
|
<p>The primary models involved are subclasses of <a class="xref" href="../../../api/Hi.NcMech.Holders.IHolder.html">IHolder</a>. Two common types are:</p>
|
|
<ul>
|
|
<li><strong><a class="xref" href="cylindroid-holder-panel.html">Cylindroid Holder</a></strong>: Represents holders with a cylindrical geometry. See <a class="xref" href="../../../api/Hi.NcMech.Holders.CylindroidHolder.html">CylindroidHolder</a>.</li>
|
|
<li><strong><a class="xref" href="freeform-holder-panel.html">Freeform Holder</a></strong>: Represents holders with more complex, freeform geometry, often defined by STL files. See <a class="xref" href="../../../api/Hi.NcMech.Holders.FreeformHolder.html">FreeformHolder</a>.</li>
|
|
</ul>
|
|
<p>Each holder type has its own user interface elements for defining its geometry and properties.</p>
|
|
<p>This panel is the Holder tab of the <a class="xref" href="../index.html">Tool House Page</a>, reached at <code>/tool-house/:toolId/holder</code>. It is the panel of the Control-Tree Holder node under the selected tool — the node whose role path ends in <code>.../holder</code>.</p>
|
|
<h2 id="layout">Layout</h2>
|
|
<h3 id="web-layout">Web Layout</h3>
|
|
<ul>
|
|
<li>Holder Node Panel
|
|
<ul>
|
|
<li>Title Label</li>
|
|
<li>Holder Type Selector — None / Cylindroid Holder / Freeform Holder</li>
|
|
<li>Holder branch, rendered while the type is Cylindroid or Freeform
|
|
<ul>
|
|
<li>Name TextField (editable)</li>
|
|
<li>Abstract Note TextField (readonly, derived by the model)</li>
|
|
<li>Note TextField (editable)</li>
|
|
<li>Sections Hint Caption — names the sections below for the current type</li>
|
|
</ul>
|
|
</li>
|
|
<li>No-holder branch — one hint, <code>toolhouse.holder.noHolderHint</code>, inviting the reader to pick Cylindroid Holder or Freeform Holder</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<p>The three identity fields belong to whichever holder the tool carries. They sit on this panel under the Metadata-on-container convention — a container's own General fields are edited on the container's panel instead of in a General child — and they commit through the per-type holder controller's <code>SetName</code> and <code>SetNote</code> (<code>CylindroidHolderController</code> or <code>FreeformHolderController</code>), not through <code>ToolHouseController</code>. No holder leaves the panel without them.</p>
|
|
<p>The type also decides what grows below the node. A Cylindroid holder grows two child sections, Geometry and Resolution — the nodes whose role paths end in <code>.../holder/geometry</code> and <code>.../holder/resolution</code>; see <a class="xref" href="cylindroid-holder-panel.html">Cylindroid Holder Panel</a>. A Freeform holder grows four — Geometry, Geom To Spindle, Geom To Cutter and Resolution; see <a class="xref" href="freeform-holder-panel.html">Freeform Holder Panel</a>. Selecting a section replaces this panel in the slave column with that section's own panel. None grows no children, so the Holder node is a leaf and the hint is the whole surface.</p>
|
|
<p>This panel carries no object management of its own. Object management for the tool library sits on the tool-house root node, where the <a class="xref" href="../../widget/object-management-menu-button.html">Object Management Menu Button</a> is bound to the whole <code>.MachiningToolHouse</code> file rather than to a per-holder file.</p>
|
|
<h2 id="feature">Feature</h2>
|
|
<p>Committing a type is one server call plus a cache clear. <code>SetHolderType</code> maps the selector value onto the holder classes: none clears the tool's holder, while cylindroid and freeform each assign a new holder <strong>only when the tool does not already carry one of that class</strong> — so re-picking the type a tool already has keeps the holder it has, and the edits on it, rather than replacing it. When the caller passes its session key the server re-indexes the resulting holder under that session's holder key, and removes that entry for None, so the session key keeps pointing at the tool's current holder. The response carries the holder's class name and its abstract note.</p>
|
|
<p>The panel then calls <code>ClearToolCache</code>, which clears the tool's cached solids and, when the holder implements <a class="xref" href="../../../api/Hi.Common.IClearCache.html">IClearCache</a>, the holder's own cache as well, so the tool canvas redraws against the new holder. Finally it emits a structure change for its own node, which is how the Geometry and Resolution sections appear or disappear with the type.</p>
|
|
<p><code>GetHolder</code> reports the same pair — class name and abstract note — and is what the panel reads on mount to seed the selector; an unknown tool id answers Not Found. The panel then reads the per-type controller's <code>Get</code> (<code>CylindroidHolderController</code> or <code>FreeformHolderController</code>) to fill the three identity fields; for a Freeform holder that same call also publishes the holder's geometry and two placements under the session's keys for the sections below.</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/controlTree/toolhouse/ToolHolderPanel.vue</code> — the Holder node's panel: the None / Cylindroid / Freeform selector, the holder's Name / readonly Abstract Note / Note (committed through the per-type controller) and the no-holder hint. Commits a type change through <code>setHolderType</code> followed by <code>clearToolCache</code>.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/toolHouseItemTypes.ts</code> — registers this panel as the <code>ToolHolder</code> item type; its holder child builder grows Geometry and Resolution for a <code>CylindroidHolder</code>, Geometry / Geom To Spindle / Geom To Cutter / Resolution for a <code>FreeformHolder</code>, and nothing for None.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/toolhouse/HolderSectionPanel.vue</code> — the panel behind the Cylindroid holder's two sections and both holders' Resolution section, dispatching on the last segment of the node's role path and on the holder type.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/toolhouse/ToolHouseRootPanel.vue</code> — the tool-house root panel, which carries the Object Management Menu Button for the <code>.MachiningToolHouse</code> file.</li>
|
|
<li><code>wwwroot-src/src/api/toolHouse.ts</code> — <code>getHolder</code>, <code>setHolderType</code> and <code>clearToolCache</code>, plus the <code>HolderType</code> union (<code>None</code> / <code>CylindroidHolder</code> / <code>FreeformHolder</code>) the selector's three values map onto.</li>
|
|
<li><code>wwwroot-src/src/api/cylindroidHolder.ts</code> / <code>wwwroot-src/src/api/freeformHolder.ts</code> — <code>get…Holder</code>, <code>set…HolderName</code> and <code>set…HolderNote</code> for each holder type, behind the three identity fields.</li>
|
|
<li><code>wwwroot-src/src/i18n/en/toolhouse.ts</code> — the <code>toolhouse.holder.*</code> strings this panel renders: holderType, abstractNote, sectionsHint, freeformSectionsHint, noHolderHint, cylindroidHolder, freeformHolder.</li>
|
|
<li><code>Mech/ToolHouseController.cs</code> — <code>POST SetHolderType</code>, <code>GET GetHolder</code> and <code>POST ClearToolCache</code>, the three endpoints behind the selector. Per-holder-type editing lives in the dedicated holder controllers.</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>
|