Machine Tool
The machine tool is the project's kinematic chain — the linkage between the machine table and the
tool spindle. It is edited on one surface: the equipment/mechanism/machine-tool branch of the
Equipment page's Control Tree (/equipment?tree=equipment/mechanism/machine-tool), the first
item under the Mechanism root and a leaf. Its panel is the file surface, the project's
error-term switch and the roles; the machine's anchors, branches and transformers are edited in
the page's Topology column, on the Machine Tool cluster of the
equipment graph. A ClMillingDevice is listed in that graph but not editable there.
The /machine-tool and /util/mech-builder addresses both redirect onto that branch, which
carries the chain's Load, its identity lines and its XML view. A chain is authored here: loaded
from a preset, edited in the Topology column, written out with Save As.
- Key Model:
- IMachiningChain The chain is addressed by an IndexService key handed to the Object Management Menu Button and installed back onto the project through the controller's Update.
- GeneralXyzabcMachineTool — the editable machine: it owns its topology
and names its roles as settable properties —
TableMount,
ToolMount, the axis branches
AxisX …
AxisC, and the spindle branch Spindle — a rotation about the tool mount's −Z through its origin, which playback turns to the spindle angle while the spindle stands. - EnableErrorTerms — the project's error-term
switch the root panel's Enable Error Terms toggle shows: on (the default), the machine runs
with the branches marked as error terms (an error term is added on the card of its axis's or
the spindle's branch, in the Topology column); off, it runs each of them as
NoTransform. It is saved with the project, not with the machine.
- Assistant Model:
- LocalProjectService — owns the chain as the MachiningChain / MachiningChainFile pair, and writes the switch as EnableErrorTerms, a setup edit the runtime face follows.
- MachiningProject
Layout
Control Tree Branch
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.
- Machine Tool Root Panel
- Object Management Menu Button
- New Items: one entry,
New ClMillingDevice(“CL-driven blank device”). Its parameterless form is the complete CL-driven device; any other chain type arrives by Load, Paste or XML. - Load / Save As / Copy / Paste / XML, over the project directory and the admin directory.
Load opens on the admin directory's
Resource/MachineTool, the shipped presets: the folder-shapedCT-350.defaultandTable-B1.default, and the flatEmpty-wXYOZSt.default.mt, a bare three-axis skeleton. - File extensions are
.MachineTooland.mt, so the Load / Save As filter reads*.MachineTool / *.mt / *.xml; the load type is IMachiningChain.
- New Items: one entry,
- Type Badge — the chain's runtime type name,
nonewhen no chain is attached. - Read-only caption lines, shown once a chain is attached:
- Intro caption, and an empty-state caption while no project is open.
- Enable Error Terms — a toggle, shown once a chain is attached, directly above the Roles panel, with the caption “Off: the machine moves without its error terms, and none is cut into the part. Either way, the controller computes the machine coordinates as if there were no error terms.” It is the project's switch over the branches marked as error terms; an error term is added on the branch card of an axis or the spindle in the Topology column.
- Roles panel — titled Roles, the panel the root ends with (see
Equipment Topology for the panel itself): one row per role
with a select over the machine's own anchors or branches and an arm button (a target icon,
tooltip “Pick on the graph”), then the server's checks or “All checks pass.” The machine's
roles are Table Mount and Tool Mount (anchors, required), Axis X / Axis Y /
Axis Z (branches, optional, each needing a
DynamicTranslation), Axis A / Axis B / Axis C (branches, optional, each needing aDynamicRotation) and Spindle (a branch, optional, needing aDynamicRotation). A branch marked as an error term is no candidate of a branch role. AClMillingDeviceshows “{type} has no editable roles.” instead of the rows.
- Object Management Menu Button
- Shared slave view: the Equipment canvas, whose Solid group's Machine flag draws this chain (see Equipment Page). That flag starts cleared, so the shared canvas shows a correctly attached chain only after it is ticked. Setting the Fixture, Raw Shape and Target Shape rendering modes to Hide in the same dropdown takes the fixture and the stock out of the scene; the anchor triads and the controller-coordinate marker stay until their own flags are cleared. The Anchors group's Role Anchors flag draws the two mounts' axes.
Behavior
- Load / Paste / XML-Apply only swap the IndexService entry. The tree root then installs the result onto MachiningChain — the setter rewires the attachments to the fixture and workpiece from the parts' current roles — re-mints the key, rebuilds the equipment tree and re-pulls the Topology column's graph and roles. The button's XML dialog re-emits its object-loaded event on Apply, so that install and refresh chain runs exactly once.
- A role bound on the Roles panel, or an anchor or branch edited in the Topology column, rewires the equipment and regenerates the machine's collision pairs when the machine auto-generates them and both mounts are bound; the canvas redraws on the next frame.
- Enable Error Terms is a project setting, not part of the machine: it is saved in the project
file (the
<EnableErrorTerms>element of the runner configuration; a project file without it reads as on), it is on by default, and a machine file written with Save As does not carry it. The panel reads it each time the toggle comes into view. The toggle is disabled while a write is on its way, a failed write is read back, and after every write the Topology column's graph is re-pulled, so the branch chips and edge badges follow the switch at once. - Off, the runtime face takes every branch marked as an error term as
NoTransform, and the machine moves, cuts and collides as its nominal chain; on, it carries the marked branches' values, and their errors are cut into the part. The kinematics solver always solves on the nominal chain, so a program's machine coordinates are the same either way; the Equipment canvas draws the authored values, and the marks stay. With no run session open a write rebuilds the runtime face at once. With one open, the Equipment page shows the pending-edits banner (“Equipment edits are pending: a run session is still open, so the scene follows them at the next Reset.” with a Reset now button), and the runtime face follows at the next play's start, a new session or a Reset. What a mark does is in Error-Term Branches. - A chain with an end anchor left unbound still loads and installs. A file that records the Table
Mount and Tool Mount roles binds the anchors it references, whatever they are called; a recorded
reference no anchor carries leaves that end unbound, and the load says so. A file with no mount
element, or an empty one, falls back to the name rule: the direct child anchor of the machine's
assembly named exactly
w/t, else the one such anchor matching the keyword ignoring letter case, which the load reports; with several such anchors, or none, that end stays unbound and the load says so. A file asking for generated collision pairs while either end is unbound gets none, and the load says so. An installed machine missing an end anchor has no kinematics solver, and every run stops at its start withThis kinematic chain has no worktable-end anchor named 'w'.(or the tool end's't'). The worktable end is checked before the tool end, so a chain missing both names only'w'until that one is fixed. - The IndexService key is minted even on a project with no chain attached, so Load and Paste stay usable from an empty root.
New ClMillingDevicebuilds and installs the blank chain in one server call and clears the project's chain-file reference, so a later project save embeds the fresh chain inline instead of overwriting the previous chain's file.- When the replacement came from a server-file Load, the install also re-points MachiningChainFile: project-relative when the file sits under the project directory, resource-root-relative when it sits under the resource root — the file first written into the project under that path, side files included, so a preset is never rewritten in place — and absolute otherwise. An absolute path there would make every later project save rewrite the shared resource file in place instead of copying it into the project. Paste and XML applies leave the file reference unchanged.
- The shared equipment canvas draws the live model, so a replacement shows on the next frame with no further calls; it snaps to the isometric view once, when its displayee is bound.
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/mechanism/machine-toolnode (item typeMachineToolRoot, keyed on the IndexService chain key) and owns the install / create / rebind handlers, each ending in a re-pull of the topology.wwwroot-src/src/components/controlTree/PrimarySlavePanel.vue— renders that branch inline: the Object Management button, itsNew ClMillingDeviceentry, the type badge, the read-only Name / Note / File captions, the Enable Error Terms toggle — its read, write, read-back after a failed write and the graph re-pull — and, last, the Roles panel.wwwroot-src/src/components/mech/MechanismRolesPanel.vue— the Roles panel, mounted with ownermachine-tool.wwwroot-src/src/api/equipmentTopology.ts—getErrorTermsEnabled/setErrorTermsEnabled, the client of the switch's routes.wwwroot-src/src/i18n/en/tree.ts—machineTool.errorTermsandmachineTool.errorTermsHint, the toggle's label and caption.wwwroot-src/src/pages/EquipmentPage.vue— the pending-edits banner and its Reset now button.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/mech/EquipmentSetupPanel.vue— the shared equipment canvas the tree root's chain is drawn on.wwwroot-src/src/api/machineTool.ts— typed client for the tree root'sinitialize,updateandcreatecalls.wwwroot-src/src/router/routes.ts— declares/machine-tooland/util/mech-builderas redirects onto the branch.Mech/MachineToolController.cs— REST surface at/api/mech/machine-tool:initialize/update/create, which the tree root drives, and the snapshot DTO,loadand the XML read, which serve HTTP API callers only. OnlyClMillingDeviceis offered for blank creation.Mech/Topology/EquipmentRoles.cs— the machine's role table the Roles panel lists: the two mounts, the six axes and the spindle with their required transformer kinds, and the checks.Mech/Topology/EquipmentTopologyController.cs—GET/PUT error-termsunderapi/mech/equipment-topology: the switch as a bare JSON boolean, written throughLocalProjectService.EnableErrorTerms.
HiAPI Engine
HiMech/NcMech/Xyzabc/GeneralXyzabcMachineTool.cs— the key model's editable form: its own assembly, root anchor and solids, the role properties, andCreateFromChainCode.HiMech/Machining/MachiningEquipmentUtils/EquipmentWiring.cs—Rewire: the attachments from the machine's table end and tool end, rebuilt whole from the current roles.HiMech/MachiningProcs/MachiningActRunnerConfig.cs—EnableErrorTermsand its<EnableErrorTerms>element in the project file.HiNc/MachiningProcs/LocalProjectService.cs—EnableErrorTerms: a write is a setup edit, and the runtime face is rebuilt with every marked branch asNoTransformwhile the switch is off.
See Also
- Equipment Topology — the Topology column where the machine's anchors, branches and transformers are edited, and the Roles panel this root ends with
- Fixture — the part whose Table Mount the machine's table end attaches to through the worktable attachment
- Workpiece — the part the table end attaches to directly when the project has no fixture
- Tree Ids and Routes — the
/machine-tooland/util/mech-builderredirects onto this branch