Archived
155 lines
9.3 KiB
HTML
155 lines
9.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Graphic-Cache SubMenu | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Graphic-Cache SubMenu | 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="Anatomy-GraphicCacheMenu">
|
|
<h1 id="graphic-cache-submenu">Graphic-Cache SubMenu</h1>
|
|
|
|
<h2 id="shipped-surface">Shipped Surface</h2>
|
|
<p>The panel has no route and no Control-Tree node of its own. It is chrome on the Execution page (<code>/execution</code>): the canvas panel's expansion header carries the <code>Meshed Geom ▾</code> dropdown — titled <em>Workpiece rendering cache and geometry-diff settings</em> — whose <code>Graphic Cache</code> row opens this panel in a nested menu. It hangs there because it acts on the workpiece meshed geometry's rendering cache, and its sibling row in the same dropdown is <code>Diff Visual Radius</code>. It is therefore only reachable while the Execution page's canvas column is shown.</p>
|
|
<p>The panel is self-contained: it takes no parent-supplied model. It holds local lower / upper / current values, loads them on mount, and commits each edit to <code>GET</code>/<code>POST /api/preference/graphic-cache</code>. <code>UserService</code> / <code>UserConfig</code> is the server-side model behind that endpoint.</p>
|
|
<h2 id="layout">Layout</h2>
|
|
<p>Titled <strong>Graphic Cache (MB)</strong>, with the caption “Memory budget for rendering cache. Lower & upper bound the slider.”</p>
|
|
<ul>
|
|
<li>Graphic-Cache SubMenu
|
|
<ul>
|
|
<li><code>Lower</code> numeric field (unit MB)</li>
|
|
<li><code>Upper</code> numeric field (unit MB)</li>
|
|
<li><code>Current</code> numeric field (unit MB)</li>
|
|
<li>Slider</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h2 id="behavior">Behavior</h2>
|
|
<ul>
|
|
<li>There is no apply step and no Save button: each field posts its own value the moment it is committed — on blur, or on Enter — and the whole panel is loaded once when it is mounted.</li>
|
|
<li>The <code>Current</code> field is bounded by the two limit fields, so a value below <code>Lower</code> or above <code>Upper</code> is refused with an inline message and never sent. The server clamps a submitted value into the limits regardless, and the panel re-applies the effective state that comes back, so the server's answer is always what ends up on screen.</li>
|
|
<li>The slider is integer-valued and reflects <code>Current</code> in MB. Its range tracks <code>Lower</code> / <code>Upper</code>, clamped defensively so the minimum never exceeds the maximum. Releasing the slider commits the value.</li>
|
|
<li>A failed write shows the message inline under the fields, raises a notification, and re-reads from the server so the panel never drifts from stored state.</li>
|
|
<li>A write lands on the live user configuration, so it takes effect at once — <code>GraphicCacheMb</code> is a pass-through onto <code>CubeTree.DispCacheMb</code>. All three values are part of the user-config XML, so they reach disk with the next save of that config.</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>
|
|
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
|
|
<ul>
|
|
<li><code>wwwroot-src/src/components/preference/GraphicCacheMenu.vue</code> — the panel itself: Lower / Upper / Current numeric fields plus the slider. Loads on mount, commits each edit to the REST endpoint, re-applies the server's clamped response, and reports failures inline plus a notification.</li>
|
|
<li><code>wwwroot-src/src/components/execution/ExecutionExtendedToolBar.vue</code> — where the entry hangs: the <code>Meshed Geom ▾</code> dropdown on the Execution page canvas panel's expansion header, whose <code>Graphic Cache</code> row opens this panel in a nested menu.</li>
|
|
<li><code>wwwroot-src/src/components/workpiece/WorkpieceDiffRadiusMenu.vue</code> — the sibling <code>Diff Visual Radius</code> row in the same dropdown.</li>
|
|
<li><code>wwwroot-src/src/components/widgets/NumericInput.vue</code> — the shared numeric field used for all three values.</li>
|
|
<li><code>wwwroot-src/src/api/preference.ts</code> — <code>getGraphicCache</code> / <code>setGraphicCache</code> over <code>GET</code>/<code>POST /api/preference/graphic-cache</code>, typed as <code>{ lowerLimit, upperLimit, value }</code>.</li>
|
|
<li><code>Environments/PreferenceController.cs</code> — <code>GetGraphicCacheSettings</code> returns <code>{ success, lowerLimit, upperLimit, value }</code>; <code>UpdateGraphicCacheSettings</code> takes the same three as nullable fields, clamps <code>value</code> into the limits, writes the live <code>UserConfig</code>, and returns the effective state.</li>
|
|
<li><code>Environments/UserConfig.cs</code> — <code>GraphicCacheLowerLimitMb</code> (default 10) and <code>GraphicCacheUpperLimitMb</code> (default 1200) are plain stored values; <code>GraphicCacheMb</code> is a pass-through whose getter and setter are <code>CubeTree.DispCacheMb</code>. All three round-trip through the config XML.</li>
|
|
</ul>
|
|
<h2 id="see-also">See Also</h2>
|
|
<ul>
|
|
<li><a class="xref" href="../shell/preference-menu.html">Preference Menu Dropdown</a> — the sibling entries of the same dropdown</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>
|