This commit is contained in:
2026-09-16 00:00:49 +08:00
parent 1a75503105
commit bfa3106a69
60 changed files with 696 additions and 268 deletions
@@ -172,7 +172,7 @@ and be wrong.</p>
<a class="xref" href="../execution/strip-charts.html">Strip Charts</a> and <a class="xref" href="../execution/cycle-line-charts.html">Cycle-Line Charts</a>.</p>
<h2 id="mech">Mech</h2>
<p><code>Mech/</code> is the largest domain folder: the REST surfaces for the machine tool, the tool house and
cutter editing, fixtures and workpieces, spindle capability, background and coolant, and the three
cutter editing, fixtures and workpieces, spindle capability, ambient and coolant, and the three
runner suits. It also holds the display controllers that bind a mechanism scene onto a rendering
connection. <code>Mech/CutterDtoBuilder.cs</code> is the shared read-side DTO shape two controllers reuse, and
<code>Mech/NcSuitUsage.cs</code> is what lets the Control Tree show the CSV and CL runner branches only when the
@@ -2,9 +2,9 @@
<html>
<head>
<meta charset="utf-8">
<title>Background / Coolant | HiAPI-C# 2025 </title>
<title>Environment: Ambient Temperature / Coolant | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Background / Coolant | HiAPI-C# 2025 ">
<meta name="title" content="Environment: Ambient Temperature / Coolant | HiAPI-C# 2025 ">
<link rel="icon" href="../../img/HiAPI.favicon.ico">
@@ -85,19 +85,21 @@
</div>
<article data-uid="Anatomy-BackgroundCoolant">
<h1 id="background--coolant">Background / Coolant</h1>
<h1 id="environment-ambient-temperature--coolant">Environment: Ambient Temperature / Coolant</h1>
<p>Background and Coolant are two leaves of the General Setup page's Control Tree
(<code>/general-setup?tree=equipment/background</code>, <code>/general-setup?tree=equipment/coolant</code>), sitting
directly under the General Setup group between Spindle Capability and Fixture. They are two tree
items rather than a page, so the older <code>/equipment/background-coolant</code> path redirects onto the
Background leaf. Both are served by one panel component, which branches on the selected node's role
path.</p>
<p>Ambient Temperature and Coolant are the two leaves of the General Setup page's <strong>Environment</strong> root
(<code>/general-setup?tree=equipment/background/environment-temperature</code>,
<code>/general-setup?tree=equipment/background/coolant</code> — the root's id <code>equipment/background</code> and the
routes keep the legacy <code>background</code> spelling; since 2026-09-15 Environment is one of the page's four
roots beside Mechanism, Spindle Capability and Controller, and the pre-regroup <code>equipment/coolant</code> id
migrates). They are tree items rather than a page, so the older <code>/equipment/background-coolant</code> path
redirects onto the Environment root. Both leaves are served by one panel component, which branches
on the selected node's role path.</p>
<p>They edit the thermal condition on the project's authored equipment face,
<a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.SetupEquipment.html">SetupEquipment</a>, reached as
<a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_SetupEquipment">SetupEquipment</a>:</p>
<ul>
<li><a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.SetupEquipment.html#Hi_Machining_MachiningEquipmentUtils_SetupEquipment_BackgroundTemperature_C">BackgroundTemperature_C</a> (Background
<li><a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.SetupEquipment.html#Hi_Machining_MachiningEquipmentUtils_SetupEquipment_AmbientTemperature_C">AmbientTemperature_C</a> (Ambient
leaf)</li>
<li>the whole <a class="xref" href="../../api/Hi.Physics.CoolantHeatCondition.html">CoolantHeatCondition</a> (Coolant leaf) — file-first, see below</li>
</ul>
@@ -105,10 +107,10 @@ leaf)</li>
<a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.SetupEquipment.html#Hi_Machining_MachiningEquipmentUtils_SetupEquipment_CoolantHeatCondition">CoolantHeatCondition</a>).</p>
<h2 id="layout">Layout</h2>
<ul>
<li>Background leaf — <code>equipment/background</code>, item type <code>ThermalCondition</code>
<li>Ambient Temperature leaf — <code>equipment/background/environment-temperature</code>, item type <code>ThermalCondition</code>
<ul>
<li>Background Temperature NumberField (°C) —
<a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.SetupEquipment.html#Hi_Machining_MachiningEquipmentUtils_SetupEquipment_BackgroundTemperature_C">BackgroundTemperature_C</a>.</li>
<li>Ambient Temperature NumberField (°C) —
<a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.SetupEquipment.html#Hi_Machining_MachiningEquipmentUtils_SetupEquipment_AmbientTemperature_C">AmbientTemperature_C</a>.</li>
</ul>
</li>
<li>Coolant leaf — <code>equipment/coolant</code>, the same item type and the same panel (file pick on top,
@@ -177,11 +179,11 @@ are the water-soluble preset's values.</li>
but exposes <code>_C</code> accessors that handle the conversion, and the DTO carries Celsius.</li>
<li><strong>Finite values only.</strong> Every field handler drops a null or non-finite entry before any request is
made, so <code>Infinity</code> never reaches these endpoints even though the numeric widget can parse it.
Background and coolant temperatures accept negatives (e.g. -40 °C for cryogenic coolant); the
Ambient and coolant temperatures accept negatives (e.g. -40 °C for cryogenic coolant); the
three convection fields are clamped to <code>min: 0</code>.</li>
<li><strong>The run sees it at once.</strong> The background-temperature write, all four condition scalars and the
<li><strong>The run sees it at once.</strong> The ambient-temperature write, all four condition scalars and the
file load each end in the project service's ForwardSetupEnvironmentToExecution, which stamps the
background temperature and the condition reference onto the runtime equipment face — including
ambient temperature and the condition reference onto the runtime equipment face — including
the lazily created condition, which otherwise would exist only on the authored side.</li>
</ul>
<h2 id="source-code-path">Source Code Path</h2>
@@ -190,7 +192,7 @@ the lazily created condition, which otherwise would exist only on the authored s
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
<ul>
<li><code>wwwroot-src/src/components/controlTree/ThermalConditionPanel.vue</code> — the one panel both leaves
share, branching on the node's last role-path segment: Background renders the single temperature
share, branching on the node's last role-path segment: Ambient Temperature renders the single temperature
field, Coolant the not-attached badge, the file row, the read-only Name / Note and the four
property fields.</li>
<li><code>wwwroot-src/src/components/controlTree/useControlTreeHost.ts</code> — declares the two
@@ -207,7 +209,8 @@ the flat snapshot, the load / save-as pair, and the five scalar PUTs.</li>
<li><code>wwwroot-src/src/router/routes.ts</code> — carries the <code>equipment/background-coolant</code> redirect, which
lands on <code>general-setup?tree=equipment/background</code>.</li>
<li><code>Mech/BackgroundCoolantController.cs</code> — REST surface at <code>/api/mech/background-coolant</code> over the
authored equipment face:
authored equipment face (the route, the PUT path and the snapshot field keep their legacy
<code>background</code> wire names; only the C# member behind them is renamed):
<ul>
<li><code>GET /</code> — flat snapshot <code>{ hasEquipment, backgroundTemperature_C, hasCoolant, coolantTemperature_C, coolantConvectionCoefficient_Wdm2K, mistFloodConvectionRatio, offConvectionCoefficient_Wdm2K, coolantName, coolantNote, coolantHeatConditionFile }</code>.</li>
<li><code>POST /load</code>, <code>POST /save-as</code><code>{ rootName, relFile }</code>: install a <code>.CoolantHeatCondition</code> file
@@ -218,7 +221,7 @@ project-relative path when it lands under the project. Save-as appends the exten
missing and renames the condition after the file (<code>IPreferredFileName</code>) with the <code>.default</code>
marker stripped.</li>
<li><code>PUT /background-temperature-c</code> — set
<a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.SetupEquipment.html#Hi_Machining_MachiningEquipmentUtils_SetupEquipment_BackgroundTemperature_C">BackgroundTemperature_C</a>.</li>
<a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.SetupEquipment.html#Hi_Machining_MachiningEquipmentUtils_SetupEquipment_AmbientTemperature_C">AmbientTemperature_C</a>.</li>
<li><code>PUT /coolant-temperature-c</code>, <code>PUT /coolant-convection-coefficient-wdm2k</code>,
<code>PUT /mist-flood-convection-ratio</code>, <code>PUT /off-convection-coefficient-wdm2k</code> — the four condition
scalars, all through one helper that lazy-creates the condition when absent, writes it, and
@@ -233,7 +236,7 @@ flood / mist-ratio / off convection coefficients, Name and Note with <code>Prefe
<code>StandardPresets</code> / <code>ApplyPreset</code> / <code>MatchStandardPreset</code> statics behind the shipped resource
files.</li>
<li><code>HiMech/Machining/MachiningEquipmentUtils/SetupEquipment.cs</code> — the authored equipment face that
owns the background temperature, the condition and its file reference, and externalizes the
owns the ambient temperature, the condition and its file reference, and externalizes the
condition to the side-file when that reference is set.</li>
</ul>
<h2 id="see-also">See Also</h2>
@@ -372,7 +372,13 @@ bounded field on the four leaves, at zero or above.</li>
<p>The stroke limits are checked at each played step against the chain's current machine pose while the
session's stroke-limit check is on; a position past a configured limit is reported as a
stroke-limit validation error anchored to that step, and pauses the player when pause-on-failure is
set. The check walks a <strong>fixed axis vocabulary</strong> — X, Y and Z from the machine point, A, B and C
set. The comparison carries a small tolerance
(<a class="xref" href="../../../../api/Hi.NcParsers.Dependencys.StrokeLimitUtil.html#Hi_NcParsers_Dependencys_StrokeLimitUtil_Tolerance">Tolerance</a>), so an axis parked exactly on its limit
is not reported. The rotary limits also steer the tilt solves: when a <code>G53.1</code>, <code>G68.2</code>, <code>CYCLE800</code>,
<code>PLANE SPATIAL</code> or <code>LN</code> posture has its nearest rotary solution outside the travel, the solve takes
the admissible branch nearest the entry instead of commanding a posture the machine cannot take. A
project that declared its travel only in the legacy machine-limits boxes gets those ends copied into
this table on load, for the axes carrying no end here. The check walks a <strong>fixed axis vocabulary</strong> — X, Y and Z from the machine point, A, B and C
from its orientation — so a limit stored against any other axis name is kept and shown here but never
tested. Rapid-traverse timing has the same shape and the same six names: a G00 move is timed
axis-by-axis at each axis' rate and takes the slowest, falling back to the same 20000 mm/min and
@@ -104,7 +104,7 @@ application.</p>
<ul>
<li><a href="machine-tool.html">Machine Tool</a> — The kinematic chain the whole scene hangs from, and the standalone route that loads and previews it</li>
<li><a href="spindle-capability.html">Spindle Capability</a> — The spindle envelope: thermal condition, gear shift, dry run, power and torque</li>
<li><a href="background-coolant.html">Background / Coolant</a> — The two scene branches that are not machine parts: the backdrop and the coolant model</li>
<li><a href="background-coolant.html">Environment: Ambient Temperature / Coolant</a> — The Environment root's two thermal leaves, the ones that are not machine parts: the ambient (shop) temperature the thermal model starts from, and the coolant model</li>
<li><a href="fixture.html">Fixture</a> — What holds the workpiece, its geometry and the two anchors that place it</li>
<li><a href="workpiece.html">Workpiece</a> — Raw and target geometry, the anchors that locate them, the mesh, and the material</li>
<li><a href="controller/index.html">Controller</a> — The SoftNcRunner-native controller branch: its two planes, the brand matrix behind which nodes appear at all, and the contract every leaf edits by</li>
@@ -290,7 +290,7 @@ reference.</li>
<h2 id="see-also">See Also</h2>
<ul>
<li><a class="xref" href="../util/mech-builder.html">Mechanism Builder Page</a> — same file-level IO pattern (Load / Reload / Save As) but user-scoped rather than project-scoped.</li>
<li><a class="xref" href="background-coolant.html">Background / Coolant</a> — sibling branch of the same Control Tree, editing the same authored equipment face.</li>
<li><a class="xref" href="background-coolant.html">Environment: Ambient Temperature / Coolant</a> — sibling root of the same Control Tree, editing the same authored equipment face.</li>
<li><a class="xref" href="../../technique/machine-capability/spindle-capability.html">Spindle Capability</a> — what the model represents physically and how the per-step ratios come out of it.</li>
</ul>
@@ -22,7 +22,7 @@
<a href="spindle-capability.html" name="" title="Spindle Capability">Spindle Capability</a>
</li>
<li>
<a href="background-coolant.html" name="" title="Background / Coolant">Background / Coolant</a>
<a href="background-coolant.html" name="" title="Environment (Ambient Temperature / Coolant)">Environment (Ambient Temperature / Coolant)</a>
</li>
<li>
<a href="fixture.html" name="" title="Fixture">Fixture</a>
@@ -1,2 +1,2 @@
{"items":[{"name":"Overview","href":"index.html","topicHref":"index.html"},{"name":"Machine Tool","href":"machine-tool.html","topicHref":"machine-tool.html"},{"name":"Spindle Capability","href":"spindle-capability.html","topicHref":"spindle-capability.html"},{"name":"Background / Coolant","href":"background-coolant.html","topicHref":"background-coolant.html"},{"name":"Fixture","href":"fixture.html","topicHref":"fixture.html"},{"name":"Workpiece","href":"workpiece.html","topicHref":"workpiece.html"},{"name":"Controller","href":"controller/index.html","tocHref":"controller/toc.html","topicHref":"controller/index.html","homepage":"controller/index.html"},{"name":"Hidden Controller Branches","href":"hidden-controllers.html","topicHref":"hidden-controllers.html"}]}
{"items":[{"name":"Overview","href":"index.html","topicHref":"index.html"},{"name":"Machine Tool","href":"machine-tool.html","topicHref":"machine-tool.html"},{"name":"Spindle Capability","href":"spindle-capability.html","topicHref":"spindle-capability.html"},{"name":"Environment (Ambient Temperature / Coolant)","href":"background-coolant.html","topicHref":"background-coolant.html"},{"name":"Fixture","href":"fixture.html","topicHref":"fixture.html"},{"name":"Workpiece","href":"workpiece.html","topicHref":"workpiece.html"},{"name":"Controller","href":"controller/index.html","tocHref":"controller/toc.html","topicHref":"controller/index.html","homepage":"controller/index.html"},{"name":"Hidden Controller Branches","href":"hidden-controllers.html","topicHref":"hidden-controllers.html"}]}
@@ -121,12 +121,16 @@ session holds no played SoftNc layers, and it is handed <code>MachiningProject.N
the switch on, so a value that only the legacy endpoints or the project XML can change still shows
up on a runner play.</p>
<ul>
<li><strong>Stroke limits, as a fallback.</strong> The per-step stroke check reads the runner's
<li><strong>Stroke limits, as a fallback and as a seed.</strong> The per-step stroke check reads the runner's
<a class="xref" href="../api/Hi.NcParsers.Dependencys.IStrokeLimitConfig.html">IStrokeLimitConfig</a> when the switch is on and one is present, and
falls back to the legacy stroke boxes otherwise — a CSV or NX-CL suit carries no stroke config, so
a play on those falls through to the boxes. The pre-play audit that warns of an unlimited linear
axis reads both sources end by end, the runner's first and the legacy box behind it, and stays
silent for an axis either source guards.</li>
a play on those falls through to the boxes. When a project loads, the boxes' finite ends are also
copied into the runner's controller parameter table for every axis that carries no end there
(<a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_PopulateLegacyStrokeLimitsWhereUnset_">PopulateLegacyStrokeLimitsWhereUnset</a>; an explicit row wins), so
a project that declared its travel only in the boxes is checked against it on SoftNc — and its
tilt solves prefer the rotary branch inside that travel. The pre-play audit that warns of an
unlimited linear axis reads both sources end by end, the runner's first and the legacy box behind
it, and stays silent for an axis either source guards.</li>
<li><strong>The home position, as a fallback.</strong> The chain is re-homed from the runner's home config; the
legacy <code>HomeMc</code> fills in only when no linear axis was ever configured there.</li>
<li><strong>The Execution canvas's coordinate markers.</strong> The <code>IsoCoordinate</code> and <code>HeidenhainCoordinate</code>
@@ -116,7 +116,7 @@ segment is a scope key only.</li>
re-minted on every re-index; in the Mission branch it is the Mission API command path (<code>0</code>, <code>1</code>,
the dotted <code>0.2</code> of a nested list entry); in the Tool House branch it is the tool id as a string.
Waves whose panels read a module-level state singleton rather than an indexed object leave it
empty — the SoftNc controller leaves, the spindle sections, the Background and Coolant leaves and
empty — the SoftNc controller leaves, the spindle sections, the Environment root's Ambient Temperature and Coolant leaves and
the Program branch all do.</li>
<li><code>ctx</code> — the parent-provided <code>SlotCtx</code>: the <code>afterChange</code> commit chain, a slot's <code>onCreate</code>
create-and-rebind hook, and a slot picker's <code>allowedKinds</code> / <code>allowNone</code> constraints.</li>
@@ -209,7 +209,7 @@ moved into a Control Tree still lands on the editor.</p>
</tr>
<tr>
<td><code>/equipment/background-coolant</code></td>
<td><code>/general-setup?tree=equipment/background</code>. Background and Coolant are two separate tree nodes; the redirect picks Background.</td>
<td><code>/general-setup?tree=equipment/background</code>. That id is the Environment root over the Ambient Temperature and Coolant leaves (<code>equipment/background/environment-temperature</code>, <code>equipment/background/coolant</code>); the redirect lands on the root (the ids and the route keep the legacy <code>background</code> spelling).</td>
</tr>
<tr>
<td><code>/mission</code></td>
@@ -119,14 +119,14 @@ signed-in session; it is omitted only while that probe has reported no version.<
<li>Tool House MenuItem
Open <a class="xref" href="../tool-house/index.html">Tool House Page</a></li>
<li>General Setup MenuItem
The equipment Control Tree — Machine Tool, Spindle Capability, Background, Coolant, Fixture, Workpiece, Controller, in that order — plus the shared equipment canvas. Two further controller branches, CSV Controller and CL Controller, are <a class="xref" href="../general-setup/hidden-controllers.html">hidden by default</a> and are switched on from the Preference dropdown.</li>
The equipment Control Tree — four roots: Mechanism (Machine Tool / Fixture / Workpiece), Spindle Capability, Environment (Ambient Temperature / Coolant) and Controller, in that order — plus the shared equipment canvas. Two further controller branches, CSV Controller and CL Controller, are <a class="xref" href="../general-setup/hidden-controllers.html">hidden by default</a> and are switched on from the Preference dropdown.</li>
<li>Execution MenuItem
Open <a class="xref" href="../execution/index.html">Execution Page</a></li>
<li>File Explorer MenuItem (below a separator). See <a href="../util/index.html">Util Pages</a>.</li>
<li>Mechanism Builder MenuItem
Open <a class="xref" href="../util/mech-builder.html">Mechanism Builder Page</a></li>
</ul>
<p>The dropdown is not every route the application has. The Machine Tool page stays reachable by URL for its chain-only canvas preview, the Log Viewer is reached by the <code>Show Log</code> button, and the Fixture, Workpiece, Spindle Capability, Mission, Background / Coolant and legacy Controller paths resolve as redirects into the two tree pages.</p>
<p>The dropdown is not every route the application has. The Machine Tool page stays reachable by URL for its chain-only canvas preview, the Log Viewer is reached by the <code>Show Log</code> button, and the Fixture, Workpiece, Spindle Capability, Mission, Environment (Ambient Temperature / Coolant) and legacy Controller paths resolve as redirects into the two tree pages.</p>
</li>
<li><p><a class="xref" href="preference-menu.html">Preference Menu Dropdown</a></p>
</li>
@@ -203,7 +203,7 @@ watching for project changes itself.</li>
<ul>
<li>The <a class="xref" href="../execution/index.html">Execution Page</a> is the landing route — <code>/</code> redirects to <code>/execution</code></li>
<li>The page URL and panel state are synchronized (bi-directional navigation)</li>
<li>There is no Environment dropdown. Machine Tool, Fixture, Workpiece, Controller, Background / Coolant and Spindle Capability are branches of the General Setup page's Control Tree, and Tool House and Execution are pages of their own; the remaining paths resolve as redirects into those pages. The menu bar is therefore <code>Project ▾ | Page ▾ | Preference ▾</code>.</li>
<li>There is no Environment dropdown (Environment is now a root of the General Setup page's Control Tree, over Ambient Temperature / Coolant). Mechanism (Machine Tool / Fixture / Workpiece), Spindle Capability, Environment and Controller are the roots of that tree, and Tool House and Execution are pages of their own; the remaining paths resolve as redirects into those pages. The menu bar is therefore <code>Project ▾ | Page ▾ | Preference ▾</code>.</li>
</ul>
<h2 id="source-code-path">Source Code Path</h2>
<p>See <a class="xref" href="../index.html">HiNC App Anatomy</a> for git repository links.</p>