Workpiece
The Workpiece editor is the equipment/workpiece branch of the General Setup page's Control Tree (/general-setup?tree=equipment/workpiece); the old /workpiece route redirects there.
The key model is Workpiece, taken from the Main Panel's Workpiece. The cached solids it is drawn from belong to WorkpieceService.
The branch has no display config of its own: it shares the General Setup canvas, gated by the equipment-setup config (Disp/EquipmentSetupDisplayeeConfig.cs), which carries
the fixture and workpiece flags together — the fixture and workpiece geometry anchors keep separate
flags, while the fixture↔workpiece buckle pair, being one attached identity at one location, is a
single flag.
Layout
Control Tree Branch
- Workpiece Root — a summary panel, rendered inline by the dock's primary editor pane. It carries no
Object Management button: the workpiece has no standalone
.Workpiecefile surface here, and its geometry, anchors, mesh and material are all edited through the child items below.- Raw Geometry Type Badge and Target Geometry Type Badge (
nonewhen the slot is empty) - Intro caption, and an empty-state caption while the project has no workpiece
- Raw Geometry Type Badge and Target Geometry Type Badge (
equipment/workpiece/raw-geometry— “Raw Geometry”, a Geometry slot backing InitGeom. 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,CubeTreeFile, plus None.ExtendedCylinderis anIMakeXmlSourceand was offered here until its start section — wired by a host, never serialized — was found to reload a saved project degenerate; see ExtendedCylinder Editor for what an older project holding one still shows. The source choice folds into that one picker — picking the voxelCubeTreeFile, which the picker shows asMeshedGeomFile, is the meshed source (see MeshedGeomFile Editor).equipment/workpiece/target-geometry— “Target Geometry”, the same slot shape backing IdealGeom. Kinds offered:Box3d,Cylindroid,StlFile,TransformationGeom, plus None. The target must satisfyIGetStl, soCubeTreeFileis not among them.equipment/workpiece/anchor— “Anchor”, a Group stem whose info text states how the workpiece is placed. Two Transformer slots hang from it, each a kind picker (Transformer Manage Panel) over the picked kind's child editor:.../anchor/geom-to-fixture— “Geom To Fixture”, which positions the workpiece geometry on the fixture's workpiece buckle (see Fixture)..../anchor/geom-to-program-zero— “Geom To Program Zero”, which places the program zero, the NC origin, relative to the workpiece geometry.
equipment/workpiece/runtime— labelled Mesh in the tree.- Initial Resolution Select (InitResolution, in mm), a
fifteen-step powers-of-two ladder:
- 0.0009765625
- 0.001953125
- 0.00390625
- 0.0078125
- 0.015625
- 0.03125
- 0.0625
- 0.125
- 0.25
- 0.5
- 1
- 2
- 4
- 8
- 16
- Hint caption: a smaller resolution means a finer voxel grid and a slower runtime simulation.
- The engine's own ladder bottoms out at
0.001953125, so the first entry builds the same mesh as the second. Values typed in from elsewhere are rounded to the next finer rung rather than used as given — see Mesh Resolution. - The panel self-gates on the project having a workpiece.
- Initial Resolution Select (InitResolution, in mm), a
fifteen-step powers-of-two ladder:
equipment/workpiece/material— “Material”, a Group stem whose info text names the two pre-prepared resources loaded by reference. Present whenever the project has a workpiece; nothing on this branch gates it on a physics flag. Its two children share one panel, which reads its role from the node's own path:.../material/workpiece-material—.WorkpieceMaterialfiles, seeded to the resource root'sWorkpieceMaterialfolder..../material/cutting-parameter—.mpfiles, seeded to the resource root'sCuttingParameterfolder.- Each child is one Resource-only File Path Input — the project-directory Browse entry is suppressed, leaving the Resource-root pick — plus a readonly Name field (Name) and a readonly Note field (Note).
Page Frame
- The General Setup page lays the tree dock, the content column and the equipment canvas out in nested splitters with device-local widths; inside the dock, a height divider between the Control Tree row and the primary editor row trades their heights. See General Setup Page.
- Canvas Column — one RenderingCanvas bound to the equipment-setup displayee
(
Disp/EquipmentSetupDisplayee.cs): the merged fixture + workpiece setup scene, with optional machine and tool solids.- RenderingCanvas Tool Bar
- Display Options Menu — six groups; the workpiece's own entries are in bold:
- Solid — Machine, Tool, Meshed Geometry
- Fixture Rendering Mode — Solid / Edge / Hide
- Raw Shape Rendering Mode — Solid / Edge / Hide
- Target Shape Rendering Mode — Solid / Edge / Hide
- Anchors — Fixture Geometry Anchor, Workpiece Buckle (the one flag for the fixture↔workpiece pair), Table Buckle, Workpiece Geometry Anchor, Program-Zero Anchor, Controller Coordinate
- Display Aids — Dimension Bar
Default Resource
The default resources of Workpiece Material and Cutting Parameter exist in Resource folder under application folder (Not project folder). Both clients seed their file pickers at the matching Resource sub folder:
- “Resource/WorkpieceMaterial”
- “Resource/CuttingParameter”
Behavior
A geometry slot's edit re-commits the swap-in before clearing the cache. The canvas draws the runtime face's solids, and that face follows an authored edit only by rebuild, so a bare cache clear would re-solidify a stale face. The re-commit is skipped when the slot is cleared to None: None leaves the old object indexed, and re-committing would resurrect it.
Call WorkpieceService.ClearRawGeomCache() on Raw Shape set or changed.
Call WorkpieceService.ClearIdealGeomCache() on Target Shape set or changed.
The branch reaches that service by posting the controller's cache-clear endpoints.
Anchor edits re-commit their transformer and deliberately do not clear the geometry cache, so a placement change forces no
CubeTreeFilere-mesh.The Mesh item's Initial Resolution feeds the runtime voxel simulation, not the setup canvas, so no cache chain runs after a change.
The equipment canvas snaps to the isometric view when its displayee is bound to a rendering connection; a shape edit on the branch re-commits and clears the cache so the next frame re-solidifies, and leaves the view alone.
Keep Portability of the Material properties.
Source Code Path
See HiNC App Anatomy for git repository links.
HiNC-2025-webservice (Quasar CLI SPA):
wwwroot-src/src/components/controlTree/useControlTreeHost.ts— builds the wholeequipment/workpiecebranch: the root, the two geometry slots, the anchor group with its two transformer slots, the Mesh item and the material group with its two resource items — including each slot's re-commit-then-clear chain and the two allowed-kind whitelists.wwwroot-src/src/components/controlTree/PrimarySlavePanel.vue— renders the root inline: the Raw and Target type badges plus the intro.wwwroot-src/src/components/controlTree/itemTypes.ts— the ItemType registry mapping the branch's children to their panels.wwwroot-src/src/components/controlTree/GeometrySlotPanel.vue— the kind picker behind the raw and target geometry slots.wwwroot-src/src/components/controlTree/TransformerSlotPanel.vue— the kind picker behind the two anchor slots.wwwroot-src/src/components/controlTree/WorkpieceRuntimePanel.vue— the Mesh item's editor: the Initial Resolution ladder and its hint.wwwroot-src/src/components/controlTree/WorkpieceResourcePanel.vue— the one panel both Material children share, choosing its extension and resource subfolder from the node's role path.wwwroot-src/src/components/widgets/FilePathInput.vue— the file field those children use; its project Browse entry is suppressed underresourceOnly, leaving the Resource-root pick.wwwroot-src/src/components/mech/EquipmentSetupPanel.vue— the canvas column and its Display Options menu.wwwroot-src/src/pages/GeneralSetupPage.vue— the/general-setuppage hosting the tree dock, the content column and the canvas in nested splitters.wwwroot-src/src/api/workpiece.ts— typed client for/api/Workpiece/*: initialize, status, the geometry re-commit and cache-clear calls, the two anchor transformer updates,init-resolution, the two resource loads and the diff settings.wwwroot-src/src/api/equipmentSetup.ts— typed client for the shared canvas: the three rendering-mode targets and the ten display flags, several of which are the workpiece's own overlays.Mech/WorkpieceController.cs— the model REST surface at/api/Workpiece: geometry install and cache clears, the anchor transformer updates,init-resolution,workpiece-material/load,cutting-parameter/load, and the geometry-diff settings pair (visual radius and detection radius) whose menu rides the Execution Extended Tool Bar rather than this branch.Mech/EquipmentSetupDisplayController.cs—/api/mech/equipment-setup-display: binds the equipment-setup displayee to a rendering connection, framing it isometrically at bind time, and serves the rendering-mode and flag endpoints.Disp/EquipmentSetupDisplayee.cs— the merged fixture + workpiece setup scene the canvas draws.Disp/EquipmentSetupDisplayeeConfig.cs— its config: the fixture and workpiece display flags in one place.