Archived
158 lines
10 KiB
HTML
158 lines
10 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Cylindroid Holder Panel | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Cylindroid 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-CylindroidHolderPanel">
|
|
<h1 id="cylindroid-holder-panel">Cylindroid Holder Panel</h1>
|
|
|
|
<p>The key model is <a class="xref" href="../../../api/Hi.NcMech.Holders.CylindroidHolder.html">CylindroidHolder</a>: a holder revolved from a Z-R profile, carrying its own name and note and its own STL tessellation resolution.</p>
|
|
<p>The holder occupies two child sections of the Holder node under the selected tool — Geometry and Resolution, the nodes whose role paths end in <code>.../holder/geometry</code> and <code>.../holder/resolution</code>, reached at <code>/tool-house/:toolId/holder/geometry</code> and <code>/tool-house/:toolId/holder/resolution</code>. Its Name, readonly Abstract Note and Note are edited one level up, on the <a class="xref" href="holder-panel.html">Holder Panel</a> itself, under the Metadata-on-container convention.</p>
|
|
<h2 id="layout">Layout</h2>
|
|
<h3 id="web-layout">Web Layout</h3>
|
|
<ul>
|
|
<li>Geometry Section
|
|
<ul>
|
|
<li><a class="xref" href="../../geom/cylindroid-editor.html">Cylindroid Panel</a> — the reusable Z-R pair table, driven by a model key</li>
|
|
<li>Initializing Caption — stands in for the editor until the holder's cylindroid has been published under a key</li>
|
|
</ul>
|
|
</li>
|
|
<li>Resolution Section
|
|
<ul>
|
|
<li>Resolution Hint Caption — names the STL tessellation resolution used for display and collision meshing</li>
|
|
<li>Linear Resolution (mm) Input Field</li>
|
|
<li>Angle Resolution (deg) Input Field</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h2 id="feature">Feature</h2>
|
|
<p>The two web sections reach the model by different routes, and that difference is why the holder resync belongs to one of them and not the other.</p>
|
|
<p><strong>Geometry.</strong> The section mounts the reusable Cylindroid editor on a key. <code>Get</code> publishes the holder's own <a class="xref" href="../../../api/Hi.NcMech.Holders.CylindroidHolder.html#Hi_NcMech_Holders_CylindroidHolder_Cylindroid">Cylindroid</a> in the index service under a per-session <code>-HolderCylindroid</code> key and hands that key back — but only when the caller supplies its session key; with no session key the response carries a null key and the section shows its initializing caption in the editor's place. The key names the same object the holder holds, so an edit lands on the holder's geometry directly. Because that generic editor mutates the bare geometry and holds no reference back to the holder, the section issues the holder resync itself after each geometry edit: <code>UpdateGeometryContent</code> runs <code>UpdateByCylindroid()</code> and then <code>ClearCache()</code>, recomputing the holder topology before regenerating the solid — clearing the cache alone would skip the recompute. The slave column mounts only the selected node's panel, so at most one holder-geometry panel is alive at a time and the shared key never collides.</p>
|
|
<p><strong>Resolution.</strong> The section writes the polar resolution straight onto the holder: <code>SetPolarResolution</code> assigns a fresh <a class="xref" href="../../../api/Hi.Geom.Resolution.PolarResolution2d.html">PolarResolution2d</a> built from the two values and calls <code>ClearCache()</code>, so the server regenerates the solid cache at the new tessellation. No topology resync is involved on this path. <code>Get</code> also returns the current pair, which is how the two fields are seeded; a null resolution on the model is reported as 0 mm / 0 deg.</p>
|
|
<p>Guards sit on both sides. Every action on the controller answers Not Found for an unknown tool id and Bad Request when the tool's holder is not a <code>CylindroidHolder</code>; <code>SetPolarResolution</code> additionally rejects a linear or angle value that is not greater than zero, and the Resolution section refuses to send a non-positive value at all. Both fields commit on blur or Enter.</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/HolderSectionPanel.vue</code> — both sections in one panel, chosen by the last segment of the node's role path: the Cylindroid editor on the indexed key plus the resync on change, and the linear-mm / angle-deg fields with their positive-value guard.</li>
|
|
<li><code>wwwroot-src/src/components/geom/CylindroidEditor.vue</code> — the reusable Z-R profile editor the Geometry section wraps, driven by model key.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/toolhouse/ToolHolderPanel.vue</code> — the parent Holder node's panel, which hosts this holder's Name, readonly Abstract Note and Note and commits them through <code>setCylindroidHolderName</code> / <code>setCylindroidHolderNote</code>.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/toolHouseItemTypes.ts</code> — grows the two child sections for a <code>CylindroidHolder</code> and routes both to the <code>HolderSection</code> item type.</li>
|
|
<li><code>wwwroot-src/src/api/cylindroidHolder.ts</code> — the typed wrapper over <code>/api/CylindroidHolder</code>: <code>getCylindroidHolder</code>, <code>updateCylindroidHolderGeometry</code>, <code>setCylindroidHolderName</code>, <code>setCylindroidHolderNote</code>, <code>setCylindroidHolderResolution</code>.</li>
|
|
<li><code>wwwroot-src/src/i18n/en/toolhouse.ts</code> — the two section labels, the tessellation hint, the two field labels and the initializing caption.</li>
|
|
<li><code>Mech/CylindroidHolderController.cs</code> — <code>GET Get</code> (name / note / abstract note, the polar resolution, and — with a session key — the indexed cylindroid key) plus <code>POST UpdateGeometryContent | SetName | SetNote | SetPolarResolution</code>.</li>
|
|
</ul>
|
|
<h2 id="see-also">See Also</h2>
|
|
<ul>
|
|
<li><a class="xref" href="../../widget/polar-resolution-2d-panel.html">Polar Resolution 2D Panel</a> — the resolution editor this panel embeds</li>
|
|
<li><a class="xref" href="../../geom/cylindroid-editor.html">Cylindroid Editor</a> — the shape editor this panel's Geometry surface
|
|
embeds, and the shape whose tessellation the Resolution surface governs</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>
|