Fixture
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:
- the
equipment/fixturebranch of the General Setup page's Control Tree (/general-setup?tree=equipment/fixture), an equipment child of the General Setup group between Coolant and Workpiece./fixtureand anything below it redirects there; - in the WPF client, a sub-window opened from the Main Panel.
Both edit the one fixture the project owns.
- Key Model:
- Fixture On the web it is addressed by an IndexService key handed to the Object Management Menu Button and installed back onto the project through the controller's UpdateFixture. On the WPF client the same button is wired with a TargetObjectGetter / TargetObjectSetter pair (see that page for the design pattern).
- Assistant Model:
- LocalProjectService — owns the fixture as Fixture.
The displayee differs by client. The web branch has no fixture-only canvas: it shares the General
Setup canvas, whose displayee is the equipment-setup displayee (Disp/EquipmentSetupDisplayee.cs) —
the merged fixture + workpiece scene with the anchor, buckle and controller-coordinate overlays. Its
option set is the equipment-setup config (Disp/EquipmentSetupDisplayeeConfig.cs), carried on
UserService.UserConfig as its EquipmentSetupDisplayeeConfig property. The WPF sub-window has a
canvas of its own, whose displayee is FixtureEditorDisplayee configured by
FixtureEditorDisplayeeConfig, taken from UserService.UserConfig as its
FixtureSetupDisplayeeConfig property.
Layout
Control Tree Branch
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.
- Fixture Root Panel —
equipment/fixture, item typeFixtureRoot- Object Management Menu Button — file extension
.Fixture, load typeHi.NcMech.Fixtures.Fixture, HiMech, rel fileFixture.xml, based at the project directory. Load / Save As / Copy / Paste / XML. - Geometry Type Badge — the attached geometry's kind name,
nonewhen the slot is empty. - Intro caption, and an empty-state caption while no fixture key is minted.
- Object Management Menu Button — file extension
equipment/fixture/geometry— “Geometry”, a Geometry slot backing Geom. The slot's own panel is the kind picker (Geometry Management Control, selector only); the picked kind's editor is the slot's child item. Kinds offered:Box3d,Cylindroid,StlFile,TransformationGeom,GeomCombination, plus None. The geometry must satisfyIStlSource, so the runtime-only voxelCubeTreeFileis not among them.equipment/fixture/anchor— “Anchor”, a Group stem whose info text states how the fixture is placed. Two Transformer slots hang from it, each a kind picker (Transformer Manage Panel) over the picked kind's child editor:equipment/fixture/geom-to-workpiece— “Geom To Workpiece”, GeomToWorkpieceTransformer, which places the workpiece buckle — where the workpiece attaches — relative to the fixture geometry (see Workpiece).equipment/fixture/geom-to-table— “Geom To Table”, GeomToTableTransformer, which pins the fixture geometry onto the machine table buckle.- Kinds offered on both:
StaticTranslation,StaticRotation,StaticFreeform,DynamicTranslation,DynamicRotation,GeneralTransform,NoTransform.
- Shared slave view: the General Setup equipment canvas in the page's MAIN column, shared with Machine Tool, Workpiece and Controller (see General Setup Page). Its Display Options dropdown carries this branch's share of the scene — the Fixture Solid / Edge / Hide radio group, and the Fixture Geom Anchor, Workpiece Buckle and Table Buckle flags in the Anchors group.
WPF Page
- Head Line
- Object Management Menu Button — file extension
.Fixture, load type Fixture, rel fileFixture.xml. The pointed Editor Panel is the Management Tabs Panel, a ContentPresenter the button swaps between the tab stack and XML mode. - Title Label
- Object Management Menu Button — file extension
- Management Tabs Panel — the same content the tree renders as nodes, stacked as tabs:
- Geometry Tab — Geometry Management Control over Geom.
- Anchor Tab — a nested tab stack, each tab a
Transformer Manage Panel:
- Geom To Workpiece Tab
- Geom To Table Tab
- Viewer Panel
- Viewer ToolBar
- RenderingCanvas Tool Bar
- Display Options menu — the Show Geom Anchor, Show Workpiece Buckle and Show Table Buckle checkboxes and the Solid / Edge / Hide rendering-mode radio group, all writing FixtureEditorDisplayeeConfig.
- RenderingCanvas — its DispEngine.Displayee is FixtureEditorDisplayee.
- Viewer ToolBar
Both clients put a draggable divider between the editor column and the canvas: a GridSplitter in the WPF page, nested draggable splitters on the web page (dock / content column / canvas), plus the dock's own height divider between the tree row and the editor row.
Behavior
- ClearGeomCache() runs after any change at or below the branch. On the web each node's afterChange chain ends in the controller's ClearGeometryCache, which calls it; in WPF the page calls it directly from the geometry control's setter and update callbacks.
- The two anchor slots re-commit their swap-in before 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.
- 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.
- Kind pickers are parent-aware. Picking a geometry kind calls CreateGeometry, which installs the
new object on Geom server-side and maps the literal
Noneto null; picking a transformer kind creates the object and then rebinds the owning field. - View snapping differs by client. The WPF page snaps its canvas to the isometric view when the displayee is bound, and again whenever a new geometry object is set, on the assumption that a shape swap changes the scene more than an edit within one shape does. The shared web canvas snaps 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 RenderingCanvas Tool Bar's view picker.
- Both canvases draw the live model, so an edit shows on the next frame with no further calls.
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 theequipment/fixtureroot (item typeFixtureRoot, keyed on the IndexService fixture key) with itsgeometryslot and theanchorGroup holdinggeom-to-workpieceandgeom-to-table; owns the clear-cache and transformer-rebind afterChange chains, the create hooks and the Object Management install handlers.wwwroot-src/src/components/controlTree/PrimarySlavePanel.vue— renders the root editor inline: the Object Management button, the geometry-type badge and the intro / empty-state captions.wwwroot-src/src/components/controlTree/itemTypes.ts— 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.wwwroot-src/src/components/controlTree/GeometrySlotPanel.vue— the Geometry node's kind picker.wwwroot-src/src/components/controlTree/TransformerSlotPanel.vue— the Geom To Workpiece and Geom To Table nodes' kind picker.wwwroot-src/src/components/controlTree/SoleEditorPanel.vue— hosts the concrete kind's own editor once a geometry or transformer kind is chosen.wwwroot-src/src/components/controlTree/ControlTreeDock.vue— the left dock: the Control Tree row over the PRIMARY editor row, with a draggable height divider.wwwroot-src/src/pages/GeneralSetupPage.vue— the three-column host page (dock / content column / canvas) that provides the equipment-scope control-tree host.wwwroot-src/src/components/mech/EquipmentSetupPanel.vue— the shared canvas column: the RenderingCanvasToolBar, the Display Options dropdown and the RenderingCanvas.wwwroot-src/src/components/widgets/ObjectManagementMenuButton.vue— the reused object-management dropdown, keyed entirely on itsmodelKey(see Object Management Menu Button).wwwroot-src/src/components/geom/GeometryEditor.vue— the generic geometry kind switchboard reached from the Geometry slot panel, including its None (unset) entry.wwwroot-src/src/components/topo/TransformerSelectPanel.vue— the generic transformer kind switchboard reached from the Transformer slot panels.wwwroot-src/src/api/fixture.ts— typed client for/api/Fixture/*: Initialize, UpdateFixture, the three Get…Type reads, UpdateGeometry, the two Update…Transformer rebinds, CreateGeometry and ClearGeometryCache.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.wwwroot-src/src/router/routes.ts— declaresgeneral-setupand thefixture/:rest(.*)*redirect onto?tree=equipment/fixture.Mech/FixtureController.cs— REST surface at/api/Fixture: Initialize, UpdateFixture, GetGeometryType, GetGeomToWorkpieceType, GetGeomToTableType, UpdateGeometry, UpdateGeomToWorkpieceTransformer, UpdateGeomToTableTransformer, CreateGeometry, IndexCurrentGeometry and ClearGeometryCache.Mech/EquipmentSetupDisplayController.cs—/api/mech/equipment-setup-display: 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.Disp/EquipmentSetupDisplayee.cs— the displayee the General Setup canvas renders: the merged fixture + workpiece scene with the anchor, buckle and controller-coordinate overlays.
HiAPI Engine
HiMech/NcMech/Fixtures/Fixture.cs— the key model: the geometry, the table and workpiece buckles, the geom anchor, the two anchor transformers and ClearGeomCache.HiMech/NcMech/Fixtures/FixtureEditorDisplayee.cs— the WPF fixture canvas's displayee.HiMech/NcMech/Fixtures/FixtureEditorDisplayeeConfig.cs— its option set: ShowGeomAnchor, ShowWorkpieceBuckle, ShowTableBuckle and the rendering mode.
See Also
- Mechanism Builder Page — reuses this page’s parent-aware transformer rebind pattern