Table of Contents

Fixture

The fixture is what holds the workpiece on the machine table. It is a mechanism of its own: an assembly of anchors and branches, solids hung on some of those anchors, and three roles naming which of its own anchors do the fixture's work — the Table Mount, where the machine's worktable end attaches; the Workpiece Mount, where the workpiece attaches; and the Geometry Anchor, which carries the fixture's solid and is its collision anchor. It has one surface:

  • the equipment/mechanism/fixture item of the Equipment page's Control Tree (/equipment?tree=equipment/mechanism/fixture), the leaf under the Mechanism root between Machine Tool and Workpiece. /fixture and anything below it redirects there, and the migrateLegacyTreeId hops land a legacy ?tree= id on the same root: the equipment/fixture spelling, and the item's retired child ids — geometry, geom-to-table, geom-to-workpiece and anchor — with anything below them.

The item edits the one fixture the project owns. Its panel is the file surface and the roles; the fixture's anchors, branches, transformers and solids are edited in the page's Topology column, on the Fixture cluster of the equipment graph.

There is no fixture-only canvas: the item shares the Equipment canvas, whose displayee is the equipment-setup displayee (Disp/EquipmentSetupDisplayee.cs) — the merged fixture + workpiece scene with the anchor, mount and controller-coordinate overlays. Its option set is the equipment-setup config (Disp/EquipmentSetupDisplayeeConfig.cs), carried on UserService.UserConfig as its EquipmentSetupDisplayeeConfig property.

Layout

Control Tree Item

