Equipment Topology Source Code
Where the Equipment page's Topology column is implemented: the column and the Roles panels, the
module singleton they share, the API module, and the controller, services and engine types behind
api/mech/equipment-topology. What the column shows is Equipment Topology,
and what it does Equipment Topology Behavior.
Source Code Path
See HiNC App Anatomy for git repository links.
Web Application
HiNC-2025-webservice (Quasar CLI SPA):
wwwroot-src/src/components/mech/EquipmentTopologyPanel.vue— the column: the Refresh button it teleports onto the title bar, the armed-role strip, the graph, the height divider and the editor card, addressed by owner; the arm-and-pick bind; the serialised edit chain and the post-edit refresh; the role card's Error term option, its chip, and its error term's anchors and editor, with the map of rebuilt guids the selection and the queued commits follow; the error term's own card; a misplaced mark's finding and Clear mark; the marked branch's chip.wwwroot-src/src/components/mech/MechanismRolesPanel.vue— the Roles panel a mechanism root panel ends with: the rows, the candidate selects, the arm buttons and the checks list, a finding about no role printed alone.wwwroot-src/src/components/mech/MechBuilderGraph.vue— the graph view, its name historical: nested assembly clusters, role badges, dotted attachment edges, thick error-term edges and their badges, and the anchor / branch / cluster click delegation; the direction, zoom and fit-width toolbar, drag-to-pan, and the scroll a redraw keeps. Mermaid is dynamic-imported on first draw, and every label is emitted quoted, which the parser requires for CJK text.wwwroot-src/src/composables/useEquipmentTopology.ts— the module singleton: the graph and roles, the exclusive selection, the armed role, the refresh epoch and the worktable-attachment test.wwwroot-src/src/api/equipmentTopology.ts— typed client forapi/mech/equipment-topology: the owner types, the graph and roles DTOs (a role'serrorTermBranchGuid,RoleErrorTermDto), and one function per route —addRoleErrorTerm/removeRoleErrorTermfor a role's error term andsetBranchErrorTermfor a branch's mark among them.wwwroot-src/src/components/controlTree/useControlTreeHost.ts—reinitializeMechanism/refreshTopology: the re-pull after a bind, an edit, or a Load / Paste / New on a mechanism item; and the topology reset in the equipment host's setup, once per project epoch, before the column mounts and pulls.wwwroot-src/src/components/controlTree/PrimarySlavePanel.vue— mounts the Roles panel at the end of each of the three inline mechanism root panels, and on the machine tool's the Enable Error Terms switch above it, which re-pulls the graph after every write.wwwroot-src/src/pages/EquipmentPage.vue— the four-column host: the reversed pixel splitter that gives the column its own width, the canvas-hidden hand-over, and the column's title bar with the controls container the panel's Refresh button lands in; and the player-locked banner (solid-edit-locked-banner), shown while the status isRunningorPausedwith the refusal's own sentence and a Stop and a Reset button.wwwroot-src/src/components/AppMenuBar.vue— the column-button row, whose fourth button on this page toggles the column.wwwroot-src/src/composables/useViewPrefs.ts— thetopologycolumn bit, its window-width first-run default,topologyColPx, andtopologyGraphPx, the graph's height above the card.wwwroot-src/src/router/treeRoutes.ts— the retired-slot hop: a legacy?tree=link into a mechanism item's former child ids lands on that item.wwwroot-src/src/components/topo/TransformerSelectPanel.vueandwwwroot-src/src/components/geom/GeometryEditor.vue— the switchboards the branch and anchor cards mount.wwwroot-src/src/components/mech/EquipmentSetupPanel.vueandwwwroot-src/src/api/equipmentSetup.ts— the Role Anchors flag on the shared canvas's Display Options.wwwroot-src/src/i18n/en/mech.ts— thetopology.*androles.*labels, and the canvas flag; the error-term option, the chips, the error term's own line and Clear mark undertopology.errorTerm.*, the checks underroles.check.*.wwwroot-src/src/api/http.ts— the coded errors: outside English, a refusal's message is rendered in the interface language with role and owner labels in place of the raw keys;SolidEditRefusedWhileRunningmaps ontoapiErrors.solidEditRefusedWhileRunning, the banner's text too.wwwroot-src/src/i18n/en/apiErrors.ts—solidEditRefusedWhileRunning, the refusal's sentence, one file per interface language beside it.Mech/Topology/EquipmentTopologyController.cs— the REST surface: owner resolution, the graph and roles reads, the anchor / branch / solid routes, a role's error term added and removed (RoleErrorTermDto), the error-term mark and the project's error-term switch, the worktable-attachment gate, and the after-edit settle (rewire, collision pairs, notify).Mech/Topology/EquipmentRoles.cs— the per-part role table,Describe(roles, candidates, checks, each axis's and the spindle's error term), the eleven checks,Bindwith its three refusals,Unbindbefore a delete,ErrorTermRoleOf(where an error term stands) andErrorTermOf,AddErrorTermProblemandRemoveErrorTermProblemwith the refusals of adding and removing an error term,ErrorTermNameandNewErrorTermTransformer(the inserted anchor's name and the error term's first value),Rebinder(the roles re-pointed onto a rebuilt branch),ErrorTermProblemwith the five refusals of a mark, and the transformer guard (AxisTransformerMismatch,ErrorTermDynamic,TransformerInUse).Mech/Topology/TopologyEditService.cs— anchor / branch CRUD,InsertUpstream/RemoveUpstream(an anchor and a branch put in front of a branch or taken out, the branch rebuilt) andFreeAnchorName, the error-term mark, transformer indexing and swap, solid enable / index / create / type / cache / colour on any mechanism, built per request by the controller above with theequipment-topology.<owner>key prefix.Mech/Topology/TopologyGraphDto.csandMech/Topology/TopologyGraphBuilder.cs— the graph DTO (assemblies, anchors, branches with their error-term marks, root anchor id, mechanisms, the error-term switch) and how owners, attachments and the tool-internals cut are decided.Mech/Topology/EquipmentSolids.cs— the solids the runtime face shares with the authored one, every solid on the machine tool's and the fixture's anchors, read on both faces, since the runtime one keeps a swapped part's or a deleted anchor's solids until the next session boundary; andHold, whether an object is one of them or hangs under one — a solid's geometry, aTransformationGeom's geometry and transformer, aGeomCombination's items, aStackTransformer's stack, aGeneralTransform's translation and rotation — compared by reference. Each dictionary is read as a snapshot; a walk torn by a write on another thread is tried again, three attempts in all, and one that never completes holds.Common/ApiError.cs— the error codes of the HTTP Surface.Common/RefuseWhilePlayerLockedAttribute.cs— the tool house's player-lock filter, givenPlayerLockedEdit.Solidson the six solid routes: there it answers 409SolidEditRefusedWhileRunningwhile the solids are locked, before the action runs.SolidsLocked, the test it reads then — and the oneindex-geomreads in its action — isStepNotBuiltYet.IsLocked; the tool house's own refusal keeps the player's lock alone.Common/RefuseSolidEditWhilePlayerLockedAttribute.cs— the filter on the generic geometry and transformer editors, every controller underGeom/andMech/Topo/: while the solids are locked (SolidsLocked, above), a non-GET action whose index key names an objectEquipmentSolids.Holdholds answers 409SolidEditRefusedWhileRunning; the index-only POSTs marked[AllowWhilePlayerLocked]pass, but forTransformationGeom/IndexTransformeron a wrapper under those solids that has no transformer yet, whose one write — aNoTransformon the null field — is refused the same way.Execution/StepNotBuiltYet.cs—IsLocked, the solids' lock: the pace player locked, or the session'sIsRunningNcLinesraised by a play a host request drives directly on the session shell (POST /api/SessionShell/PlayNcFileand its siblings), which leaves the player idle, so the execution status reads neitherRunningnorPaused.Disp/EquipmentSetupDisplayeeConfig.cs,Disp/EquipmentSetupDisplayee.csandMech/EquipmentSetupDisplayController.cs—ShowRoleAnchors: the persisted flag, the drawing, and itsshow-role-anchors/{renderingConnectionId}endpoint.Controller/ControllerController.cs— the align / revert-align endpoints that write the fixture's table branch.
HiAPI Engine
HiMech/NcMech/Xyzabc/GeneralXyzabcMachineTool.cs— the machine's own topology and roles:TableMount,ToolMount,AxisX…AxisC,Spindle.HiMech/NcMech/Fixtures/Fixture.cs— the fixture's assembly, its three anchor roles,Solid/Geomon the Geometry Anchor,HangSolidandCreateDefault.HiMech/NcMech/Workpieces/Workpiece.cs— the workpiece's assembly, its three anchor roles andCreateDefault.HiMech/Machining/MachiningEquipmentUtils/EquipmentWiring.cs—Rewire: the attachment branches detached and re-attached whole from the parts' current roles.HiMech/Machining/MachiningEquipmentUtils/MachiningEquipmentUtil.cs—TryAlignWorkpieceProgramZeroToIso, the alignment the Controller endpoints call.HiMech/Mech/Topo/Branch.cs—IsErrorTerm, the mark, and theIsErrorTermattribute a machine or project file carries on a marked branch.HiMech/Mech/MachiningChainUtil.cs—RequireRoleBranchesNotErrorTerm, the refusal by name a run meets at its start when a role branch is marked.HiNc/MachiningProcs/LocalProjectService.cs—EnableErrorTerms, the project's switch theerror-termsroutes read and write: a write is a setup edit, and while the switch is off the runtime face takes every marked branch asNoTransform.
See Also
- Equipment Topology — the graph, the editor cards and the Roles panels these files draw
- Equipment Topology Behavior — the edits, the routes and the error codes these files implement