Table of Contents

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 for api/mech/equipment-topology: the owner types, the graph and roles DTOs (a role's errorTermBranchGuid, RoleErrorTermDto), and one function per route — addRoleErrorTerm / removeRoleErrorTerm for a role's error term and setBranchErrorTerm for 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 is Running or Paused with 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 — the topology column bit, its window-width first-run default, topologyColPx, and topologyGraphPx, 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.vue and wwwroot-src/src/components/geom/GeometryEditor.vue — the switchboards the branch and anchor cards mount.
  • wwwroot-src/src/components/mech/EquipmentSetupPanel.vue and wwwroot-src/src/api/equipmentSetup.ts — the Role Anchors flag on the shared canvas's Display Options.
  • wwwroot-src/src/i18n/en/mech.ts — the topology.* and roles.* labels, and the canvas flag; the error-term option, the chips, the error term's own line and Clear mark under topology.errorTerm.*, the checks under roles.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; SolidEditRefusedWhileRunning maps onto apiErrors.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, Bind with its three refusals, Unbind before a delete, ErrorTermRoleOf (where an error term stands) and ErrorTermOf, AddErrorTermProblem and RemoveErrorTermProblem with the refusals of adding and removing an error term, ErrorTermName and NewErrorTermTransformer (the inserted anchor's name and the error term's first value), Rebinder (the roles re-pointed onto a rebuilt branch), ErrorTermProblem with 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) and FreeAnchorName, 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 the equipment-topology.<owner> key prefix.
  • Mech/Topology/TopologyGraphDto.cs and Mech/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; and Hold, whether an object is one of them or hangs under one — a solid's geometry, a TransformationGeom's geometry and transformer, a GeomCombination's items, a StackTransformer's stack, a GeneralTransform'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, given PlayerLockedEdit.Solids on the six solid routes: there it answers 409 SolidEditRefusedWhileRunning while the solids are locked, before the action runs. SolidsLocked, the test it reads then — and the one index-geom reads in its action — is StepNotBuiltYet.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 under Geom/ and Mech/Topo/: while the solids are locked (SolidsLocked, above), a non-GET action whose index key names an object EquipmentSolids.Hold holds answers 409 SolidEditRefusedWhileRunning; the index-only POSTs marked [AllowWhilePlayerLocked] pass, but for TransformationGeom/IndexTransformer on a wrapper under those solids that has no transformer yet, whose one write — a NoTransform on the null field — is refused the same way.
  • Execution/StepNotBuiltYet.cs — IsLocked, the solids' lock: the pace player locked, or the session's IsRunningNcLines raised by a play a host request drives directly on the session shell (POST /api/SessionShell/PlayNcFile and its siblings), which leaves the player idle, so the execution status reads neither Running nor Paused.
  • Disp/EquipmentSetupDisplayeeConfig.cs, Disp/EquipmentSetupDisplayee.cs and Mech/EquipmentSetupDisplayController.cs — ShowRoleAnchors: the persisted flag, the drawing, and its show-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 / Geom on the Geometry Anchor, HangSolid and CreateDefault.
  • HiMech/NcMech/Workpieces/Workpiece.cs — the workpiece's assembly, its three anchor roles and CreateDefault.
  • 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 the IsErrorTerm attribute 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 the error-terms routes read and write: a write is a setup edit, and while the switch is off the runtime face takes every marked branch as NoTransform.

See Also