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
@@ -98,7 +98,7 @@
<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>On the web client 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>
<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>
@@ -121,33 +121,8 @@
<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>
<h3 id="wpf-layout">WPF Layout</h3>
<ul>
<li>Holder 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>.Holder</code>, load type <a class="xref" href="../../../api/Hi.NcMech.Holders.IHolder.html">IHolder</a></li>
<li>The pointed Editor Panel is the Holder Sub Management Panel.</li>
</ul>
</li>
<li>Title Label</li>
</ul>
</li>
<li>Holder Management Panel
<ul>
<li>Holder Type Selection Bar — None / Cylindroid / Freeform</li>
<li>Holder Sub Management Panel
A ContentPresenter whose content varies by the Holder Type: the <a class="xref" href="cylindroid-holder-panel.html">Cylindroid Holder Panel</a>, the <a class="xref" href="freeform-holder-panel.html">Freeform Holder Panel</a>, or nothing for None.</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2 id="feature">Feature</h2>
<p>Committing a type on the web 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>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>