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/anatomy/geom/cylindroid-editor.html
T
2026-09-11 03:46:11 +08:00

186 lines
10 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cylindroid Editor | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Cylindroid Editor | 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="Anatomy-CylindroidControl">
<h1 id="cylindroid-editor">Cylindroid Editor</h1>
<p>The Cylindroid editor edits a <a class="xref" href="../../api/Hi.Geom.Cylindroid.html">Cylindroid</a> — a solid of revolution defined by a list of
(Z, R) pairs — as a table of rows, with a minimum of two. It is reached from any Geometry slot that
admits the <code>Cylindroid</code> kind, and again from the Tool House cylindroid holder, whose Geometry node
embeds the same editor directly.</p>
<h2 id="layout">Layout</h2>
<ul>
<li><strong>Z-R pairs</strong> — a header row carrying the section label and an <strong>Add</strong> button. Add appends a row
ten millimetres above the last one, at the same radius.</li>
<li><strong>The table</strong> — one row per pair, columns <code>#</code>, <code>Z (mm)</code> and <code>R (mm)</code>. Each Z and R cell is an
inline text field parsed as a number; there is no spinner. A per-row remove button sits at the end
of each row, disabled once only two pairs remain.</li>
<li><strong>The caption</strong> — a one-line statement of the type: a solid of revolution defined by (Z, R) pairs,
minimum two.</li>
</ul>
<h2 id="behavior">Behavior</h2>
<ul>
<li><strong>A cell commits on blur or Enter.</strong> An empty or non-finite entry is dropped rather than written,
and a negative radius is clamped to zero — on the client and again on the server.</li>
<li><strong>The floor is two pairs, and both ends enforce it.</strong> The remove button is disabled at two and
the controller refuses the call below two.</li>
<li><strong>Creating one seeds three pairs.</strong> The create endpoint starts a new cylindroid at (0, 20),
(30, 20) and (60, 10) rather than empty.</li>
<li><strong>Four endpoints ship without a caller.</strong> The controller exposes <code>GetPairCount</code>, <code>GetPairAt</code>,
<code>UpdatePairAt</code> and <code>SortByZ</code>; the shipped SPA uses none of them, committing the whole list instead.</li>
</ul>
<h2 id="tessellation-resolution-is-not-a-property-of-the-shape">Tessellation Resolution Is Not a Property of the Shape</h2>
<p>There is no longitude count, and no per-instance resolution, on a cylindroid. The STL longitude
number is derived internally at generation time from a resolution the caller supplies; the type
carries only a static default.</p>
<p>Where resolution <em>is</em> exposed, it belongs to the holder rather than to the shape: the Tool House
cylindroid holder carries a <strong>Resolution</strong> tree node beside its Geometry one, offering a linear
resolution in millimetres and an angle resolution in degrees, described in the app as the tessellation resolution used for display and collision meshing.</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/geom/CylindroidEditor.vue</code> — the editor: the header row and Add
button, the Z / R table with its per-cell commit, and the per-row remove and its two-pair floor.
Edits by IndexService key and emits <code>changed</code> so the owner can resync.</li>
<li><code>wwwroot-src/src/components/geom/geometryEditors.ts</code> — maps the <code>Cylindroid</code> kind to this editor.</li>
<li><code>wwwroot-src/src/components/geom/GeometryEditor.vue</code> — the kind picker that creates a Cylindroid
and embeds this editor beneath itself.</li>
<li><code>wwwroot-src/src/components/controlTree/itemTypes.ts</code> — registers <code>Cylindroid</code> against the
sole-editor panel and lists it among the kinds a container may hold.</li>
<li><code>wwwroot-src/src/components/controlTree/SoleEditorPanel.vue</code> — the kind node's panel.</li>
<li><code>wwwroot-src/src/components/controlTree/toolhouse/HolderSectionPanel.vue</code> — the second host: it
embeds this editor on the holder's cylindroid key for the Geometry node, and renders the linear
and angle resolution fields for the sibling Resolution node.</li>
<li><code>wwwroot-src/src/components/controlTree/toolHouseItemTypes.ts</code> — grows those two holder children,
and only for a cylindroid holder.</li>
<li><code>wwwroot-src/src/api/geometry.ts</code> — <code>getCylindroid</code>, <code>updateCylindroidPairs</code>, <code>addCylindroidPair</code>,
<code>removeCylindroidPairAt</code> and the create entry.</li>
<li><code>wwwroot-src/src/api/cylindroidHolder.ts</code> — the holder side: the cylindroid key it exposes, the
geometry update, and the resolution setter.</li>
<li><code>wwwroot-src/src/i18n/en/geom.ts</code> — the <code>cylindroid.*</code> strings, and
<code>wwwroot-src/src/i18n/en/toolhouse.ts</code> — the Resolution node's own labels and hint.</li>
<li><code>Geom/CylindroidController.cs</code> — REST endpoints at <code>/api/Cylindroid/*</code>: <code>New</code>, <code>Get</code>,
<code>GetPairCount</code>, <code>GetPairAt</code>, <code>UpdatePairAt</code>, <code>UpdateAllPairs</code>, <code>AddPair</code>, <code>RemovePairAt</code> and
<code>SortByZ</code>.</li>
<li><code>Mech/CylindroidHolderController.cs</code> — the holder surface at <code>/api/CylindroidHolder/*</code> behind the
Tool House host.</li>
<li><code>Common/IndexService.cs</code> — the keyed object store every cylindroid key resolves against.</li>
</ul>
<h2 id="see-also">See Also</h2>
<ul>
<li><a href="geometry-editor.html">Geometry Editor</a> — the switchboard that offers this kind and
hosts this editor</li>
<li><a class="xref" href="../tool-house/holder/cylindroid-holder-panel.html">Cylindroid Holder Panel</a> — the second host, and the surface
that owns the tessellation resolution</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>