This commit is contained in:
2026-09-09 18:06:21 +08:00
parent 161af68fe3
commit 45b9f9ed5d
79 changed files with 1167 additions and 1532 deletions
@@ -89,7 +89,7 @@
<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>On the web client 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>. In the WPF client the same surface is the Cutter Management Panel embedded in the tool's editor.</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>
@@ -105,7 +105,7 @@
<li>Sections Hint Caption — points at the section tabs below</li>
</ul>
</li>
<li>Freeform Remover branch — one caption, <code>toolhouse.cutter.freeformRemoverUnavailable</code>, sending the reader to the WPF client or HiNcRcl</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>
@@ -113,39 +113,8 @@
<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>
<h3 id="wpf-layout">WPF Layout</h3>
<ul>
<li>Cutter Management Panel
<ul>
<li>Head Line
<ul>
<li><a class="xref" href="../../widget/object-management-menu-button.html">Object Management Menu Button</a>
<ul>
<li>File extension is <code>.Cutter</code>, load type <a class="xref" href="../../../api/Hi.Machining.ICutter.html">ICutter</a></li>
<li>The pointed Editor Panel is the cutter content presenter below</li>
</ul>
</li>
<li>Title Label</li>
<li>Cutter Type Selection Dropdown
<ul>
<li>Options: Milling Cutter, Freeform Remover, Unset</li>
</ul>
</li>
</ul>
</li>
<li>Cutter Content Presenter
Varies by the Cutter Type. It can be:
<ul>
<li><a class="xref" href="milling-cutter-panel.html">Milling Cutter Panel</a></li>
<li><a class="xref" href="freeform-remover-panel.html">Freeform Remover Panel</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<p>The per-cutter <code>.Cutter</code> file is this client's, and so is the third option's Unset wording; the web selector's third option reads None.</p>
<h2 id="features">Features</h2>
<p>Committing a type on the web 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>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>