2026-01-08 21:07:15 +08:00

189 lines
9.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HiNC GUI Architecture | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="HiNC GUI Architecture | 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="hinc-gui-architecture">HiNC GUI Architecture</h1>
<p>This section provides an architectural overview of the HiNC GUI applications. The <a href="general-rules.html">General Rules</a> document describes common patterns and conventions used throughout the codebase.</p>
<h2 id="source-code-repositories">Source Code Repositories</h2>
<h3 id="wpf-desktop-application">WPF Desktop Application</h3>
<p>The HiNC-2025-win-desktop project provides a native Windows desktop application built with WPF.</p>
<ul>
<li>Repository: <a href="https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-win-desktop.git">https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-win-desktop.git</a></li>
</ul>
<h3 id="web-service-application">Web Service Application</h3>
<p>The HiNC-2025-webservice project provides a web-based application using Vue.js for the frontend and ASP.NET Core for the backend.</p>
<ul>
<li>Repository: <a href="https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-webservice.git">https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-webservice.git</a></li>
</ul>
<h2 id="architecture-patterns">Architecture Patterns</h2>
<p>The following architectural patterns are used in the HiNC GUI applications:</p>
<ul>
<li><a href="common/dictionary-service-pattern.html">DictionaryService and DictionaryHub Pattern</a> - Connection-scoped object indexing for hierarchical components</li>
<li><a href="hinc-web-service/disp-web-service.html">Rendering Canvas on Web Service</a> - WebSocket-based 3D canvas rendering architecture using SignalR Hub</li>
</ul>
<h2 id="gui-component-structure">GUI Component Structure</h2>
<p>The HiNC GUI is organized into the following major components:</p>
<h3 id="core-framework">Core Framework</h3>
<ul>
<li><a href="initialize-hiapi.html">Initialize HiAPI</a> - Application initialization and HiAPI setup</li>
<li><a href="main-panel.html">Main Panel</a> - The main window layout and navigation structure</li>
<li><a href="message-section-on-main-panel.html">Message Section</a> - Status and message display area</li>
</ul>
<h3 id="rendering-and-visualization">Rendering and Visualization</h3>
<ul>
<li><a href="renderingcanvas-tool-bar.html">RenderingCanvas Tool Bar</a> - 3D view control toolbar</li>
<li><a href="player/index.html">Player Panel</a> - Simulation playback and visualization</li>
</ul>
<h3 id="configuration-panels">Configuration Panels</h3>
<ul>
<li><a href="preference/index.html">Preference Menu</a> - Application settings and preferences</li>
<li><a href="preference/graphic-cache-dropdown.html">Graphic-Cache Dropdown</a> - Graphics caching configuration</li>
</ul>
<h3 id="geometry-and-mechanism">Geometry and Mechanism</h3>
<ul>
<li><a href="widget/vec3d/index.html">Widget Components</a> - Reusable GUI widgets (Vec3dControl, etc.)</li>
<li><a href="geom/index.html">Geometry Panels</a> - Geometry definition and management</li>
<li><a href="mech/topo/transformers.html">Transformers</a> - Coordinate transformation components</li>
<li><a href="mech/fixture-page.html">Fixture Page</a> - Fixture configuration</li>
<li><a href="mech/workpiece-page.html">Workpiece Page</a> - Workpiece definition</li>
<li><a href="mech/tool-house-page.html">ToolHouse Page</a> - Tool library management</li>
</ul>
<h3 id="operation">Operation</h3>
<ul>
<li><a href="controller/index.html">Controller Page</a> - Machine controller settings</li>
<li><a href="mission/index.html">Mission Page</a> - Machining mission management</li>
</ul>
<h2 id="building-a-new-hinc-application">Building a New HiNC Application</h2>
<div class="TIP">
<h5>Tip</h5>
<p>To build a new HiNC GUI application from scratch, see <a href="../getting-started/index.html">Getting Started</a> for package configuration and setup instructions.</p>
</div>
<p>If you are building a new application, the following checklist provides a recommended implementation order:</p>
<ol>
<li>Create and configure an application project (x64 platform, add <code>HiNc</code> packages, add <code>Hi.WpfPlus</code> for WPF).</li>
<li>Create Main Window with <a href="main-panel.html#layout-structure">Main Panel Layout</a>.</li>
<li>Implement <a href="message-section-on-main-panel.html">Message Section</a>.</li>
<li><a href="initialize-hiapi.html">Initialize HiAPI</a> at application entry point.</li>
<li>Set up <a href="main-panel.html#project-menu-behavior">Navigation Menu/Project</a> behavior.</li>
<li>Create <a href="renderingcanvas-tool-bar.html">RenderingCanvas Tool Bar</a>.</li>
<li>Implement <a href="player/index.html">Player Panel</a>.</li>
<li>Implement <a href="preference/graphic-cache-dropdown.html">Graphic-Cache Dropdown</a>.</li>
<li>Build widget components (<a href="widget/vec3d/index.html">Vec3dControl</a>, etc.).</li>
<li>Build <a href="mech/topo/transformers.html">Transformers</a>, <a href="geom/index.html">Geometry Panels</a>.</li>
<li>Build <a href="mech/fixture-page.html">Fixture Page</a>, <a href="mech/workpiece-page.html">Workpiece Page</a>, <a href="controller/index.html">Controller Page</a>, <a href="mech/tool-house-page.html">ToolHouse Page</a>.</li>
</ol>
<div class="NOTE">
<h5>Note</h5>
<p>If you are using an AI agent to build the application, ask the AI to do only one job at a time to ensure quality. Compile to verify code works after each step.</p>
</div>
</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>