The root panel is rendered inline in the page's editor column, so it has no title label of its own — the column's title bar carries the selection breadcrumb.

  • Fixture Root Panel — equipment/mechanism/fixture, item type FixtureRoot, a leaf.
    • Object Management Menu Button — file extension .Fixture, load type Hi.NcMech.Fixtures.Fixture, HiMech, rel file Fixture.xml, based at the project directory. Load / Save As / Copy / Paste / XML.
    • Intro caption, and an empty-state caption while no fixture key is minted.
    • Roles — the mechanism roles panel for owner fixture, one row per role: the label, a caption (Anchor, required), a select over the fixture's own anchors, and an arm button (a target icon, tooltip “Pick on the graph”) that binds the role to the next matching element clicked in the Topology column. The three roles, all required and all anchors: Table Mount (TableMount), Workpiece Mount (WorkpieceMount) and Geometry Anchor (GeomAnchor). Below the list the server's checks on the current binding are listed, or “All checks pass.” The checks a fixture can raise: Unbound (a required role has no anchor), NotOwn (bound outside the fixture's own assembly), Duplicate (one anchor plays two roles) and NotReachable (no branch chain leads from the root anchor to it). With no fixture mounted, the panel shows “Not mounted.” instead of the rows.
  • Shared slave view: the Equipment canvas in the page's CANVAS column, shared with Machine Tool, Workpiece and Controller (see Equipment Page). Its Display Options dropdown carries this item's share of the scene — the Fixture Rendering Mode Solid / Edge / Hide radio group, the Fixture Geometry Anchor, Workpiece Mount and Table Mount flags in the Anchors group, and Role Anchors (show-role-anchors, off by default), which draws the axes of every bound role anchor — the fixture's three among them.

The Fixture in the Topology Column

The Topology column draws the whole authored equipment as one graph, one cluster per part; the fixture's cluster is titled with its assembly's name (Fixture in the default shape) and tagged Fixture, its role anchors carry the badges Fixture · Table Mount, Fixture · Workpiece Mount and Fixture · Geometry Anchor, and dotted edges show the attachments the equipment makes to it. Clicking the cluster selects equipment/mechanism/fixture in the Control Tree. What the editor card under the graph offers on a fixture element is the column page's subject; the parts that are fixture-specific:

  • Anchor geometry. Any fixture anchor may carry a solid (the Geometry checkbox; kinds Box3d, Cylindroid, StlFile, GeomCombination; a Transform picker that places the picked kind in place through set-geom-transform; plus the display colour). The Geometry Anchor keeps its solid: unticking Geometry on it is refused (disable-geom answers 409 GeomAnchorKeepsItsSolid). The card's kind picker offers no None, so the column can switch that geometry to another kind but not empty it; a script empties it with create-geom?geometryType=None.
  • Branch transformers. Each branch of the fixture's own assembly carries a transformer, edited through the shared Transformer switchboard: StaticTranslation, StaticRotation, StaticFreeform, DynamicTranslation, DynamicRotation, GeneralTransform, NoTransform. In the default shape the root is the Geometry Anchor and one branch leads from it to each mount, so the branch to the Table Mount places the fixture on the table and the branch to the Workpiece Mount places the workpiece on the fixture.
  • The worktable attachment. The dotted edge from the machine's table end to the fixture's Table Mount is the one attachment with an editable transformer — the equipment's TableToComp, owner equipment. The edge from the Workpiece Mount to the workpiece's Fixture Mount follows the roles and shows “Only the worktable attachment carries an editable transformer; the other attachments follow their roles.”

Behavior

  • Roles and solids are kept apart. A role setter checks one thing — the anchor is inside the fixture's assembly — and touches no solid; Solid is a read of AnchorToSolid on the Geometry Anchor, or null. An incomplete fixture (a role unbound, a geometry anchor without a solid) is a legitimate state: the equipment attaches only bound roles, the roles panel lists the check, and a run start names what is missing.
  • Binding a role posts roles/fixture/{role} with the anchor's guid (empty unbinds). The server answers the refreshed roles; RoleElementTaken (409) when the anchor already plays another role. After a bind the equipment rewires, its attachment branches are re-minted, and the column pulls the graph again rather than patching it.
  • Every topology edit rewires the equipment and redraws the canvas: the controller's AfterEdit calls the setup's Rewire, so a rebound mount or a changed transformer shows on the next frame with no further calls. A value edit inside an anchor's geometry ends in refresh-geom-cache, which clears the cached triangulation of that anchor's own solid (for the Geometry Anchor this is the same clear ClearGeomCache() runs).
  • 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 mounts itself — re-runs Initialize to re-mint the fixture key, and pulls the topology again, since a new fixture is a new assembly with its own roles. The button's XML dialog re-emits its object-loaded event on Apply, so that install and refresh chain runs exactly once.
  • Program-zero alignment writes to the fixture: align-workpiece-program-zero on the Controller's ISO coordinate table rewrites the transformer of the fixture branch that leads from its Geometry Anchor straight to its Table Mount, as a static translation. A fixture with no such branch, or one whose branch carries a dynamic transformer, has nowhere for the alignment to write and the call is refused (see Program Zero Alignment).
  • Files. A fixture is written with its topology embedded (assembly, root, anchor-to-solid dictionary, every transformer inside its branch) and its three roles as anchor references. A file without an embedded topology loads onto the default shape.
  • The shared canvas snaps to the isometric view once, when its displayee is bound — the display controller's initialize does it server-side. Afterwards the operator re-frames from the RenderingCanvas Tool Bar's view picker.

HTTP Surface

  • /api/Fixture — POST Initialize?sessionKey=S answers { sessionKey, fixtureKey } (S-Fixture, the key the Object Management button works on; 404 while the project has no fixture); POST UpdateFixture?fixtureKey= installs the indexed fixture onto the project.
  • /api/mech/equipment-topology, owner fixture — the fixture's anchors, branches, transformers, solids and roles: GET graph, GET roles/fixture, POST roles/fixture/{role}, {owner}/anchor/… and {owner}/branch/…. The route list and the error codes are on the Topology column page; the transformer of a fixture branch is indexed under equipment-topology.fixture.branch.<guid>.transformer.
  • /api/Controller/iso-coordinate-table/{index}/align-workpiece-program-zero and /api/Controller/iso-coordinate-table/revert-align-workpiece-program-zero — the alignment that writes the fixture's table branch, and its revert.

Source Code Path

See HiNC App Anatomy for git repository links.

Web Application

HiNC-2025-webservice (Quasar CLI SPA):

  • wwwroot-src/src/components/controlTree/useControlTreeHost.ts — builds the equipment/mechanism/fixture leaf (item type FixtureRoot, keyed on the IndexService fixture key); owns the fixture Initialize / UpdateFixture chain behind the Object Management events and the topology re-pull that follows a replaced fixture.
  • wwwroot-src/src/components/controlTree/PrimarySlavePanel.vue — renders the root editor inline: the Object Management button, the intro / empty-state captions and the Roles panel.
  • wwwroot-src/src/components/mech/MechanismRolesPanel.vue — the Roles panel: one row per role with its select and arm button, and the server's checks below.
  • wwwroot-src/src/components/mech/EquipmentTopologyPanel.vue — the Topology column: the graph of the equipment and the editor card for the selected anchor, branch or cluster.
  • wwwroot-src/src/components/mech/MechBuilderGraph.vue — the mermaid graph view, drawing the Fixture cluster, its role badges and the attachment edges.
  • wwwroot-src/src/composables/useEquipmentTopology.ts — the shared topology state: graph, roles, selection, the armed role, and the serialized refresh.
  • wwwroot-src/src/api/equipmentTopology.ts — typed client for /api/mech/equipment-topology.
  • wwwroot-src/src/api/fixture.ts — typed client for /api/Fixture/*: Initialize and UpdateFixture.
  • wwwroot-src/src/api/equipmentSetup.ts — typed client for the shared canvas: binds the equipment-setup displayee onto the connection's engine and drives its display options, show-role-anchors among them.
  • wwwroot-src/src/components/topo/TransformerSelectPanel.vue — the transformer kind switchboard the Topology column's branch editor mounts.
  • wwwroot-src/src/components/geom/GeometryEditor.vue — the geometry kind switchboard the Topology column's anchor editor mounts.
  • wwwroot-src/src/components/mech/EquipmentSetupPanel.vue — the shared canvas column: the RenderingCanvasToolBar, the Display Options dropdown and the RenderingCanvas.
  • wwwroot-src/src/pages/EquipmentPage.vue — the four-column host page (Control Tree / editor / canvas / Topology) that provides the equipment-scope control-tree host.
  • wwwroot-src/src/components/widgets/ObjectManagementMenuButton.vue — the reused object-management dropdown, keyed entirely on its modelKey (see Object Management Menu Button).
  • wwwroot-src/src/router/routes.ts — declares equipment and the fixture/:rest(.*)* redirect onto ?tree=equipment/mechanism/fixture.
  • wwwroot-src/src/router/treeRoutes.ts — the legacy tree-id hops that land a retired fixture child id on the fixture root.
  • Mech/FixtureController.cs — REST surface at /api/Fixture: Initialize and UpdateFixture.
  • Mech/Topology/EquipmentTopologyController.cs — /api/mech/equipment-topology: the graph, the roles and the anchor / branch / geometry / transformer edits per owner, rewiring the equipment after each edit.
  • Mech/Topology/EquipmentRoles.cs — the role catalogue per mechanism type (the fixture's three) and the checks.
  • Mech/Topology/TopologyEditService.cs — the anchor, branch, solid and transformer edits on one mechanism's assembly.
  • Mech/Topology/TopologyGraphBuilder.cs and Mech/Topology/TopologyGraphDto.cs — the graph the column draws, clusters, role badges and attachments included.
  • Controller/ControllerController.cs — the align / revert-align program-zero actions that write the fixture's table branch.
  • Mech/EquipmentSetupDisplayController.cs — /api/mech/equipment-setup-display: binds and configures the displayee per rendering connection and serves its option set, including the fixture rendering mode, the fixture anchor flags and show-role-anchors.
  • Disp/EquipmentSetupDisplayee.cs — the displayee the Equipment canvas renders: the merged fixture + workpiece scene with the anchor, mount and controller-coordinate overlays.

HiAPI Engine

  • HiMech/NcMech/Fixtures/Fixture.cs — the key model: the assembly, root and anchor-to-solid dictionary, the three role properties, Solid and Geom read from the Geometry Anchor, HangSolid, CreateDefault and the embedded / legacy XML shapes.
  • HiMech/Machining/MachiningEquipmentUtils/EquipmentWiring.cs — the attachments the equipment makes to the fixture's mounts on every rewire.
  • HiMech/Machining/MachiningEquipmentUtils/MachiningEquipmentUtil.cs — the program-zero alignment that writes the branch from the Geometry Anchor to the Table Mount.

See Also

  • Equipment Topology Column — where the fixture's anchors, branches, transformers and solids are edited, and the full route and error list
  • Workpiece — the part this fixture holds, attached to its Workpiece Mount through the workpiece's Fixture Mount
  • Machine Tool — the chain whose table end attaches to this fixture's Table Mount through the worktable attachment
  • Transformers — the switchboard the fixture's branch transformers are picked from
  • Freeform Holder Panel — a Tool House surface that edits its geometry and placement through slot nodes rather than a topology graph
  • Program Zero Alignment — the task that writes the fixture's table branch to put program zero on a recorded offset
  • Object Store (IndexService) — the keyed store the fixture key and the topology's transformer keys live in
  • Driving the Web Service over HTTP — the fixture and topology routes driven by a script