Archived
184 lines
12 KiB
HTML
184 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Background / Coolant (Control Tree) | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Background / Coolant (Control Tree) | HiAPI-C# 2025 ">
|
|
|
|
|
|
<link rel="icon" href="../../img/HiAPI.favicon.ico">
|
|
<link rel="stylesheet" href="../../public/docfx.min.css">
|
|
<link rel="stylesheet" href="../../public/main.css">
|
|
<meta name="docfx:navrel" content="../../toc.html">
|
|
<meta name="docfx:tocrel" content="../toc.html">
|
|
|
|
<meta name="docfx:rel" content="../../">
|
|
|
|
|
|
|
|
<meta name="loc:inThisArticle" content="In this article">
|
|
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
|
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
|
<meta name="loc:tocFilter" content="Filter by title">
|
|
<meta name="loc:nextArticle" content="Next">
|
|
<meta name="loc:prevArticle" content="Previous">
|
|
<meta name="loc:themeLight" content="Light">
|
|
<meta name="loc:themeDark" content="Dark">
|
|
<meta name="loc:themeAuto" content="Auto">
|
|
<meta name="loc:changeTheme" content="Change theme">
|
|
<meta name="loc:copy" content="Copy">
|
|
<meta name="loc:downloadPdf" content="Download PDF">
|
|
|
|
<script type="module" src="./../../public/docfx.min.js"></script>
|
|
|
|
<script>
|
|
const theme = localStorage.getItem('theme') || 'auto'
|
|
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
|
|
<header class="bg-body border-bottom">
|
|
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
|
<div class="container-xxl flex-nowrap">
|
|
<a class="navbar-brand" href="../../index.html">
|
|
<img id="logo" class="svg" src="../../img/HiAPI.logo.png" alt="">
|
|
|
|
</a>
|
|
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
|
<i class="bi bi-three-dots"></i>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navpanel">
|
|
<div id="navbar">
|
|
<form class="search" role="search" id="search">
|
|
<i class="bi bi-search"></i>
|
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="container-xxl">
|
|
<div class="toc-offcanvas">
|
|
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
|
|
<div class="offcanvas-header">
|
|
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
|
|
</div>
|
|
<div class="offcanvas-body">
|
|
<nav class="toc" id="toc"></nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="actionbar">
|
|
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
|
|
<i class="bi bi-list"></i>
|
|
</button>
|
|
|
|
<nav id="breadcrumb"></nav>
|
|
</div>
|
|
|
|
<article data-uid="">
|
|
<h1 id="background--coolant-control-tree">Background / Coolant (Control Tree)</h1>
|
|
|
|
<p>Background and Coolant are two leaves under the Player control tree's <strong>Equipment Setup</strong> group (<code>/player?tree=equipment/background</code>, <code>/player?tree=equipment/coolant</code>), sharing one panel component. They edit the thermal condition on the current project's <a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.MachiningEquipment.html">MachiningEquipment</a>:</p>
|
|
<ul>
|
|
<li><a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.MachiningEquipment.html#Hi_Machining_MachiningEquipmentUtils_MachiningEquipment_BackgroundTemperature_C">BackgroundTemperature_C</a> (Background leaf)</li>
|
|
<li>the whole <a class="xref" href="../../api/Hi.Physics.CoolantHeatCondition.html">CoolantHeatCondition</a> (Coolant leaf) — preset-first, see below</li>
|
|
</ul>
|
|
<p>Key Model: <a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.MachiningEquipment.html">MachiningEquipment</a> (+ its <code>CoolantHeatCondition</code>).</p>
|
|
<div class="NOTE">
|
|
<h5>Note</h5>
|
|
<p>These leaves exist only in the Quasar webservice. The WPF desktop app has no equivalent; the values are edited via scripting or XML.</p>
|
|
</div>
|
|
<h2 id="layout">Layout</h2>
|
|
<ul>
|
|
<li>Background leaf
|
|
<ul>
|
|
<li>Background Temperature NumberField (°C) — <a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.MachiningEquipment.html#Hi_Machining_MachiningEquipmentUtils_MachiningEquipment_BackgroundTemperature_C">BackgroundTemperature_C</a>.</li>
|
|
</ul>
|
|
</li>
|
|
<li>Coolant leaf (pure WorkpieceMaterial layout — file pick on top, properties below)
|
|
<ul>
|
|
<li>“Not attached” badge — visible until the first coolant-related save (see <em>Lazy CoolantHeatCondition creation</em> below).</li>
|
|
<li><strong>File row</strong> — <code>FilePathInput</code> (<code>.CoolantHeatCondition</code>, resource subfolder <code>CoolantHeatCondition</code>) loading a saved condition by named root, plus a <strong>Save As…</strong> prompt exporting the current condition to a project-relative file. Tracked in <code>MachiningEquipment.CoolantHeatConditionFile</code>. The three standard cooling types ship as ready-made files in <code>HiNc-Resource</code> (<code>Resource/CoolantHeatCondition/*.CoolantHeatCondition</code>), so <strong>Browse Resource…</strong> starts populated like the workpiece-material picker — picking a shipped file <em>is</em> the cooling-type selection.</li>
|
|
<li>Name / Note — read-only mirror of the loaded condition.</li>
|
|
<li>Property fields (always visible, under Name / Note):
|
|
<ul>
|
|
<li>Coolant Temperature (°C) — <code>CoolantTemperature_C</code>.</li>
|
|
<li>Flood Convection Coefficient (W/(m²·K)) — <code>CoolantConvectionCoefficient_Wdm2K</code>, <code>min: 0</code>.</li>
|
|
<li>Mist / Flood Ratio — <code>MistFloodConvectionRatio</code>, <code>min: 0</code>.</li>
|
|
<li>Off (Air) Convection Coefficient (W/(m²·K)) — <code>OffConvectionCoefficient_Wdm2K</code>, <code>min: 0</code>.</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h2 id="behavior">Behavior</h2>
|
|
<ul>
|
|
<li><strong>File-based conditions (WorkpieceMaterial pattern).</strong> Picking a <code>.CoolantHeatCondition</code> file installs it as the whole condition (<code>XFactory.GenByFile</code>); <strong>Save As…</strong> exports the current values and renames the condition after the file (<code>IPreferredFileName</code>). While <code>MachiningEquipment.CoolantHeatConditionFile</code> is set, the project save externalizes the condition as <code><CoolantHeatCondition><XmlSource>relPath</XmlSource></CoolantHeatCondition></code> and regenerates the side-file (a resource pick is copied into the project on save); with no file the legacy bare inline shape is kept byte-compatible. Coefficient edits tune <em>this project's</em> copy. The static presets on <code>CoolantHeatCondition</code> (<code>StandardPresets</code> / <code>ApplyPreset</code> / <code>MatchStandardPreset</code>) remain the API-side source of the shipped files.</li>
|
|
<li><strong>Lazy <code>CoolantHeatCondition</code> creation.</strong> If the machining equipment has no <code>CoolantHeatCondition</code> yet, the first write lazy-creates one server-side so the panel can edit a fresh project before the operator explicitly attaches a coolant condition. The “not attached” badge disappears once the first value is saved.</li>
|
|
<li><strong>Celsius is the wire format.</strong> <code>CoolantHeatCondition</code> stores Kelvin internally but exposes <code>_C</code> getters that handle the conversion.</li>
|
|
<li><strong>No file IO.</strong> Background / coolant settings are part of the <code>.hincproj</code> save; there's no separate file to load. A fresh project value-matches <code>StandardWaterSolubleCoolant</code> (the class defaults), so the select starts on a meaningful entry instead of “Custom”.</li>
|
|
<li><strong>Infinity round-trip.</strong> <code>NumericInput</code> handles <code>Infinity</code> for free. Background and coolant temperatures allow negatives (e.g. -40 °C for cryogenic coolant); the convection fields are clamped to <code>min: 0</code>.</li>
|
|
</ul>
|
|
<h2 id="source-code-path">Source Code Path</h2>
|
|
<p>See <a href="../index.html">HiNC App Anatomy</a> for git repository links.</p>
|
|
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
|
<ul>
|
|
<li>Not implemented.</li>
|
|
</ul>
|
|
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
|
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
|
|
<ul>
|
|
<li><code>wwwroot-src/src/components/controlTree/ThermalConditionPanel.vue</code> — the shared Background / Coolant panel (keyed off the node's role path).</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/useControlTreeHost.ts</code> — the two <code>ThermalCondition</code> tree nodes under the Equipment Setup group.</li>
|
|
<li><code>wwwroot-src/src/api/backgroundCoolant.ts</code> — typed wrapper over <code>/api/mech/background-coolant/*</code>.</li>
|
|
<li><code>Mech/BackgroundCoolantController.cs</code> — REST endpoints:
|
|
<ul>
|
|
<li><code>GET /api/mech/background-coolant</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 / export the current condition (extension auto-appended, renames via <code>IPreferredFileName</code>), both recording <code>MachiningEquipment.CoolantHeatConditionFile</code>.</li>
|
|
<li><code>PUT /background-temperature-c</code> — set <a class="xref" href="../../api/Hi.Machining.MachiningEquipmentUtils.MachiningEquipment.html#Hi_Machining_MachiningEquipmentUtils_MachiningEquipment_BackgroundTemperature_C">BackgroundTemperature_C</a>.</li>
|
|
<li><code>PUT /coolant-temperature-c</code> — lazy-creates <code>CoolantHeatCondition</code> if needed, then sets <code>CoolantTemperature_C</code>.</li>
|
|
<li><code>PUT /coolant-convection-coefficient-wdm2k</code>, <code>PUT /mist-flood-convection-ratio</code>, <code>PUT /off-convection-coefficient-wdm2k</code> — same pattern for the three convection values (Custom mode).</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h2 id="related-pages">Related Pages</h2>
|
|
<ul>
|
|
<li><a href="spindle-capability-page.html">Spindle Capability Page</a> — sibling equipment editor, also targets <code>MachiningEquipment</code>.</li>
|
|
<li><a href="../../manual/setup/coolant.html">Coolant (manual)</a> — the end-user / API manual page for the cooling types.</li>
|
|
</ul>
|
|
|
|
</article>
|
|
|
|
<div class="contribution d-print-none">
|
|
</div>
|
|
|
|
<div class="next-article d-print-none border-top" id="nextArticle"></div>
|
|
|
|
</div>
|
|
|
|
<div class="affix">
|
|
<nav id="affix"></nav>
|
|
</div>
|
|
</main>
|
|
|
|
<div class="container-xxl search-results" id="search-results"></div>
|
|
|
|
<footer class="border-top text-secondary">
|
|
<div class="container-xxl">
|
|
<div class="flex-fill">
|
|
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|