tune
This commit is contained in:
@@ -0,0 +1,170 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Color Guide System | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Color Guide System | 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="color-guide-system">Color Guide System</h1>
|
||||
|
||||
<p>The Color Guide System allows you to assign colors and rendering priorities to visual elements based on machining steps or data states.</p>
|
||||
<h2 id="overview">Overview</h2>
|
||||
<p>The <a class="xref" href="../../../../api/Hi.Coloring.IColorGuide.html">IColorGuide</a> interface defines the core functionality for color mapping, allowing different colors and rendering priorities to be returned based on various steps or states. This system is particularly suitable for scenarios requiring visual encoding based on data states, such as CNC machining path visualization.</p>
|
||||
<h2 id="core-interface">Core Interface</h2>
|
||||
<h3 id="icolorguide-interface">IColorGuide Interface</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.Coloring.IColorGuide.html">IColorGuide</a> is the core interface of the Color Guide System, inheriting from <a class="xref" href="../../../../api/Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a> and <a class="xref" href="../../../../api/Hi.Coloring.IGetColorGuide.html">IGetColorGuide</a>.</p>
|
||||
<h4 id="methods">Methods</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Method</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../../../api/Hi.Coloring.IColorGuide.html#Hi_Coloring_IColorGuide_GetRgb_">GetRgb</a></td>
|
||||
<td>Returns RGB color value based on the step object</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../../../api/Hi.Coloring.IColorGuide.html#Hi_Coloring_IColorGuide_GetRgbWithPriority_">GetRgbWithPriority</a></td>
|
||||
<td>Returns RGB color and rendering priority</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="priority-explanation">Priority Explanation</h4>
|
||||
<p>The <code>attachmentPriority</code> parameter controls the overlay priority during rendering:</p>
|
||||
<ul>
|
||||
<li><strong>Higher values take priority</strong>: Larger priority values are displayed first</li>
|
||||
<li><strong>Graph scaling for pixel consolidation</strong>: When multiple machining steps are rendered within the same pixel, higher priority colors take precedence</li>
|
||||
</ul>
|
||||
<h4 id="effects-on-rendering-systems">Effects on Rendering Systems</h4>
|
||||
<p><strong>In CubeTree (<a class="xref" href="../../../../api/Hi.Cbtr.CubeTree.html">CubeTree</a>):</strong></p>
|
||||
<ul>
|
||||
<li>Color priorities determine which machining state is displayed when multiple operations overlap in 3D space</li>
|
||||
<li>Higher priority colors (like collision detection) will override lower priority colors (like normal cutting)</li>
|
||||
</ul>
|
||||
<h2 id="application-scenarios">Application Scenarios</h2>
|
||||
<p>The Color Guide System is suitable for the following scenarios:</p>
|
||||
<ol>
|
||||
<li><strong>CNC Machining Visualization</strong>: Display different path colors based on machining states</li>
|
||||
<li><strong>Data State Encoding</strong>: Convert numerical states to visual color representations</li>
|
||||
<li><strong>Priority-based Graph Scaling</strong>: When zooming out or viewing dense data, higher priority colors (critical states) remain visible while lower priority colors may be consolidated</li>
|
||||
<li><strong>Multi-resolution Rendering</strong>: Critical machining issues (collisions, safety violations) are always displayed regardless of zoom level or data density</li>
|
||||
</ol>
|
||||
<h2 id="registering-color-guide-in-project">Registering Color Guide in Project</h2>
|
||||
<p>To make the Color Guide effective in a project, implement the <a class="xref" href="../../../../api/Hi.Coloring.IColorGuide.html">IColorGuide</a> interface and register it in the project's color guide dictionary.</p>
|
||||
<h2 id="xml-serialization">XML Serialization</h2>
|
||||
<p>See <a href="../../common/xml-io.html">About XML IO</a> for details on XML serialization implementation.</p>
|
||||
<h2 id="wpf-application-source-and-sample-code-path">WPF Application Source And Sample Code Path</h2>
|
||||
<ul>
|
||||
<li>HiMech/Coloring/IColorGuide</li>
|
||||
<li>HiNC-2025-win-desktop/Demo/DemoColorGuide</li>
|
||||
</ul>
|
||||
<p>See <a href="../../../build-hinc/index.html">this page</a> for Git repository information.</p>
|
||||
|
||||
</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>
|
||||
@@ -125,6 +125,10 @@
|
||||
<td><a href="drawing/index.html">Drawing</a></td>
|
||||
<td>Learn how to use the Drawing class to create basic geometric elements</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="color-guide/index.html">Color Guide System</a></td>
|
||||
<td>Learn how to implement color mapping and rendering priority for steps</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2 id="basic-rendering-workflow">Basic Rendering Workflow</h2>
|
||||
|
||||
Reference in New Issue
Block a user