Table of Contents

Background / Coolant Page

The Background / Coolant page edits three thermal scalars on the current project's MachiningEquipment:

  • BackgroundTemperature_C
  • CoolantHeatCondition.CoolantTemperature_C
  • CoolantHeatCondition.CoolantConvectionCoefficient_Wdm2K

Key Model: MachiningEquipment (+ its CoolantHeatCondition).

Note

This page exists only in the Quasar webservice. The WPF desktop app has no equivalent; the values are edited via scripting or XML.

Layout

  • Background / Coolant Page
    • Background Card
    • Coolant Card
      • “Not attached” badge — visible until the first coolant-related save (see Lazy CoolantHeatCondition creation below).
      • Coolant Temperature NumberField (°C) — CoolantHeatCondition.CoolantTemperature_C.
      • Coolant Convection Coefficient NumberField (W/(m²·K)) — CoolantHeatCondition.CoolantConvectionCoefficient_Wdm2K. Clamped to min: 0.
      • Sanity-range hint — echoes the table from CoolantHeatCondition.cs doc-comments (forced air 10–500, typical coolant 1000–10000).

Behavior

  • Lazy CoolantHeatCondition creation. If the machining equipment has no CoolantHeatCondition yet, the first write lazy-creates one server-side so the page can edit a fresh project before the operator explicitly attaches a coolant condition. The “not attached” badge disappears once the first value is saved.
  • Celsius is the wire format. CoolantHeatCondition stores Kelvin internally but exposes _C getters that handle the conversion.
  • No file IO. Background / coolant settings are part of the .hincproj save; there's no separate file to load.
  • Infinity round-trip. NumericInput handles Infinity for free. Background and coolant temperatures allow negatives (e.g. -40 °C for cryogenic coolant); the convection coefficient is clamped to min: 0.

Source Code Path

See HiNC App Anatomy for git repository links.

WPF Application Source Code Path

  • Not implemented.

Web Page Application Source Code Path

HiNC-2025-webservice (Quasar CLI SPA):

  • wwwroot-src/src/pages/BackgroundCoolantPage.vue — routed page at /equipment/background-coolant.
  • wwwroot-src/src/api/backgroundCoolant.ts — typed wrapper over /api/mech/background-coolant/*.
  • wwwroot-src/src/router/routes.ts/equipment/background-coolant entry.
  • wwwroot-src/src/layouts/AppMenuBar.vueEnvironment → Background / Coolant menu entry below Workpiece.
  • Mech/BackgroundCoolantController.cs — REST endpoints:
    • GET /api/mech/background-coolant — flat snapshot { hasEquipment, backgroundTemperature_C, hasCoolant, coolantTemperature_C, coolantConvectionCoefficient_Wdm2K }.
    • PUT /background-temperature-c — set BackgroundTemperature_C.
    • PUT /coolant-temperature-c — lazy-creates CoolantHeatCondition if needed, then sets CoolantTemperature_C.
    • PUT /coolant-convection-coefficient-wdm2k — same pattern for the heat-transfer coefficient.