Archived
173 lines
9.8 KiB
HTML
173 lines
9.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Polar Resolution 2D Panel | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Polar Resolution 2D Panel | 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-PolarResolution2dPanel">
|
|
<h1 id="polar-resolution-2d-panel">Polar Resolution 2D Panel</h1>
|
|
|
|
<p>The model is <a class="xref" href="../../api/Hi.Geom.Resolution.PolarResolution2d.html">PolarResolution2d</a>: a linear step in millimetres plus an angular step, carried in radians and edited in degrees, that together tessellate a revolved shape into an STL mesh. Both clients edit it on a tool holder and nowhere else — the WPF client through this widget, the web client through the Cylindroid holder's Resolution section.</p>
|
|
<h2 id="layout">Layout</h2>
|
|
<h3 id="wpf-layout">WPF Layout</h3>
|
|
<ul>
|
|
<li>Polar Resolution 2D Panel
|
|
<ul>
|
|
<li>Enable Custom Resolution CheckBox
|
|
<ul>
|
|
<li>checked if the host model is not null; the checkbox itself is always clickable.</li>
|
|
<li>unchecking sets the host model to null; checking a null model publishes a fresh <a class="xref" href="../../api/Hi.Geom.Resolution.PolarResolution2d.html">PolarResolution2d</a> of 0.5 mm / 5 deg through the setter.</li>
|
|
</ul>
|
|
</li>
|
|
<li>Linear Resolution Input Field, with an <code>mm</code> suffix label
|
|
<ul>
|
|
<li>enabled if model not null</li>
|
|
</ul>
|
|
</li>
|
|
<li>Angle Resolution Input Field, with a degree-sign suffix label
|
|
<ul>
|
|
<li>enabled if model not null</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h3 id="web-layout">Web Layout</h3>
|
|
<ul>
|
|
<li>Holder Resolution Section
|
|
<ul>
|
|
<li>Resolution Hint Caption — names the STL tessellation used for display and collision meshing</li>
|
|
<li>Linear Resolution (mm) Input Field</li>
|
|
<li>Angle Resolution (deg) Input Field</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<p>There is no enable checkbox and no null state on the web: both fields are always editable, and each commits on blur or Enter, and only when both values are greater than zero.</p>
|
|
<h2 id="feature">Feature</h2>
|
|
<p>The Enable CheckBox is always shown. The host drives the WPF widget only through <code>GetterFunc</code> / <code>SetterFunc</code>; it calls <code>UpdateUI()</code> after its own model changes and subscribes to <code>OnModelChanged</code> to react to an edit.</p>
|
|
<p>An edit republishes a whole new carrier through the setter instead of mutating the current one, in either client. A holder's <a class="xref" href="../../api/Hi.NcMech.Holders.CylindroidHolder.html#Hi_NcMech_Holders_CylindroidHolder_PolarResolution2d">PolarResolution2d</a> setter swaps the holder's solid for one born with the new value and disposes the old one, and skips a value-equal reassignment — which is what makes the WPF widget's per-keystroke setting affordable. The web client performs the same swap server-side inside <code>SetPolarResolution</code>, then clears the holder's cache.</p>
|
|
<p>If the host model is null, it may mean the resolution applied the default value: <a class="xref" href="../../api/Hi.NcMech.Solids.Solid.html#Hi_NcMech_Solids_Solid_PolarResolution2d">PolarResolution2d</a> is a snapshot of the solid's identity, and a null carrier lets a parametric geometry apply its own default. Only the WPF client can reach that state. The service reports a null resolution as 0 mm / 0 deg, the two web fields display those zeros, and the commit guard then blocks any write until real numbers are typed.</p>
|
|
<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): no standalone widget. The resolution is edited on the Cylindroid holder's Resolution section, at the Control-Tree id <code>toolhouse/tool-{id}/holder/resolution</code> and the route <code>/tool-house/:toolId/holder/resolution</code>. A Freeform holder grows no sections in the web client; its Holder panel shows a hint pointing at the WPF client instead.</p>
|
|
<ul>
|
|
<li><code>wwwroot-src/src/components/controlTree/toolhouse/HolderSectionPanel.vue</code> — the <code>section === 'resolution'</code> branch: the two number fields, seeded from <code>Get</code> and committed on blur / Enter.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/toolHouseItemTypes.ts</code> — registers that panel as the <code>HolderSection</code> item type and grows the Resolution node only for a <code>CylindroidHolder</code>.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/toolhouse/ToolHolderPanel.vue</code> — the Holder stem above it, whose holder-type selector decides which sections appear.</li>
|
|
<li><code>wwwroot-src/src/api/cylindroidHolder.ts</code> — <code>PolarResolutionDto</code> (<code>linear_mm</code> / <code>angle_deg</code>) and <code>setCylindroidHolderResolution</code>.</li>
|
|
<li><code>wwwroot-src/src/router/treeRoutes.ts</code> — maps the holder's section ids onto the Tool House route params.</li>
|
|
<li><code>wwwroot-src/src/i18n/en/toolhouse.ts</code> — the two field labels and the tessellation hint caption.</li>
|
|
<li><code>Mech/CylindroidHolderController.cs</code> — <code>POST /api/CylindroidHolder/SetPolarResolution</code>, which rejects a non-positive value, assigns a fresh <code>PolarResolution2d</code> and calls <code>ClearCache()</code>; <code>GET Get</code> reports a null resolution as 0 / 0.</li>
|
|
</ul>
|
|
<h2 id="see-also">See Also</h2>
|
|
<ul>
|
|
<li><a class="xref" href="../tool-house/holder/cylindroid-holder-panel.html">Cylindroid Holder Panel</a> — the holder editor that embeds this panel to tessellate its profile</li>
|
|
<li><a class="xref" href="../tool-house/holder/freeform-holder-panel.html">Freeform Holder Panel</a> — the other holder editor that embeds it</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>
|