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/tool-house/cutter/cutter-panel.html
T
2026-09-09 18:06:21 +08:00

162 lines
12 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cutter Panel | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Cutter 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 &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-CutterPanel">
<h1 id="cutter-panel">Cutter Panel</h1>
<h2 id="overview">Overview</h2>
<p>The key component is <a class="xref" href="../../../api/Hi.Machining.ICutter.html">ICutter</a>. A tool carries at most one cutter, and two concrete types answer to that interface: <a class="xref" href="../../../api/Hi.Milling.Cutters.MillingCutter.html">MillingCutter</a> and <a class="xref" href="../../../api/Hi.Machining.FreeformRemover.html">FreeformRemover</a>. This panel is where the type is chosen, and it holds the cutter's own General fields.</p>
<p>It is the Cutter tab of the <a class="xref" href="../index.html">Tool House Page</a>, reached at <code>/tool-house/:toolId/cutter</code> under the page route <code>/tool-house/:toolId?/:tab?/:subtab?</code>. It is the panel of the Control-Tree Cutter node under the selected tool — the node whose role path is <code>toolhouse/tool-&lt;id&gt;/cutter</code>.</p>
<h2 id="layout">Layout</h2>
<h3 id="web-layout">Web Layout</h3>
<ul>
<li>Cutter Node Panel
<ul>
<li>Title Label — Cutter</li>
<li>Cutter Type Selector — Milling Cutter / Freeform Remover / None</li>
<li>Milling Cutter branch, rendered only while the type is Milling Cutter
<ul>
<li>Shank Mass Input Field (g)</li>
<li>Hone Radius Input Field (um)</li>
<li>Relief Angle Input Field (deg)</li>
<li>Sections Hint Caption — points at the section tabs below</li>
</ul>
</li>
<li>Freeform Remover branch — one caption, <code>toolhouse.cutter.freeformRemoverUnavailable</code>, saying the editor is not available here</li>
<li>No-cutter branch — one hint, <code>toolhouse.cutter.noCutterHint</code>, inviting the reader to pick Milling Cutter</li>
</ul>
</li>
</ul>
<p>The three numeric fields are the cutter's General fields, and they sit here 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. They are plain, always-editable inputs: one label each, no label switching and no auto-computed mode, and all three commit together through the general endpoint, which accepts exactly <code>shankMass_g</code>, <code>honeRadius_um</code> and <code>reliefAngle_deg</code>. A blanked box commits nothing, so clearing a field never writes a zero.</p>
<p>The type also decides what grows below the node. A Milling Cutter grows the cutter's section tabs — Material, Flute Profile, Flute Contours, Upper Beam, Optimization — as the nodes whose role paths end in <code>.../cutter/material</code>, <code>.../cutter/profile</code>, <code>.../cutter/contours</code>, <code>.../cutter/upper-beam</code> and <code>.../cutter/opt</code>; Material is the one gated behind the Advanced Physics preference. Selecting one replaces this panel with that section's own panel; see <a class="xref" href="milling-cutter-panel.html">Milling Cutter Panel</a>. A Freeform Remover or no cutter grows nothing, so the Cutter node is a leaf and the caption or hint is the whole surface; see <a class="xref" href="freeform-remover-panel.html">Freeform Remover Panel</a>.</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-cutter file.</p>
<h2 id="features">Features</h2>
<p>Committing a type is one server call plus a cache clear. Milling Cutter calls <code>EnsureCutter</code>, which keeps the tool's existing MillingCutter and only creates one when the tool has none; None calls <code>ClearCutter</code>, which drops the tool's cutter altogether. The panel then clears the tool cache, re-reads the tool and emits a structure change for its own node, which is how the section tabs appear or disappear with the type.</p>
<p>Cache clearing is not a step the user performs. <a class="xref" href="../../../api/Hi.Machining.ICutter.html">ICutter</a> implements <a class="xref" href="../../../api/Hi.Common.IClearCache.html">IClearCache</a>, and every cutter endpoint that changes a field or a geometry clears the cache server-side before it answers: the field endpoints call <code>ClearCache()</code> on the milling cutter directly, while the ones that change flute or beam geometry go through the controller's resync hook, which clears the cache <em>and</em> re-aligns the tool's holder-to-cutter anchor transformer so the cutter is re-placed under the holder at its new height. On top of that the panels call <code>clearToolCache(toolId)</code>, which clears the tool's cached solids and the holder's, so the tool canvas redraws.</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/ToolCutterPanel.vue</code> — the Cutter node's panel: the Milling Cutter / Freeform Remover / None selector, the Shank Mass / Hone Radius / Relief Angle fields, the Freeform Remover caption and the no-cutter hint. Commits a type change through <code>ensureCutter</code> or <code>clearCutter</code> followed by <code>clearToolCache</code>.</li>
<li><code>wwwroot-src/src/components/controlTree/toolHouseItemTypes.ts</code> — registers this panel as the <code>ToolCutter</code> item type; its cutter child builder grows the section tabs only for a MillingCutter, and gates Material on the Advanced Physics preference.</li>
<li><code>wwwroot-src/src/components/controlTree/toolhouse/CutterSectionPanel.vue</code> and <code>wwwroot-src/src/components/controlTree/toolhouse/CutterContoursPanel.vue</code> — the panels those section nodes render.</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/components/widgets/ObjectManagementMenuButton.vue</code> — the reused object-management dropdown that root panel mounts.</li>
<li><code>wwwroot-src/src/components/widgets/NumericInput.vue</code> — the shared numeric field behind the three General inputs; it commits on blur or Enter and reverts an unparseable entry.</li>
<li><code>wwwroot-src/src/pages/ToolHousePage.vue</code> — the routed page that hosts the tool list and the tab cascade this panel appears in; the route is <code>/tool-house/:toolId?/:tab?/:subtab?</code>.</li>
<li><code>wwwroot-src/src/i18n/en/toolhouse.ts</code> — the <code>toolhouse.cutter.*</code> strings this panel renders: cutterType, shankMass, honeRadius, reliefAngle, sectionsHint, freeformRemoverUnavailable, noCutterHint, millingCutter, freeformRemover. The None option's label comes from <code>common.options.none</code> in <code>wwwroot-src/src/i18n/en/common.ts</code>.</li>
<li><code>wwwroot-src/src/api/toolHouse.ts</code> — the typed wrapper: <code>/api/ToolHouse</code> for the house and the tool-level fields, <code>/api/Cutter</code> for every cutter mutation, plus <code>ensureCutter</code>, <code>clearCutter</code>, <code>setGeneral</code> and <code>clearToolCache</code>.</li>
<li><code>Mech/CutterController.cs</code> — the cutter backend at <code>/api/Cutter</code>: <code>EnsureCutter</code> / <code>ClearCutter</code>, the shaper-profile, fluting, general and opt-limit endpoints, the upper-beam endpoints and the material and coating-layer endpoints. Every field and geometry mutator clears the cutter cache before it answers.</li>
<li><code>Mech/CutterDtoBuilder.cs</code> — the single source of truth for the read-side cutter DTO (integralMode, general, shaperProfile, fluting, optLimit, material), shared by <code>CutterController</code> and the tool detail in <code>ToolHouseController</code>.</li>
<li><code>Mech/ToolHouseController.cs</code> — the tool detail that embeds that cutter DTO and that this panel reads on mount, plus the tool-cache clear the panel calls after every commit.</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>