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/general-setup/fixture.html
T
2026-09-11 03:46:11 +08:00

271 lines
16 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fixture | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Fixture | 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-Fixture">
<h1 id="fixture">Fixture</h1>
<p>The fixture is what holds the workpiece on the machine table: one geometry, and the two anchor
transformers that place that geometry against the workpiece and against the table. It has two
surfaces:</p>
<ul>
<li>the <code>equipment/fixture</code> branch of the General Setup page's Control Tree
(<code>/general-setup?tree=equipment/fixture</code>), an equipment child of the General Setup group between
Coolant and Workpiece. <code>/fixture</code> and anything below it redirects there.</li>
</ul>
<p>It edits the one fixture the project owns.</p>
<ul>
<li>Key Model:
<ul>
<li><a class="xref" href="../../api/Hi.NcMech.Fixtures.Fixture.html">Fixture</a>
It is addressed by an IndexService key handed to the
<a class="xref" href="../widget/object-management-menu-button.html">Object Management Menu Button</a> and installed back onto
the project through the controller's UpdateFixture.</li>
</ul>
</li>
<li>Assistant Model:
<ul>
<li><a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> — owns the fixture as
<a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_Fixture">Fixture</a>.</li>
</ul>
</li>
</ul>
<p>There is no fixture-only canvas: the branch shares the General Setup canvas, whose displayee is the
equipment-setup displayee (<code>Disp/EquipmentSetupDisplayee.cs</code>) — the merged fixture + workpiece scene
with the anchor, buckle and controller-coordinate overlays. Its option set is the equipment-setup
config (<code>Disp/EquipmentSetupDisplayeeConfig.cs</code>), carried on <code>UserService.UserConfig</code> as its
<code>EquipmentSetupDisplayeeConfig</code> property.</p>
<h2 id="layout">Layout</h2>
<h3 id="control-tree-branch">Control Tree Branch</h3>
<p>The root panel is rendered inline by the dock's primary editor pane, so it has no title label of its
own — the wrapping expansion header carries the selection breadcrumb. Every item below is a tree
node whose editor is swapped into that same PRIMARY row.</p>
<ul>
<li>Fixture Root Panel — <code>equipment/fixture</code>, item type <code>FixtureRoot</code>
<ul>
<li><a class="xref" href="../widget/object-management-menu-button.html">Object Management Menu Button</a> — file extension
<code>.Fixture</code>, load type <code>Hi.NcMech.Fixtures.Fixture, HiMech</code>, rel file <code>Fixture.xml</code>, based at the
project directory. Load / Save As / Copy / Paste / XML.</li>
<li>Geometry Type Badge — the attached geometry's kind name, <code>none</code> when the slot is empty.</li>
<li>Intro caption, and an empty-state caption while no fixture key is minted.</li>
</ul>
</li>
<li><code>equipment/fixture/geometry</code> — &ldquo;Geometry&rdquo;, a Geometry slot backing
<a class="xref" href="../../api/Hi.NcMech.Fixtures.Fixture.html#Hi_NcMech_Fixtures_Fixture_Geom">Geom</a>. The slot's own panel is the kind picker
(<a class="xref" href="../geom/geometry-editor.html">Geometry Management Control</a>, selector only); the picked kind's
editor is the slot's child item. Kinds offered: <code>Box3d</code>, <code>Cylindroid</code>, <code>StlFile</code>,
<code>TransformationGeom</code>, <code>GeomCombination</code>, plus None. The geometry must satisfy <code>IStlSource</code>, so the
runtime-only voxel <code>CubeTreeFile</code> is not among them.</li>
<li><code>equipment/fixture/anchor</code> — &ldquo;Anchor&rdquo;, a Group stem whose info text states how the fixture is
placed. Two Transformer slots hang from it, each a kind picker
(<a class="xref" href="../geom/transformer-panel.html">Transformer Manage Panel</a>) over the picked kind's child editor:
<ul>
<li><code>equipment/fixture/geom-to-workpiece</code> — &ldquo;Geom To Workpiece&rdquo;,
<a class="xref" href="../../api/Hi.NcMech.Fixtures.Fixture.html#Hi_NcMech_Fixtures_Fixture_GeomToWorkpieceTransformer">GeomToWorkpieceTransformer</a>, which places the workpiece buckle
— where the workpiece attaches — relative to the fixture geometry (see
<a class="xref" href="workpiece.html">Workpiece</a>).</li>
<li><code>equipment/fixture/geom-to-table</code> — &ldquo;Geom To Table&rdquo;,
<a class="xref" href="../../api/Hi.NcMech.Fixtures.Fixture.html#Hi_NcMech_Fixtures_Fixture_GeomToTableTransformer">GeomToTableTransformer</a>, which pins the fixture geometry onto
the machine table buckle.</li>
<li>Kinds offered on both: <code>StaticTranslation</code>, <code>StaticRotation</code>, <code>StaticFreeform</code>,
<code>DynamicTranslation</code>, <code>DynamicRotation</code>, <code>GeneralTransform</code>, <code>NoTransform</code>.</li>
</ul>
</li>
<li>Shared slave view: the General Setup equipment canvas in the page's MAIN column, shared with
Machine Tool, Workpiece and Controller (see <a class="xref" href="index.html">General Setup Page</a>). Its
Display Options dropdown carries this branch's share of the scene — the <strong>Fixture</strong>
Solid / Edge / Hide radio group, and the Fixture Geom Anchor, Workpiece Buckle and Table Buckle
flags in the Anchors group.</li>
</ul>
<h2 id="behavior">Behavior</h2>
<ul>
<li><a class="xref" href="../../api/Hi.NcMech.Fixtures.Fixture.html#Hi_NcMech_Fixtures_Fixture_ClearGeomCache">ClearGeomCache()</a> runs after any change at or below the branch:
each node's afterChange chain ends in the controller's ClearGeometryCache, which calls it.</li>
<li>The two anchor slots re-commit their swap-in <em>before</em> clearing the cache: an inner-value edit
re-posts UpdateGeomToWorkpieceTransformer / UpdateGeomToTableTransformer, so the object the
switchboard produced is always the one installed on the owning field when the redraw happens.</li>
<li>Load / Paste / XML-Apply only swap the IndexService entry. The tree root then installs the result
onto the project through UpdateFixture — the equipment setter re-attaches the buckles itself —
re-runs Initialize to re-mint the branch's keys, and clears the geometry cache. The button's XML
dialog re-emits its object-loaded event on Apply, so that install and refresh chain runs exactly
once.</li>
<li>Kind pickers are parent-aware. Picking a geometry kind calls CreateGeometry, which installs the
new object on <a class="xref" href="../../api/Hi.NcMech.Fixtures.Fixture.html#Hi_NcMech_Fixtures_Fixture_Geom">Geom</a> server-side and maps the literal <code>None</code> to
null; picking a transformer kind creates the object and then rebinds the owning field.</li>
<li>The shared canvas snaps to the isometric view once, when its displayee is bound — the display controller's initialize does it server-side.
Afterwards a geometry set only clears the cache, and the operator re-frames from the
<a class="xref" href="../widget/renderingcanvas-tool-bar.html">RenderingCanvas Tool Bar</a>'s view picker.</li>
<li>Both canvases draw the live model, so an edit shows on the next frame with no further calls.</li>
</ul>
<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>
<h3 id="web-application">Web Application</h3>
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
<ul>
<li><code>wwwroot-src/src/components/controlTree/useControlTreeHost.ts</code> — builds the <code>equipment/fixture</code>
root (item type <code>FixtureRoot</code>, keyed on the IndexService fixture key) with its <code>geometry</code> slot and
the <code>anchor</code> Group holding <code>geom-to-workpiece</code> and <code>geom-to-table</code>; owns the clear-cache and
transformer-rebind afterChange chains, the create hooks and the Object Management install
handlers.</li>
<li><code>wwwroot-src/src/components/controlTree/PrimarySlavePanel.vue</code> — renders the root editor inline:
the Object Management button, the geometry-type badge and the intro / empty-state captions.</li>
<li><code>wwwroot-src/src/components/controlTree/itemTypes.ts</code> — the ItemType registry that binds the
branch's Geometry and Transformer slots and every concrete kind to their panels, and grows the
sub-tree from the indexed object's type.</li>
<li><code>wwwroot-src/src/components/controlTree/GeometrySlotPanel.vue</code> — the Geometry node's kind picker.</li>
<li><code>wwwroot-src/src/components/controlTree/TransformerSlotPanel.vue</code> — the Geom To Workpiece and
Geom To Table nodes' kind picker.</li>
<li><code>wwwroot-src/src/components/controlTree/SoleEditorPanel.vue</code> — hosts the concrete kind's own
editor once a geometry or transformer kind is chosen.</li>
<li><code>wwwroot-src/src/components/controlTree/ControlTreeDock.vue</code> — the left dock: the Control Tree row
over the PRIMARY editor row, with a draggable height divider.</li>
<li><code>wwwroot-src/src/pages/GeneralSetupPage.vue</code> — the three-column host page (dock / content column /
canvas) that provides the equipment-scope control-tree host.</li>
<li><code>wwwroot-src/src/components/mech/EquipmentSetupPanel.vue</code> — the shared canvas column: the
RenderingCanvasToolBar, the Display Options dropdown and the RenderingCanvas.</li>
<li><code>wwwroot-src/src/components/widgets/ObjectManagementMenuButton.vue</code> — the reused
object-management dropdown, keyed entirely on its <code>modelKey</code> (see
<a class="xref" href="../widget/object-management-menu-button.html">Object Management Menu Button</a>).</li>
<li><code>wwwroot-src/src/components/geom/GeometryEditor.vue</code> — the generic geometry kind switchboard
reached from the Geometry slot panel, including its None (unset) entry.</li>
<li><code>wwwroot-src/src/components/topo/TransformerSelectPanel.vue</code> — the generic transformer kind
switchboard reached from the Transformer slot panels.</li>
<li><code>wwwroot-src/src/api/fixture.ts</code> — typed client for <code>/api/Fixture/*</code>: Initialize, UpdateFixture,
the three Get…Type reads, UpdateGeometry, the two Update…Transformer rebinds, CreateGeometry and
ClearGeometryCache.</li>
<li><code>wwwroot-src/src/api/equipmentSetup.ts</code> — typed client for the shared canvas: binds the
equipment-setup displayee onto the connection's engine and drives its display options.</li>
<li><code>wwwroot-src/src/router/routes.ts</code> — declares <code>general-setup</code> and the <code>fixture/:rest(.*)*</code>
redirect onto <code>?tree=equipment/fixture</code>.</li>
<li><code>Mech/FixtureController.cs</code> — REST surface at <code>/api/Fixture</code>: Initialize, UpdateFixture,
GetGeometryType, GetGeomToWorkpieceType, GetGeomToTableType, UpdateGeometry,
UpdateGeomToWorkpieceTransformer, UpdateGeomToTableTransformer, CreateGeometry,
IndexCurrentGeometry and ClearGeometryCache.</li>
<li><code>Mech/EquipmentSetupDisplayController.cs</code> — <code>/api/mech/equipment-setup-display</code>: binds and
configures the displayee per rendering connection and serves its whole option set — the three
rendering-mode endpoints (fixture, raw-geom, ideal-geom), show-machine, show-tool,
show-dimension-bar, show-fixture-geom-anchor, show-workpiece-buckle, show-table-buckle,
show-workpiece-geom-anchor, show-program-zero-anchor, show-meshed-geom,
show-controller-coordinate and controller-coordinate-id.</li>
<li><code>Disp/EquipmentSetupDisplayee.cs</code> — the displayee the General Setup canvas renders: the merged
fixture + workpiece scene with the anchor, buckle and controller-coordinate overlays.</li>
</ul>
<h3 id="hiapi-engine">HiAPI Engine</h3>
<ul>
<li><code>HiMech/NcMech/Fixtures/Fixture.cs</code> — the key model: the geometry, the table and workpiece
buckles, the geom anchor, the two anchor transformers and ClearGeomCache.</li>
</ul>
<h2 id="see-also">See Also</h2>
<ul>
<li><a class="xref" href="../util/mech-builder.html">Mechanism Builder Page</a> — reuses this page’s parent-aware transformer rebind pattern</li>
<li><a class="xref" href="../tool-house/holder/freeform-holder-panel.html">Freeform Holder Panel</a> — the other surface built from the same generic Geometry and Transformer slots</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>