180 lines
9.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Background / Coolant Page | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Background / Coolant Page | 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 &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<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-page">Background / Coolant Page</h1>
<p>The Background / Coolant page edits three thermal scalars 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></li>
<li><code>CoolantHeatCondition.CoolantTemperature_C</code></li>
<li><code>CoolantHeatCondition.CoolantConvectionCoefficient_Wdm2K</code></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>This page exists 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 / Coolant Page
<ul>
<li>Background Card
<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 Card
<ul>
<li>&ldquo;Not attached&rdquo; badge — visible until the first coolant-related save (see <em>Lazy CoolantHeatCondition creation</em> below).</li>
<li>Coolant Temperature NumberField (°C) — <code>CoolantHeatCondition.CoolantTemperature_C</code>.</li>
<li>Coolant Convection Coefficient NumberField (W/(m²·K)) — <code>CoolantHeatCondition.CoolantConvectionCoefficient_Wdm2K</code>. Clamped to <code>min: 0</code>.</li>
<li>Sanity-range hint — echoes the table from <code>CoolantHeatCondition.cs</code> doc-comments (forced air 10500, typical coolant 100010000).</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2 id="behavior">Behavior</h2>
<ul>
<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 page can edit a fresh project before the operator explicitly attaches a coolant condition. The &ldquo;not attached&rdquo; 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.</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 coefficient is 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/pages/BackgroundCoolantPage.vue</code> — routed page at <code>/equipment/background-coolant</code>.</li>
<li><code>wwwroot-src/src/api/backgroundCoolant.ts</code> — typed wrapper over <code>/api/mech/background-coolant/*</code>.</li>
<li><code>wwwroot-src/src/router/routes.ts</code><code>/equipment/background-coolant</code> entry.</li>
<li><code>wwwroot-src/src/layouts/AppMenuBar.vue</code><code>Environment → Background / Coolant</code> menu entry below Workpiece.</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 }</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> — same pattern for the heat-transfer coefficient.</li>
</ul>
</li>
</ul>
<h2 id="related-pages">Related Pages</h2>
<ul>
<li><a href="spindle-capability-page.html">Spindle Capability Page</a> — sibling under <code>Environment</code>, also targets <code>MachiningEquipment</code>.</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>