Table of Contents

Cutter Panel

Overview

The key component is ICutter. A tool carries at most one cutter, and two concrete types answer to that interface: MillingCutter and FreeformRemover. This panel is where the type is chosen, and it holds the cutter's own General fields.

It is the Cutter tab of the Tool House Page, reached at /tool-house/:toolId/cutter under the page route /tool-house/:toolId?/:tab?/:subtab?. It is the panel of the Control-Tree Cutter node under the selected tool — the node whose role path is toolhouse/tool-<id>/cutter.

Layout

Web Layout

  • Cutter Node Panel
    • Title Label — Cutter
    • Cutter Type Selector — Milling Cutter / Freeform Remover / None
    • Milling Cutter branch, rendered only while the type is Milling Cutter
      • Shank Mass Input Field (g)
      • Hone Radius Input Field (um)
      • Relief Angle Input Field (deg)
      • Sections Hint Caption — points at the section tabs below
    • Freeform Remover branch — one caption, toolhouse.cutter.freeformRemoverUnavailable, saying the editor is not available here
    • No-cutter branch — one hint, toolhouse.cutter.noCutterHint, inviting the reader to pick Milling Cutter

The three numeric fields are the cutter's General fields, and they sit here under the Metadata-on-container convention — a container's own General fields are edited on the container's panel instead of in a General child. They are plain, always-editable inputs: one label each, no label switching and no auto-computed mode, and all three commit together through the general endpoint, which accepts exactly shankMass_g, honeRadius_um and reliefAngle_deg. A blanked box commits nothing, so clearing a field never writes a zero.

The type also decides what grows below the node. A Milling Cutter grows the cutter's section tabs — Material, Flute Profile, Flute Contours, Upper Beam, Optimization — as the nodes whose role paths end in .../cutter/material, .../cutter/profile, .../cutter/contours, .../cutter/upper-beam and .../cutter/opt; Material is the one gated behind the Advanced Physics preference. Selecting one replaces this panel with that section's own panel; see Milling Cutter Panel. A Freeform Remover or no cutter grows nothing, so the Cutter node is a leaf and the caption or hint is the whole surface; see Freeform Remover Panel.

This panel carries no object management of its own. Object management for the tool library sits on the tool-house root node, where the Object Management Menu Button is bound to the whole .MachiningToolHouse file rather than to a per-cutter file.

Features

Committing a type is one server call plus a cache clear. Milling Cutter calls EnsureCutter, which keeps the tool's existing MillingCutter and only creates one when the tool has none; None calls ClearCutter, which drops the tool's cutter altogether. The panel then clears the tool cache, re-reads the tool and emits a structure change for its own node, which is how the section tabs appear or disappear with the type.

Cache clearing is not a step the user performs. ICutter implements IClearCache, and every cutter endpoint that changes a field or a geometry clears the cache server-side before it answers: the field endpoints call ClearCache() on the milling cutter directly, while the ones that change flute or beam geometry go through the controller's resync hook, which clears the cache and re-aligns the tool's holder-to-cutter anchor transformer so the cutter is re-placed under the holder at its new height. On top of that the panels call clearToolCache(toolId), which clears the tool's cached solids and the holder's, so the tool canvas redraws.

Source Code Path

See HiNC App Anatomy for git repository links.

HiNC-2025-webservice (Quasar CLI SPA):

  • wwwroot-src/src/components/controlTree/toolhouse/ToolCutterPanel.vue — the Cutter node's panel: the Milling Cutter / Freeform Remover / None selector, the Shank Mass / Hone Radius / Relief Angle fields, the Freeform Remover caption and the no-cutter hint. Commits a type change through ensureCutter or clearCutter followed by clearToolCache.
  • wwwroot-src/src/components/controlTree/toolHouseItemTypes.ts — registers this panel as the ToolCutter item type; its cutter child builder grows the section tabs only for a MillingCutter, and gates Material on the Advanced Physics preference.
  • wwwroot-src/src/components/controlTree/toolhouse/CutterSectionPanel.vue and wwwroot-src/src/components/controlTree/toolhouse/CutterContoursPanel.vue — the panels those section nodes render.
  • wwwroot-src/src/components/controlTree/toolhouse/ToolHouseRootPanel.vue — the tool-house root panel, which carries the Object Management Menu Button for the .MachiningToolHouse file.
  • wwwroot-src/src/components/widgets/ObjectManagementMenuButton.vue — the reused object-management dropdown that root panel mounts.
  • wwwroot-src/src/components/widgets/NumericInput.vue — the shared numeric field behind the three General inputs; it commits on blur or Enter and reverts an unparseable entry.
  • wwwroot-src/src/pages/ToolHousePage.vue — the routed page that hosts the tool list and the tab cascade this panel appears in; the route is /tool-house/:toolId?/:tab?/:subtab?.
  • wwwroot-src/src/i18n/en/toolhouse.ts — the toolhouse.cutter.* strings this panel renders: cutterType, shankMass, honeRadius, reliefAngle, sectionsHint, freeformRemoverUnavailable, noCutterHint, millingCutter, freeformRemover. The None option's label comes from common.options.none in wwwroot-src/src/i18n/en/common.ts.
  • wwwroot-src/src/api/toolHouse.ts — the typed wrapper: /api/ToolHouse for the house and the tool-level fields, /api/Cutter for every cutter mutation, plus ensureCutter, clearCutter, setGeneral and clearToolCache.
  • Mech/CutterController.cs — the cutter backend at /api/Cutter: EnsureCutter / ClearCutter, the shaper-profile, fluting, general and opt-limit endpoints, the upper-beam endpoints and the material and coating-layer endpoints. Every field and geometry mutator clears the cutter cache before it answers.
  • Mech/CutterDtoBuilder.cs — the single source of truth for the read-side cutter DTO (integralMode, general, shaperProfile, fluting, optLimit, material), shared by CutterController and the tool detail in ToolHouseController.
  • Mech/ToolHouseController.cs — the tool detail that embeds that cutter DTO and that this panel reads on mount, plus the tool-cache clear the panel calls after every commit.