This commit is contained in:
unknown 2025-09-16 11:21:48 +08:00
parent a69e02dd26
commit 62ac88b5b8
34 changed files with 459 additions and 116 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -11,8 +11,8 @@
"dependencies": {
"AvalonEdit": "6.3.0.90",
"FontAwesome.Sharp": "6.3.0",
"Hi.Wpf": "3.1.34",
"HiNc": "3.1.51",
"Hi.Wpf": "3.1.35",
"HiNc": "3.1.52",
"Microsoft.Extensions.Configuration.Json": "9.0.0",
"Microsoft.Extensions.DependencyInjection": "9.0.0",
"Microsoft.Extensions.Hosting": "9.0.0",
@ -1659,39 +1659,39 @@
}
},
"Grpc.Tools/2.66.0": {},
"Hi.Wpf/3.1.34": {
"Hi.Wpf/3.1.35": {
"dependencies": {
"HiDisp": "3.1.39"
"HiDisp": "3.1.40"
},
"runtime": {
"lib/net9.0-windows7.0/Hi.Wpf.dll": {
"assemblyVersion": "3.1.34.0",
"fileVersion": "3.1.34.0"
"assemblyVersion": "3.1.35.0",
"fileVersion": "3.1.35.0"
}
}
},
"HiCbtr/3.1.39": {
"HiCbtr/3.1.40": {
"dependencies": {
"HiDisp": "3.1.39"
"HiDisp": "3.1.40"
},
"runtime": {
"lib/net9.0/HiCbtr.dll": {
"assemblyVersion": "3.1.39.0",
"fileVersion": "3.1.39.0"
"assemblyVersion": "3.1.40.0",
"fileVersion": "3.1.40.0"
}
}
},
"HiDisp/3.1.39": {
"HiDisp/3.1.40": {
"dependencies": {
"HiGeom": "3.1.35",
"HiGeom": "3.1.36",
"System.Configuration.ConfigurationManager": "9.0.9",
"System.Drawing.Common": "9.0.9",
"System.Resources.Extensions": "9.0.9"
},
"runtime": {
"lib/net9.0/HiDisp.dll": {
"assemblyVersion": "3.1.39.0",
"fileVersion": "3.1.39.0"
"assemblyVersion": "3.1.40.0",
"fileVersion": "3.1.40.0"
}
},
"native": {
@ -1706,7 +1706,7 @@
}
}
},
"HiGeom/3.1.35": {
"HiGeom/3.1.36": {
"dependencies": {
"Google.Protobuf": "3.28.3",
"Grpc.AspNetCore": "2.66.0",
@ -1717,8 +1717,8 @@
},
"runtime": {
"lib/net9.0/HiGeom.dll": {
"assemblyVersion": "3.1.35.0",
"fileVersion": "3.1.35.0"
"assemblyVersion": "3.1.36.0",
"fileVersion": "3.1.36.0"
}
},
"resources": {
@ -1730,27 +1730,27 @@
}
}
},
"HiLicense/3.1.33": {
"HiLicense/3.1.34": {
"dependencies": {
"HiGeom": "3.1.35"
"HiGeom": "3.1.36"
},
"runtime": {
"lib/net9.0/HiLicense.dll": {
"assemblyVersion": "3.1.33.0",
"fileVersion": "3.1.33.0"
"assemblyVersion": "3.1.34.0",
"fileVersion": "3.1.34.0"
}
}
},
"HiMech/3.1.43": {
"HiMech/3.1.44": {
"dependencies": {
"CommandLineParser": "2.9.1",
"HiCbtr": "3.1.39",
"HiCbtr": "3.1.40",
"Microsoft.CodeAnalysis.CSharp.Scripting": "4.14.0"
},
"runtime": {
"lib/net9.0/HiMech.dll": {
"assemblyVersion": "3.1.43.0",
"fileVersion": "3.1.43.0"
"assemblyVersion": "3.1.44.0",
"fileVersion": "3.1.44.0"
}
},
"resources": {
@ -1765,20 +1765,20 @@
}
}
},
"HiNc/3.1.51": {
"HiNc/3.1.52": {
"dependencies": {
"Google.Protobuf": "3.28.3",
"Grpc.AspNetCore": "2.66.0",
"Grpc.Net.Client": "2.66.0",
"HiLicense": "3.1.33",
"HiMech": "3.1.43",
"HiUniNc": "3.1.40",
"HiLicense": "3.1.34",
"HiMech": "3.1.44",
"HiUniNc": "3.1.41",
"System.IO.Pipelines": "9.0.9"
},
"runtime": {
"lib/net9.0/HiNc.dll": {
"assemblyVersion": "3.1.51.0",
"fileVersion": "3.1.51.0"
"assemblyVersion": "3.1.52.0",
"fileVersion": "3.1.52.0"
}
},
"resources": {
@ -1790,14 +1790,14 @@
}
}
},
"HiUniNc/3.1.40": {
"HiUniNc/3.1.41": {
"dependencies": {
"HiMech": "3.1.43"
"HiMech": "3.1.44"
},
"runtime": {
"lib/net9.0/HiUniNc.dll": {
"assemblyVersion": "3.1.40.0",
"fileVersion": "3.1.40.0"
"assemblyVersion": "3.1.41.0",
"fileVersion": "3.1.41.0"
}
}
},
@ -2442,61 +2442,61 @@
"path": "grpc.tools/2.66.0",
"hashPath": "grpc.tools.2.66.0.nupkg.sha512"
},
"Hi.Wpf/3.1.34": {
"Hi.Wpf/3.1.35": {
"type": "package",
"serviceable": true,
"sha512": "sha512-xYj7sQoFAWJOlnu8jMNMo33Fu0PL/wIyUD8WOZWRv65k3uhfKId+fvlod/bblp6sEJGbPpjvoTYqjSICIWCf2Q==",
"path": "hi.wpf/3.1.34",
"hashPath": "hi.wpf.3.1.34.nupkg.sha512"
"sha512": "sha512-rIIVxy2l5QTy2WwrQ2D0e4Hz4O1WeCOJbSjDpfpLjhjTPCnFz+C77pSay//OHNiYOJXW7nczRQ3cksU4subadg==",
"path": "hi.wpf/3.1.35",
"hashPath": "hi.wpf.3.1.35.nupkg.sha512"
},
"HiCbtr/3.1.39": {
"HiCbtr/3.1.40": {
"type": "package",
"serviceable": true,
"sha512": "sha512-4UFiWpjbDLzE+6ph9rZ5u9ntvxRmbkwxlqBHDbdbDggLpdTizvsCqsehWcw1l9/U/DS7T8r5zHoBbkgLbAXX1g==",
"path": "hicbtr/3.1.39",
"hashPath": "hicbtr.3.1.39.nupkg.sha512"
"sha512": "sha512-+DgpnExTGyfhPEEWGfszmX1zuS6xEbam5mcTr4EXvjMThbwJq11AGIkxb3zWLARkZgX6hvLIC/3ugS0Hd8oHdA==",
"path": "hicbtr/3.1.40",
"hashPath": "hicbtr.3.1.40.nupkg.sha512"
},
"HiDisp/3.1.39": {
"HiDisp/3.1.40": {
"type": "package",
"serviceable": true,
"sha512": "sha512-z9p0msRH8f3OfV/vK4vRhtfPafCDRXhXgiqQwEbskZRg+hjIiXU4xqwTy5M8LwSHk9ht1d6J9HdTwtUjjR3Z+A==",
"path": "hidisp/3.1.39",
"hashPath": "hidisp.3.1.39.nupkg.sha512"
"sha512": "sha512-Apg9uBX4QG5Rm+3gzrCq0W4koQ5kalKyXSF9XcrndOcd4yyWD4NHHbcHYoFNpqtfri6c5qwPoGgqpHCvHZri6A==",
"path": "hidisp/3.1.40",
"hashPath": "hidisp.3.1.40.nupkg.sha512"
},
"HiGeom/3.1.35": {
"HiGeom/3.1.36": {
"type": "package",
"serviceable": true,
"sha512": "sha512-aBkdVedhLK5CkilKPdNIIch44/1+kR8w7LaG8JU4iJc9fAV4yHxd5KriAekzmWe+3ujmkmM8kUCKC0Y71ij+fw==",
"path": "higeom/3.1.35",
"hashPath": "higeom.3.1.35.nupkg.sha512"
"sha512": "sha512-HJpmSjmBM9KjaJHZZuIQL0SfmTVNZ4SuGtWS+GQN5nhB9fuWTpdJL3ZzyJ00JS7rSKM/5wX83NSVaM6usNgpLg==",
"path": "higeom/3.1.36",
"hashPath": "higeom.3.1.36.nupkg.sha512"
},
"HiLicense/3.1.33": {
"HiLicense/3.1.34": {
"type": "package",
"serviceable": true,
"sha512": "sha512-S0XY8RhQOKQkX3Abfr8jkcjqoLguiFXzwA3QTY+HgYtkWLzC/IaxHzTrlLT1HijrCzHyb3qcR+SNEwRqH8mBTQ==",
"path": "hilicense/3.1.33",
"hashPath": "hilicense.3.1.33.nupkg.sha512"
"sha512": "sha512-h4eGvv+4lS71gB1Df3GqB8PFykLwrR5NsvoWQRUK6mLeIHZ8vlnNeYBx/pF/x0poVzz1x7NHb8W9YbPjKyNXww==",
"path": "hilicense/3.1.34",
"hashPath": "hilicense.3.1.34.nupkg.sha512"
},
"HiMech/3.1.43": {
"HiMech/3.1.44": {
"type": "package",
"serviceable": true,
"sha512": "sha512-vQBXD4UkoPoduUnz4D9v+gEb4FuZZ9W5kgKE3+WeF8q7FHDLYue67x7EX9tm5t767Z8yH9sX6ESd3ve9tX8GIA==",
"path": "himech/3.1.43",
"hashPath": "himech.3.1.43.nupkg.sha512"
"sha512": "sha512-5GnZit75i0SUCQvl59z9Rjrno4xLRBGrNc3Hjfp5CjB8tAcZTTVh7wGR7rH97D04hFOK2IvjgDyphdHxzXSxaQ==",
"path": "himech/3.1.44",
"hashPath": "himech.3.1.44.nupkg.sha512"
},
"HiNc/3.1.51": {
"HiNc/3.1.52": {
"type": "package",
"serviceable": true,
"sha512": "sha512-G9jo2iHczdwCIPydYHt2NGQCBF+0i1DaX8Gcsrmx3AaijlhbP7+SkzMmOTgSDqHmmoxuDaYY18NOE8TVXQ7dIw==",
"path": "hinc/3.1.51",
"hashPath": "hinc.3.1.51.nupkg.sha512"
"sha512": "sha512-YTpLUteJb1+0lQ67awGUVGTP552Dw4uOJdLIOsqThlrfF0Wwh352+z4WNTeX5qqTiIMCFE9croY5NfDZGiiAow==",
"path": "hinc/3.1.52",
"hashPath": "hinc.3.1.52.nupkg.sha512"
},
"HiUniNc/3.1.40": {
"HiUniNc/3.1.41": {
"type": "package",
"serviceable": true,
"sha512": "sha512-o7xlqbvWdfgjiZKcyZcE+AMBCSxOQA80T5ws/U2dw5kOZ4tjkEYEwSsFF655fA+LTykVm+z70lpBUgXARvPYIA==",
"path": "hiuninc/3.1.40",
"hashPath": "hiuninc.3.1.40.nupkg.sha512"
"sha512": "sha512-GRmkhPqz1nSkMOoadN8agzKG6nY3U8u84AxiU4ZmPp1hx06pkyS7jf+RX+q4y1ANbFJ8eo+iywfLFtg1DbaT8Q==",
"path": "hiuninc/3.1.41",
"hashPath": "hiuninc.3.1.41.nupkg.sha512"
},
"MathNet.Numerics/5.0.0": {
"type": "package",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -91,13 +91,14 @@
<h2 id="wpf-application-source-code">WPF Application Source Code</h2>
<p>The source code of HiNC-2025-win-desktop project is at the git repository:</p>
<p><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></p>
<h2 id="web-page-application-source-code">Web Page Application Source Code</h2>
<h2 id="web-service-application-source-code">Web Service Application Source Code</h2>
<p>HiNC-2025-webapi apply vue.</p>
<p>The source code of HiNC-2025-webapi project is at the git repository:</p>
<p><a href="https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-webapi.git">https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-webapi.git</a></p>
<h2 id="web-architecture-patterns">Web Architecture Patterns</h2>
<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.md">Rendering Canvas on Web Service</a> - WebSocket-based 3D canvas rendering architecture using SignalR Hub</li>
</ul>
<h2 id="step-by-step-program-construction-check-list">Step by Step Program Construction Check List</h2>
<div class="TIP">

View File

@ -0,0 +1,165 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Rendering Canvas on Web Service Application | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Rendering Canvas on Web Service Application | 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="rendering-canvas-on-web-service-application">Rendering Canvas on Web Service Application</h1>
<h2 id="overview">Overview</h2>
<p>In the HiNC-2025-webapi example project, the 3D canvas rendering is handled through a WebSocket-based architecture using SignalR Hub connections.</p>
<h2 id="core-component">Core Component</h2>
<p>The primary component for 3D canvas rendering:</p>
<ul>
<li><strong>Location</strong>: <code>wwwroot/disp/rendering-canvas.js</code></li>
<li><strong>Purpose</strong>: Manages all 3D canvas rendering operations</li>
</ul>
<h2 id="connection-management">Connection Management</h2>
<h3 id="signalr-hub-connection">SignalR Hub Connection</h3>
<ul>
<li>Components using WebSocket (corresponding to SignalR Hub) receive a unique Hub <code>connectionId</code></li>
<li>The <code>rendering-canvas</code> component maintains a primary <code>connectionId</code></li>
<li>This ID serves as the index for all canvas data stream operations</li>
</ul>
<h3 id="connection-id-naming-convention">Connection ID Naming Convention</h3>
<p>In other components, the connection ID may be referenced with different naming patterns:</p>
<ul>
<li><code>renderingConnectionId</code></li>
<li><code>rendering-connectionId</code></li>
<li>Similar variations</li>
</ul>
<h3 id="naming-convention-examples">Naming Convention Examples</h3>
<p>Different components may reference the connection ID with various naming patterns:</p>
<ul>
<li><code>player-panel</code> component: uses <code>renderingConnectionId</code> (<code>wwwroot/player/player-panel.js</code>)</li>
<li>Other components may use similar variations like <code>rendering-connectionId</code></li>
</ul>
<h2 id="data-flow-architecture">Data Flow Architecture</h2>
<h3 id="frontend-responsibilities">Frontend Responsibilities</h3>
<ul>
<li>The <code>rendering-canvas</code> component handles data stream transmission via WebSocket</li>
<li>Manages real-time rendering updates through the connection ID</li>
</ul>
<h3 id="backend-integration">Backend Integration</h3>
<p>Multiple backend controllers can specify content to be rendered on the <code>rendering-canvas</code>. The architecture is designed to be flexible and reusable across different features.</p>
<h4 id="example-player-controller">Example: Player Controller</h4>
<p>One example of backend integration:</p>
<ul>
<li><strong>File</strong>: <code>Players/PlayerController.cs</code></li>
<li><strong>Method</strong>: <code>InitializePlayer</code></li>
<li><strong>Purpose</strong>: Initializes player-specific rendering content</li>
</ul>
<p>This is just one example - any controller in the application can interact with the rendering canvas using the same connection ID mechanism to display different types of 3D content</p>
<h2 id="key-points">Key Points</h2>
<ul>
<li>All canvas data stream operations are indexed by the connection ID</li>
<li>The WebSocket connection enables real-time rendering updates</li>
<li>The architecture separates rendering logic (frontend) from content specification (backend)</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>

View File

@ -39,6 +39,16 @@
</li>
</ul>
</li>
<li>
<span class="expand-stub"></span>
<a href="build-hinc/index.html" name="" title="Web Service Architecture">Web Service Architecture</a>
<ul class="nav level3">
<li>
<a href="build-hinc/hinc-web-service/disp-web-service.md" name="" title="Rendering Canvas on Web Service">Rendering Canvas on Web Service</a>
</li>
</ul>
</li>
<li>
<a href="build-hinc/initialize-hiapi.html" name="" title="Initialize HiAPI">Initialize HiAPI</a>
</li>

File diff suppressed because one or more lines are too long

View File

@ -94,8 +94,7 @@
<p><a id="Script"></a></p>
<h2 id="語法與功能">語法與功能</h2>
<p><strong>腳本</strong> (Script) 中的<strong>標題</strong> (Title) 的功能僅為註記,無其他功能,腳本的內容與標題不一定要匹配。</p>
<p>腳本預設為<strong>簡易模式</strong> (Simple Mode)該模式基於C#語言並簡化部分指令如未勾選簡易模式則腳本使用原生C#語言。</p>
<p>簡易模式腳本在執行前會先轉換為C#語言再執行。</p>
<p>腳本使用原生C#語言。</p>
<div class="NOTE">
<h5>Note</h5>
<p><strong>基本 C# 語法</strong></p>
@ -104,22 +103,8 @@
<li>可以使用 <code>//</code> 作為行尾註解。</li>
<li>可以使用<code>double.PositiveInfinity</code><code>double.NegativeInfinity</code>表示實數中的無限大及無限小。</li>
</ul>
<p>簡易模式腳本範例:</p>
<pre><code class="lang-csharp">RunNcFile(&quot;NC/file1.nc&quot;);
</code></pre>
</div>
<div class="NOTE">
<h5>Note</h5>
<p><strong>簡易模式與原生C#語言(進階)</strong></p>
<p>本段供有C#開發經驗的工程師參考。</p>
<p>腳本執行函數回傳的物件<code>IEnumerable&lt;Action&gt;</code></p>
<p>撥放器在<code>Action</code>之間可以執行暫停(Pause)。</p>
<p>與簡易模式腳本範例對照的典型原生C#語言腳本範例:</p>
<pre><code class="lang-csharp">IEnumerable&lt;Action&gt; Run(){
foreach(var action in RunNcFile(&quot;NC/file1.nc&quot;)) yield return action;
yield return null;
}
return Run();
<p>腳本範例:</p>
<pre><code class="lang-csharp">PlayNcFile(&quot;NC/file1.nc&quot;);
</code></pre>
</div>
<p><a id="FileTemplate"></a></p>
@ -128,8 +113,8 @@ return Run();
<div class="TIP">
<h5>Tip</h5>
<p><strong>指令範例</strong></p>
<pre><code class="lang-csharp">RunNcFile(&quot;NC/file1.nc&quot;);
RunNcFile(&quot;NC/file2.nc&quot;);
<pre><code class="lang-csharp">PlayNcFile(&quot;NC/file1.nc&quot;);
PlayNcFile(&quot;NC/file2.nc&quot;);
WriteShotFiles(&quot;Output/[NcName].shot.csv&quot;, 1);
// 輸出檔案至:
// Output/file1.nc.shot.csv

View File

@ -116,7 +116,7 @@
<pre><code>ClearTimeMappingData();
AddTimeDataByFile( &quot;lineA&quot;, &quot;Mapping/sensor1.csv&quot;, &quot;18:25:51.7100&quot;, &quot;18:26:12.9910&quot;);
AddTimeDataByFile( &quot;lineB&quot;, &quot;Mapping/sensor1.csv&quot;, &quot;18:26:30.5750&quot;, &quot;18:27:12.2880&quot;);
RunNcFile(&quot;NC/file1.nc&quot;)
PlayNcFile(&quot;NC/file1.nc&quot;)
</code></pre>
</div>
<p>輸入檔案格式為csv須包含時間資訊其餘資訊可選擇包含或不包含。</p>

View File

@ -108,7 +108,7 @@ ReTrainMillingPara(&lt;樣本旗標&gt;, &lt;檔案輸出路徑&gt;);
<pre><code>ClearTimeMappingData();
AddTimeDataByFile( &quot;lineA&quot;, &quot;Mapping/sensor1.csv&quot;, &quot;18:25:51.7100&quot;, &quot;18:26:12.9910&quot;);
AddTimeDataByFile( &quot;lineB&quot;, &quot;Mapping/sensor1.csv&quot;, &quot;18:26:30.5750&quot;, &quot;18:27:12.2880&quot;);
RunNcFile(&quot;NC/file1.nc&quot;)
PlayNcFile(&quot;NC/file1.nc&quot;)
TrainMillingPara(Fx|Fy|Fz, &quot;StainlessSteel.mp&quot;);
</code></pre>
</div>
@ -118,7 +118,7 @@ TrainMillingPara(Fx|Fy|Fz, &quot;StainlessSteel.mp&quot;);
<pre><code>ClearTimeMappingData();
AddTimeDataByFile( &quot;lineA&quot;, &quot;Mapping/sensor1.csv&quot;, &quot;18:25:51.7100&quot;, &quot;18:26:12.9910&quot;);
AddTimeDataByFile( &quot;lineB&quot;, &quot;Mapping/sensor1.csv&quot;, &quot;18:26:30.5750&quot;, &quot;18:27:12.2880&quot;);
RunNcFile(&quot;NC/file1.nc&quot;)
PlayNcFile(&quot;NC/file1.nc&quot;)
ReTrainMillingPara(Fz|Mx|My|Mz, &quot;StainlessSteel.mp&quot;);
</code></pre>
</div>

View File

@ -195,10 +195,10 @@ OptExtendedPostDistance_mm = 2;
OptSpindlePowerSafetyFactor = 1.5;
OptSpindleTorqueSafetyFactor = 1.5;
OptPreferedForce_N = double.PositiveInfinity;
RunNcFile(&quot;NC/file1.nc&quot;);
PlayNcFile(&quot;NC/file1.nc&quot;);
OptRapidFeed_mmdmin = 8000;
RunNcFile(&quot;NC/file2.nc&quot;);
PlayNcFile(&quot;NC/file2.nc&quot;);
OptimizeToFiles(&quot;Cache/Opt-[NcName]&quot;);
</code></pre>

View File

@ -0,0 +1,149 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>執行CSV檔 | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="執行CSV檔 | 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="執行csv檔">執行CSV檔</h1>
<p>以CSV格式檔案驅動仿真。</p>
<p>執行NC檔指令為 <code>PlayCsvFile</code> &lt;檔案路徑&gt; 的根目錄為專案目錄。</p>
<div class="NOTE">
<h5>Note</h5>
<p><strong>指令格式</strong></p>
<pre><code class="lang-csharp">PlayCsvFile(&lt;檔案路徑&gt;);
</code></pre>
</div>
<div class="TIP">
<h5>Tip</h5>
<p><strong>指令範例</strong></p>
<pre><code class="lang-csharp">PlayCsvFile(&quot;Data/file1.csv&quot;);
</code></pre>
</div>
<div class="TIP">
<h5>Tip</h5>
<p>本撥放器可直接讀取&lt;xref:Cmd-WriteStepFiles&gt;匯出之檔案。</p>
</div>
<h2 id="檔案格式">檔案格式</h2>
<p>驅動的CSV檔案為逗號分隔第一列須為標頭列。其餘每列為一步。標頭大小寫不同會被視為不同資料。</p>
<h2 id="驅動欄位">驅動欄位</h2>
<p>依預設設定,關鍵的 CSV 欄位標題如下。這些欄位的資料會驅動模擬。</p>
<p><code>MC.X</code>, <code>MC.Y</code>, <code>MC.Z</code>, <code>MC.A</code>, <code>MC.B</code>, <code>MC.C</code>,
<code>ToolId</code>,
<code>SpindleSpeed</code>,
<code>Feedrate_mmdmin</code>,
<code>StepDuration</code></p>
<p>這些欄位標題可以在 <code>.hincproj</code><code>CsvRunnerConfig</code> 中更改。</p>
<h2 id="自訂欄位">自訂欄位</h2>
<p>其他資料如感測器、事後分析資料等也可放入CSV檔中系統支援該資料的工件顏色梯度圖、時間序列圖、點選追蹤功能。</p>
<div class="TIP">
<h5>Tip</h5>
<p><a href="example.csv">本範例檔案</a>為可驅動系統的CSV檔案。</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>

View File

@ -87,17 +87,17 @@
<article data-uid="">
<h1 id="執行nc檔">執行NC檔</h1>
<p>執行NC檔指令為 <code>RunNcFile</code> &lt;檔案路徑&gt; 的根目錄為專案目錄。</p>
<p>執行NC檔指令為 <code>PlayNcFile</code> &lt;檔案路徑&gt; 的根目錄為專案目錄。</p>
<div class="NOTE">
<h5>Note</h5>
<p><strong>指令格式</strong></p>
<pre><code class="lang-csharp">RunNcFile(&lt;檔案路徑&gt;);
<pre><code class="lang-csharp">PlayNcFile(&lt;檔案路徑&gt;);
</code></pre>
</div>
<div class="TIP">
<h5>Tip</h5>
<p><strong>指令範例</strong></p>
<pre><code class="lang-csharp">RunNcFile(&quot;NC/file1.nc&quot;);
<pre><code class="lang-csharp">PlayNcFile(&quot;NC/file1.nc&quot;);
</code></pre>
</div>

View File

@ -116,7 +116,7 @@ WriteRuntimeGeomToStl(&lt;檔案路徑&gt;, &lt;解析度(mm)&gt; = 0);
<h5>Tip</h5>
<p><strong>指令範例</strong></p>
<pre><code class="lang-csharp">ReadRuntimeGeom(&quot;Cache/init.wct&quot;);
RunNcFile(&quot;NC/file1.nc&quot;);
PlayNcFile(&quot;NC/file1.nc&quot;);
WriteRuntimeGeom(&quot;Cache/file1.wct&quot;);
WriteRuntimeGeomToStl(&quot;Output/file1.stl&quot;);
</code></pre>

View File

@ -122,7 +122,10 @@
<a href="script/Resolution/index.html" name="" title="解析度">解析度</a>
</li>
<li>
<a href="script/RunNcFile/index.html" name="" title="運行NC檔案">運行NC檔案</a>
<a href="script/PlayNcFile/index.html" name="" title="執行NC檔案">執行NC檔案</a>
</li>
<li>
<a href="script/PlayCsvFile/play-csv-file.html" name="" title="執行CSV檔案">執行CSV檔案</a>
</li>
<li>
<a href="script/RuntimeGeom/index.html" name="" title="運行時幾何">運行時幾何</a>

View File

@ -1,2 +1,2 @@
{"items":[{"name":"HiNC 使用說明","href":"index.html","topicHref":"index.html"},{"name":"使用者條款","href":"license/index.html","topicHref":"license/index.html"},{"name":"HiNC啟用","items":[{"name":"Windows系統啟用","href":"startup/windows.html","topicHref":"startup/windows.html"},{"name":"單機多站配置","href":"startup/multi-station.html","topicHref":"startup/multi-station.html"},{"name":"多主機授權設置","href":"startup/delegate-auth.html","topicHref":"startup/delegate-auth.html"},{"name":"教學視頻","href":"startup/tutorial.html","topicHref":"startup/tutorial.html"}]},{"name":"系統","items":[{"name":"檔案總管","href":"system/file-explorer.html","topicHref":"system/file-explorer.html"}]},{"name":"設備","items":[{"name":"錨點","href":"mech/anchor.html","topicHref":"mech/anchor.html"},{"name":"工具機建置","href":"equipment/build-machine-tool.html","topicHref":"equipment/build-machine-tool.html"},{"name":"冷卻液","href":"equipment/coolant.html","topicHref":"equipment/coolant.html"}]},{"name":"控制器","items":[{"name":"海德漢支援","href":"controllers/heidenhain-support.html","topicHref":"controllers/heidenhain-support.html"},{"name":"通用NC碼支援","href":"controllers/iso-nc-support.html","topicHref":"controllers/iso-nc-support.html"}]},{"name":"加工工具","items":[{"name":"銑刀","href":"milling-tool/cutter.html","topicHref":"milling-tool/cutter.html"},{"name":"APT工具","href":"milling-tool/apt.html","topicHref":"milling-tool/apt.html"},{"name":"智慧刀把","href":"milling-tool/smart-tool-holder.html","topicHref":"milling-tool/smart-tool-holder.html"}]},{"name":"腳本命令","items":[{"name":"文件任務","href":"script/Doc-Task/index.html","topicHref":"script/Doc-Task/index.html"},{"name":"碰撞檢測","href":"script/Collision/index.html","topicHref":"script/Collision/index.html"},{"name":"離料","href":"script/FlyPiece/index.html","topicHref":"script/FlyPiece/index.html"},{"name":"幾何差異","href":"script/GeomDiff/index.html","topicHref":"script/GeomDiff/index.html"},{"name":"映射","href":"script/Mapping/index.html","topicHref":"script/Mapping/index.html"},{"name":"銑削訓練","href":"script/MillingTraining/index.html","topicHref":"script/MillingTraining/index.html"},{"name":"NC優化","href":"script/NcOptimization/index.html","topicHref":"script/NcOptimization/index.html"},{"name":"解析度","href":"script/Resolution/index.html","topicHref":"script/Resolution/index.html"},{"name":"運行NC檔案","href":"script/RunNcFile/index.html","topicHref":"script/RunNcFile/index.html"},{"name":"運行時幾何","href":"script/RuntimeGeom/index.html","topicHref":"script/RuntimeGeom/index.html"},{"name":"輸出Shot檔案","href":"script/WriteShotFiles/index.html","topicHref":"script/WriteShotFiles/index.html"},{"name":"輸出Step檔案","href":"script/WriteStepFiles/index.html","topicHref":"script/WriteStepFiles/index.html"}]},{"name":"輸出","items":[{"name":"模擬步階輸出資訊","href":"output/simulation-step-output.html","topicHref":"output/simulation-step-output.html"}]},{"name":"優化","items":[{"name":"NC優化","href":"optimization/index.html","topicHref":"optimization/index.html"}]},{"name":"理論與技術","items":[{"name":"銑削物理座標系","href":"theory-and-technique/milling-physics-coordinates.html","topicHref":"theory-and-technique/milling-physics-coordinates.html"},{"name":"評估製程可加工性","href":"availability/index.html","topicHref":"availability/index.html"},{"name":"刀具壽命與磨耗","href":"technique/wear.html","topicHref":"technique/wear.html"}]}]}
{"items":[{"name":"HiNC 使用說明","href":"index.html","topicHref":"index.html"},{"name":"使用者條款","href":"license/index.html","topicHref":"license/index.html"},{"name":"HiNC啟用","items":[{"name":"Windows系統啟用","href":"startup/windows.html","topicHref":"startup/windows.html"},{"name":"單機多站配置","href":"startup/multi-station.html","topicHref":"startup/multi-station.html"},{"name":"多主機授權設置","href":"startup/delegate-auth.html","topicHref":"startup/delegate-auth.html"},{"name":"教學視頻","href":"startup/tutorial.html","topicHref":"startup/tutorial.html"}]},{"name":"系統","items":[{"name":"檔案總管","href":"system/file-explorer.html","topicHref":"system/file-explorer.html"}]},{"name":"設備","items":[{"name":"錨點","href":"mech/anchor.html","topicHref":"mech/anchor.html"},{"name":"工具機建置","href":"equipment/build-machine-tool.html","topicHref":"equipment/build-machine-tool.html"},{"name":"冷卻液","href":"equipment/coolant.html","topicHref":"equipment/coolant.html"}]},{"name":"控制器","items":[{"name":"海德漢支援","href":"controllers/heidenhain-support.html","topicHref":"controllers/heidenhain-support.html"},{"name":"通用NC碼支援","href":"controllers/iso-nc-support.html","topicHref":"controllers/iso-nc-support.html"}]},{"name":"加工工具","items":[{"name":"銑刀","href":"milling-tool/cutter.html","topicHref":"milling-tool/cutter.html"},{"name":"APT工具","href":"milling-tool/apt.html","topicHref":"milling-tool/apt.html"},{"name":"智慧刀把","href":"milling-tool/smart-tool-holder.html","topicHref":"milling-tool/smart-tool-holder.html"}]},{"name":"腳本命令","items":[{"name":"文件任務","href":"script/Doc-Task/index.html","topicHref":"script/Doc-Task/index.html"},{"name":"碰撞檢測","href":"script/Collision/index.html","topicHref":"script/Collision/index.html"},{"name":"離料","href":"script/FlyPiece/index.html","topicHref":"script/FlyPiece/index.html"},{"name":"幾何差異","href":"script/GeomDiff/index.html","topicHref":"script/GeomDiff/index.html"},{"name":"映射","href":"script/Mapping/index.html","topicHref":"script/Mapping/index.html"},{"name":"銑削訓練","href":"script/MillingTraining/index.html","topicHref":"script/MillingTraining/index.html"},{"name":"NC優化","href":"script/NcOptimization/index.html","topicHref":"script/NcOptimization/index.html"},{"name":"解析度","href":"script/Resolution/index.html","topicHref":"script/Resolution/index.html"},{"name":"執行NC檔案","href":"script/PlayNcFile/index.html","topicHref":"script/PlayNcFile/index.html"},{"name":"執行CSV檔案","href":"script/PlayCsvFile/play-csv-file.html","topicHref":"script/PlayCsvFile/play-csv-file.html"},{"name":"運行時幾何","href":"script/RuntimeGeom/index.html","topicHref":"script/RuntimeGeom/index.html"},{"name":"輸出Shot檔案","href":"script/WriteShotFiles/index.html","topicHref":"script/WriteShotFiles/index.html"},{"name":"輸出Step檔案","href":"script/WriteStepFiles/index.html","topicHref":"script/WriteStepFiles/index.html"}]},{"name":"輸出","items":[{"name":"模擬步階輸出資訊","href":"output/simulation-step-output.html","topicHref":"output/simulation-step-output.html"}]},{"name":"優化","items":[{"name":"NC優化","href":"optimization/index.html","topicHref":"optimization/index.html"}]},{"name":"理論與技術","items":[{"name":"銑削物理座標系","href":"theory-and-technique/milling-physics-coordinates.html","topicHref":"theory-and-technique/milling-physics-coordinates.html"},{"name":"評估製程可加工性","href":"availability/index.html","topicHref":"availability/index.html"},{"name":"刀具壽命與磨耗","href":"technique/wear.html","topicHref":"technique/wear.html"}]}]}

View File

@ -4772,7 +4772,7 @@
"brief/dev-doc/build-hinc/index.html": {
"href": "brief/dev-doc/build-hinc/index.html",
"title": "Sketch to Build HiNC GUI | HiAPI-C# 2025",
"summary": "Sketch to Build HiNC GUI Apply General Rules to build the HiNC GUI. WPF Application Source Code The source code of HiNC-2025-win-desktop project is at the git repository: https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-win-desktop.git Web Page Application Source Code HiNC-2025-webapi apply vue. The source code of HiNC-2025-webapi project is at the git repository: https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-webapi.git Web Architecture Patterns DictionaryService and DictionaryHub Pattern - Connection-scoped object indexing for hierarchical components Step by Step Program Construction Check List Tip If you are using AI agent to build the application: Ask AI to do only one job at one time to ensure the quality. Create and config a application project. Set the project platform to x64. Create a application project. Add HiNc packages to the project. See Getting Started to config the packages. Note Add Hi.Wpf packages to the project if the building WPF project. Create Main Window, set the layout according to Main Panel Layout. Build Message Section according to Message Section on Main Panel. Initialize HiAPI at application entry point according to Initialize HiAPI. Set behavior of Navigation Menu/Project according to Behavior of Navigation Menu/Project. Create RenderingCanvas Tool Bar for later usage. Create by Player Panel the Player Panel Step by Step Program Construction Check List. Build behavior of Graphic-Cache Dropdown. Build basic GUI widget component: Vec3dControl Build Transformers Build Geometry Panels. Build Fixture Page. Build Workpiece Page. Build Controller Page. Build ToolHouse Page. Add application icon, splash screen and etc.. (The content is consturcting..) Tip Complete the check list step by step. Compile to ensure the code work on each step completed. You MUST read the cited hyperlink before you do the job. ASK if you think the hyperlink is not work."
"summary": "Sketch to Build HiNC GUI Apply General Rules to build the HiNC GUI. WPF Application Source Code The source code of HiNC-2025-win-desktop project is at the git repository: https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-win-desktop.git Web Service Application Source Code HiNC-2025-webapi apply vue. The source code of HiNC-2025-webapi project is at the git repository: https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-webapi.git Web Architecture Patterns DictionaryService and DictionaryHub Pattern - Connection-scoped object indexing for hierarchical components Rendering Canvas on Web Service - WebSocket-based 3D canvas rendering architecture using SignalR Hub Step by Step Program Construction Check List Tip If you are using AI agent to build the application: Ask AI to do only one job at one time to ensure the quality. Create and config a application project. Set the project platform to x64. Create a application project. Add HiNc packages to the project. See Getting Started to config the packages. Note Add Hi.Wpf packages to the project if the building WPF project. Create Main Window, set the layout according to Main Panel Layout. Build Message Section according to Message Section on Main Panel. Initialize HiAPI at application entry point according to Initialize HiAPI. Set behavior of Navigation Menu/Project according to Behavior of Navigation Menu/Project. Create RenderingCanvas Tool Bar for later usage. Create by Player Panel the Player Panel Step by Step Program Construction Check List. Build behavior of Graphic-Cache Dropdown. Build basic GUI widget component: Vec3dControl Build Transformers Build Geometry Panels. Build Fixture Page. Build Workpiece Page. Build Controller Page. Build ToolHouse Page. Add application icon, splash screen and etc.. (The content is consturcting..) Tip Complete the check list step by step. Compile to ensure the code work on each step completed. You MUST read the cited hyperlink before you do the job. ASK if you think the hyperlink is not work."
},
"brief/dev-doc/build-hinc/initialize-hiapi.html": {
"href": "brief/dev-doc/build-hinc/initialize-hiapi.html",
@ -5004,6 +5004,11 @@
"title": "Getting Started with HiAPI | HiAPI-C# 2025",
"summary": "Getting Started with HiAPI This guide will help you get started with HiAPI development. Installation Create a dotnet project. Setting the nuget server and account. The HiAPI installation is typical Nuget Package installation. You can apply global or local nuget setting. Here apply the local solution for startup. Create a file and name it to nuget.config in the same folder of your dotnet project file. the content of the file is as the following: <?xml version=\"1.0\" encoding=\"utf-8\"?> <configuration> <packageSources> <add key=\"HiAPI\" value=\"https://superhightech-gitea.webredirect.org/api/packages/HiAPI/nuget/index.json\" /> <add key=\"nuget.org\" value=\"https://api.nuget.org/v3/index.json\" protocolVersion=\"3\" /> </packageSources> <packageSourceCredentials> <HiAPI> <add key=\"Username\" value=\"xxxxxx\" /> <add key=\"ClearTextPassword\" value=\"xxxxxx\" /> </HiAPI> </packageSourceCredentials> </configuration> In the dotnet project file, add the package reference. <ItemGroup> <PackageReference Include=\"HiNc\" Version=\"3.1.*\" /> <!--optional--> <PackageReference Include=\"Hi.Wpf\" Version=\"*\" /> </ItemGroup> In the program file, setting the HiNC application initialization and finalization. using Hi.Disp; using Hi.HiNcKits; using Hi.Licenses; using Hi.MongoUtils; using System; namespace Sample { /// <summary> /// A sample class demonstrating initialization and usage of the HiAPI framework. /// Shows the basic setup of display engine, MongoDB server, licensing, and other core functionality. /// </summary> /// <remarks> /// This example serves as an entry point for those getting started with HiAPI. /// It demonstrates proper initialization and teardown of key components. /// ### Source Code /// [!code-csharp[SampleCode](~/../Hi.Sample/HelloHiAPI.cs)] /// </remarks> public static class HelloHiAPI { static int Main(string[] args) { Console.WriteLine(\"HiAPI starting.\"); LocalApp.AppBegin(); Console.WriteLine(\"Hello World! HiAPI.\"); LocalApp.AppEnd(); Console.WriteLine(\"HiAPI exited.\"); return 0; } } } Sample Code to Start a MachiningProject See the following sample code to start a HiAPI application. DemoBuildMachiningProject Build a MachiningProject. DemoUseMachiningProject Load a MachiningProject and run NC simulation. DemoRenderingMachiningProcessAndStripPosSelection Apply MachiningProject to 3D canvas with user-interaction in windows platform."
},
"brief/dev-doc/hinc-web-service/disp-web-service.html": {
"href": "brief/dev-doc/hinc-web-service/disp-web-service.html",
"title": "Rendering Canvas on Web Service Application | HiAPI-C# 2025",
"summary": "Rendering Canvas on Web Service Application Overview In the HiNC-2025-webapi example project, the 3D canvas rendering is handled through a WebSocket-based architecture using SignalR Hub connections. Core Component The primary component for 3D canvas rendering: Location: wwwroot/disp/rendering-canvas.js Purpose: Manages all 3D canvas rendering operations Connection Management SignalR Hub Connection Components using WebSocket (corresponding to SignalR Hub) receive a unique Hub connectionId The rendering-canvas component maintains a primary connectionId This ID serves as the index for all canvas data stream operations Connection ID Naming Convention In other components, the connection ID may be referenced with different naming patterns: renderingConnectionId rendering-connectionId Similar variations Naming Convention Examples Different components may reference the connection ID with various naming patterns: player-panel component: uses renderingConnectionId (wwwroot/player/player-panel.js) Other components may use similar variations like rendering-connectionId Data Flow Architecture Frontend Responsibilities The rendering-canvas component handles data stream transmission via WebSocket Manages real-time rendering updates through the connection ID Backend Integration Multiple backend controllers can specify content to be rendered on the rendering-canvas. The architecture is designed to be flexible and reusable across different features. Example: Player Controller One example of backend integration: File: Players/PlayerController.cs Method: InitializePlayer Purpose: Initializes player-specific rendering content This is just one example - any controller in the application can interact with the rendering canvas using the same connection ID mechanism to display different types of 3D content Key Points All canvas data stream operations are indexed by the connection ID The WebSocket connection enables real-time rendering updates The architecture separates rendering logic (frontend) from content specification (backend)"
},
"brief/dev-doc/index.html": {
"href": "brief/dev-doc/index.html",
"title": "HiAPI Overview | HiAPI-C# 2025",
@ -5247,7 +5252,7 @@
"brief/user-guide/zh-Hant/script/Doc-Task/index.html": {
"href": "brief/user-guide/zh-Hant/script/Doc-Task/index.html",
"title": "腳本 | HiAPI-C# 2025",
"summary": "腳本 任務(Task)頁面會依照順序執行腳本,頁面排版順序為由左至右,再由上至下。 腳本工具列 個別腳本的工具列的順序(Order)欄位為執行順序,如果沒有勾選啟用,則該任務會無視執行順序被略過。 工具欄可新增、刪除腳本。 語法與功能 腳本 (Script) 中的標題 (Title) 的功能僅為註記,無其他功能,腳本的內容與標題不一定要匹配。 腳本預設為簡易模式 (Simple Mode)該模式基於C#語言並簡化部分指令;如未勾選簡易模式,則腳本使用原生C#語言。 簡易模式腳本在執行前會先轉換為C#語言再執行。 Note 基本 C# 語法 指令以分號 ; 作為結束符號。 可以使用 // 作為行尾註解。 可以使用double.PositiveInfinity、double.NegativeInfinity表示實數中的無限大及無限小。 簡易模式腳本範例: RunNcFile(\"NC/file1.nc\"); Note 簡易模式與原生C#語言(進階) 本段供有C#開發經驗的工程師參考。 腳本執行函數回傳的物件IEnumerable<Action>。 撥放器在Action之間可以執行暫停(Pause)。 與簡易模式腳本範例對照的典型原生C#語言腳本範例: IEnumerable<Action> Run(){ foreach(var action in RunNcFile(\"NC/file1.nc\")) yield return action; yield return null; } return Run(); 多檔案輸出樣板 在有支援路徑樣板的指令中,路徑字串裡的[NcName]會被替換為NC檔案的名稱。 Tip 指令範例 RunNcFile(\"NC/file1.nc\"); RunNcFile(\"NC/file2.nc\"); WriteShotFiles(\"Output/[NcName].shot.csv\", 1); // 輸出檔案至: // Output/file1.nc.shot.csv // Output/file2.nc.shot.csv OptimizeToFiles(\"Cache/Opt-[NcName]\"); // 輸出檔案至: // Cache/Opt-file1.nc // Cache/Opt-file2.nc NC碼中的腳本指令 在註解內,以;@開頭會在該行NC執行前執行腳本指令。 Tip FANUC NC檔範例在換刀時更改仿真解析度 ... G40 G17 G49 G54 G80 G91 G28 Z0.0 T01 M06 (;@MachiningResolution_mm=0.03125;) S1270 M03 G43 Z10. H01 ..."
"summary": "腳本 任務(Task)頁面會依照順序執行腳本,頁面排版順序為由左至右,再由上至下。 腳本工具列 個別腳本的工具列的順序(Order)欄位為執行順序,如果沒有勾選啟用,則該任務會無視執行順序被略過。 工具欄可新增、刪除腳本。 語法與功能 腳本 (Script) 中的標題 (Title) 的功能僅為註記,無其他功能,腳本的內容與標題不一定要匹配。 腳本使用原生C#語言。 Note 基本 C# 語法 指令以分號 ; 作為結束符號。 可以使用 // 作為行尾註解。 可以使用double.PositiveInfinity、double.NegativeInfinity表示實數中的無限大及無限小。 腳本範例: PlayNcFile(\"NC/file1.nc\"); 多檔案輸出樣板 在有支援路徑樣板的指令中,路徑字串裡的[NcName]會被替換為NC檔案的名稱。 Tip 指令範例 PlayNcFile(\"NC/file1.nc\"); PlayNcFile(\"NC/file2.nc\"); WriteShotFiles(\"Output/[NcName].shot.csv\", 1); // 輸出檔案至: // Output/file1.nc.shot.csv // Output/file2.nc.shot.csv OptimizeToFiles(\"Cache/Opt-[NcName]\"); // 輸出檔案至: // Cache/Opt-file1.nc // Cache/Opt-file2.nc NC碼中的腳本指令 在註解內,以;@開頭會在該行NC執行前執行腳本指令。 Tip FANUC NC檔範例在換刀時更改仿真解析度 ... G40 G17 G49 G54 G80 G91 G28 Z0.0 T01 M06 (;@MachiningResolution_mm=0.03125;) S1270 M03 G43 Z10. H01 ..."
},
"brief/user-guide/zh-Hant/script/FlyPiece/index.html": {
"href": "brief/user-guide/zh-Hant/script/FlyPiece/index.html",
@ -5262,32 +5267,37 @@
"brief/user-guide/zh-Hant/script/Mapping/index.html": {
"href": "brief/user-guide/zh-Hant/script/Mapping/index.html",
"title": "資料映射 | HiAPI-C# 2025",
"summary": "資料映射 外部資料包含智慧刀把、動力計,可依時間線性映射至指定刀具路徑及加工區域。 映射資料可用於檢視加工狀態、訓練銑削係數、校正銑削係數。 所以資料映射需指定映射之兩部指定輸入資料、指定NC路徑。 資料映射圖例 指定輸入資料 Note 指令格式 AddTimeDataByFile(<映射名>, <輸入檔案路徑>, <映射起點時間>, <映射終點時間>); <映射名>為自訂之標記名稱對應於指定NC路徑中的映射名。 時間資料格式為<時>:<分>:<秒>.<小數點後秒>;其餘資料格式為實數。 注意映射資料不會因撥放器重置而被清空。可以使用ClearTimeMappingData指令清空。 Note 指令格式 ClearTimeMappingData(); Tip 指令範例 ClearTimeMappingData(); AddTimeDataByFile( \"lineA\", \"Mapping/sensor1.csv\", \"18:25:51.7100\", \"18:26:12.9910\"); AddTimeDataByFile( \"lineB\", \"Mapping/sensor1.csv\", \"18:26:30.5750\", \"18:27:12.2880\"); RunNcFile(\"NC/file1.nc\") 輸入檔案格式為csv須包含時間資訊其餘資訊可選擇包含或不包含。 csv檔案需有標題列欄位標題需用特定指示詞標示。 部分欄位指示詞為方便性是多擇一。 時間: TimeTag Timetag Time t 動力計: X方向力 Fx Workpiece.Fx Y方向力 Fy Workpiece.Fy Z方向力 Fz Workpiece.Fz 智慧刀把: X方向力矩 Mx Spindle.Mx Y方向力矩 My Spindle.My Z方向力矩 Mz Spindle.Mz 加速規(可選) Ax Ay Az 欄位可以包含其他外部資訊如下例之CH1、CH2。 Tip 檔案範例 TimeTag,CH1,CH2,Mx,My,Mz 18:23:54.703,-0.00398,-0.00034,-0.02923,0.10733,0.00409 18:23:54.704,-0.00194,0.00285,0.04155,-0.04457,0.00448 ... 指定NC路徑 Note 指令格式 //範圍(多行)資料映射 BeginSelection(<映射名>, <起點映射錨點旗標>, <起點偏置物件>); EndSelection(<映射名>, <終點映射錨點旗標>, <終點偏置物件>); //單行資料映射 LineSelection(<映射名>, <起點映射錨點旗標>, <起點偏置物件>, <終點映射錨點旗標>, <終點偏置物件>); <映射名>為自訂之標記名稱,對應於指定輸入資料中的映射名。 可以使用BeginSelection與EndSelection作範圍(多行)資料映射: BeginSelection設置映射起點。 EndSelection設置映射終點。 或是使用LineSelection作單行資料映射。 <映射錨點旗標>可以使用: LineBegin 以該行運動起點為映射錨點。 LineEnd 以該行運動終點為映射錨點。 FirstTouch 以該行第一次接觸工件的位置為映射錨點。 LastTouch 以該行最後接觸工件的位置為映射錨點。 <偏置物件>是相對於錨點的偏移,可以使用: null 無偏移。 ShiftTime_s 單位秒。正值為往後時間;負值為往前時間。 ShiftDistance_mm 單位mm。正值為往後位移負值為往前位移。 指定NC路徑命令需在NC碼註解中執行前置;@符號。 Tip NC檔案範例 ... G00 G90 X-6. Y10. G17 G01 Z-1. F600. S50 M03 X13. F20 ;@LineSelection(\"lineA\", FirstTouch, ShiftTime_s(2), LineEnd, ShiftDistance_mm(-1)); X25. F10 ;@LineSelection(\"lineB\", FirstTouch, null, LastTouch, null); ... Tip NC檔案範例2 如果控制器不支援;符號作為註解如FANUC控制器則需將其引入註解範圍內。 ... G00 G90 X-6. Y10. G17 G01 Z-1. F600. S50 M03 X13. F20 (;@LineSelection(\"lineA\", FirstTouch, ShiftTime_s(2), LineEnd, ShiftDistance_mm(-1));) X25. F10 (;@LineSelection(\"lineB\", FirstTouch, null, LastTouch, null);) ..."
"summary": "資料映射 外部資料包含智慧刀把、動力計,可依時間線性映射至指定刀具路徑及加工區域。 映射資料可用於檢視加工狀態、訓練銑削係數、校正銑削係數。 所以資料映射需指定映射之兩部指定輸入資料、指定NC路徑。 資料映射圖例 指定輸入資料 Note 指令格式 AddTimeDataByFile(<映射名>, <輸入檔案路徑>, <映射起點時間>, <映射終點時間>); <映射名>為自訂之標記名稱對應於指定NC路徑中的映射名。 時間資料格式為<時>:<分>:<秒>.<小數點後秒>;其餘資料格式為實數。 注意映射資料不會因撥放器重置而被清空。可以使用ClearTimeMappingData指令清空。 Note 指令格式 ClearTimeMappingData(); Tip 指令範例 ClearTimeMappingData(); AddTimeDataByFile( \"lineA\", \"Mapping/sensor1.csv\", \"18:25:51.7100\", \"18:26:12.9910\"); AddTimeDataByFile( \"lineB\", \"Mapping/sensor1.csv\", \"18:26:30.5750\", \"18:27:12.2880\"); PlayNcFile(\"NC/file1.nc\") 輸入檔案格式為csv須包含時間資訊其餘資訊可選擇包含或不包含。 csv檔案需有標題列欄位標題需用特定指示詞標示。 部分欄位指示詞為方便性是多擇一。 時間: TimeTag Timetag Time t 動力計: X方向力 Fx Workpiece.Fx Y方向力 Fy Workpiece.Fy Z方向力 Fz Workpiece.Fz 智慧刀把: X方向力矩 Mx Spindle.Mx Y方向力矩 My Spindle.My Z方向力矩 Mz Spindle.Mz 加速規(可選) Ax Ay Az 欄位可以包含其他外部資訊如下例之CH1、CH2。 Tip 檔案範例 TimeTag,CH1,CH2,Mx,My,Mz 18:23:54.703,-0.00398,-0.00034,-0.02923,0.10733,0.00409 18:23:54.704,-0.00194,0.00285,0.04155,-0.04457,0.00448 ... 指定NC路徑 Note 指令格式 //範圍(多行)資料映射 BeginSelection(<映射名>, <起點映射錨點旗標>, <起點偏置物件>); EndSelection(<映射名>, <終點映射錨點旗標>, <終點偏置物件>); //單行資料映射 LineSelection(<映射名>, <起點映射錨點旗標>, <起點偏置物件>, <終點映射錨點旗標>, <終點偏置物件>); <映射名>為自訂之標記名稱,對應於指定輸入資料中的映射名。 可以使用BeginSelection與EndSelection作範圍(多行)資料映射: BeginSelection設置映射起點。 EndSelection設置映射終點。 或是使用LineSelection作單行資料映射。 <映射錨點旗標>可以使用: LineBegin 以該行運動起點為映射錨點。 LineEnd 以該行運動終點為映射錨點。 FirstTouch 以該行第一次接觸工件的位置為映射錨點。 LastTouch 以該行最後接觸工件的位置為映射錨點。 <偏置物件>是相對於錨點的偏移,可以使用: null 無偏移。 ShiftTime_s 單位秒。正值為往後時間;負值為往前時間。 ShiftDistance_mm 單位mm。正值為往後位移負值為往前位移。 指定NC路徑命令需在NC碼註解中執行前置;@符號。 Tip NC檔案範例 ... G00 G90 X-6. Y10. G17 G01 Z-1. F600. S50 M03 X13. F20 ;@LineSelection(\"lineA\", FirstTouch, ShiftTime_s(2), LineEnd, ShiftDistance_mm(-1)); X25. F10 ;@LineSelection(\"lineB\", FirstTouch, null, LastTouch, null); ... Tip NC檔案範例2 如果控制器不支援;符號作為註解如FANUC控制器則需將其引入註解範圍內。 ... G00 G90 X-6. Y10. G17 G01 Z-1. F600. S50 M03 X13. F20 (;@LineSelection(\"lineA\", FirstTouch, ShiftTime_s(2), LineEnd, ShiftDistance_mm(-1));) X25. F10 (;@LineSelection(\"lineB\", FirstTouch, null, LastTouch, null);) ..."
},
"brief/user-guide/zh-Hant/script/MillingTraining/index.html": {
"href": "brief/user-guide/zh-Hant/script/MillingTraining/index.html",
"title": "訓練與校正銑削係數 | HiAPI-C# 2025",
"summary": "訓練與校正銑削係數 銑削係數為計算銑削力的必須參數。 訓練與校正銑削係數需先完成資料映射。 TrainMillingPara訓練銑削係數不需先設定工件銑削係數輸出的新係數也與原工件銑削係數無關。 ReTrainMillingPara校正銑削係數需基於已設定之工件銑削係數才可輸出校正後係數。校正時原係數的權重10%、從資訊映射而得的樣本權重90%。 Note 指令格式 //訓練銑削係數 TrainMillingPara(<樣本旗標>, <檔案輸出路徑>); //校正銑削係數 ReTrainMillingPara(<樣本旗標>, <檔案輸出路徑>); <樣本旗標> 為應用於訓練資料的資料種類包含Fx、Fy、Fz、Mx、My、Mz。 使用|號作聯集。 Tip 以動力計資料為例,輸出訓練銑削係數 ClearTimeMappingData(); AddTimeDataByFile( \"lineA\", \"Mapping/sensor1.csv\", \"18:25:51.7100\", \"18:26:12.9910\"); AddTimeDataByFile( \"lineB\", \"Mapping/sensor1.csv\", \"18:26:30.5750\", \"18:27:12.2880\"); RunNcFile(\"NC/file1.nc\") TrainMillingPara(Fx|Fy|Fz, \"StainlessSteel.mp\"); Tip 以智慧刀把資料為例,輸出校正銑削係數 ClearTimeMappingData(); AddTimeDataByFile( \"lineA\", \"Mapping/sensor1.csv\", \"18:25:51.7100\", \"18:26:12.9910\"); AddTimeDataByFile( \"lineB\", \"Mapping/sensor1.csv\", \"18:26:30.5750\", \"18:27:12.2880\"); RunNcFile(\"NC/file1.nc\") ReTrainMillingPara(Fz|Mx|My|Mz, \"StainlessSteel.mp\"); 訓練條件 路徑樣本 以穩定資料訓練佳 ,即資料波形有重複性維持至少兩轉。因系統演算法最低以一轉波形做訓練。 在非穩定情況,會因為模擬中的每刃進給固定、訓練資料不穩定,造成剪切力於總力占比降低,使得訓練出的犁切係數偏高。 樣本穩定的情況下NC路徑沒有限制切削形狀槽銑或側銑任意形狀刀具皆可用來訓練及校正銑削係數。 以TrainMillingPara訓練銑削係數資訊映射須包含至少一組不同每刃進給的路徑樣本。訓練資料的資料種類建議最少為(動力計)Fx|Fy|Fz或(智慧刀把)Fz|Mx|My|Mz。 如果資料種類少於前述如Fx|Fy或Mx|My|Mz則樣本的自由度太高訓練出來的係數不能符合訓練樣本以外的路徑。 如果僅使用Mx|My|Mz由於力矩資料為 \\(\\vec{r} \\times \\vec{F}\\)所以r方向資料會遺失相當於少了一個自由度難以訓練材料系數。 所以力矩資料須搭配Fz使用。 以ReTrainMillingPara校正銑削係數沒有限制資料種類及每刃進給。"
"summary": "訓練與校正銑削係數 銑削係數為計算銑削力的必須參數。 訓練與校正銑削係數需先完成資料映射。 TrainMillingPara訓練銑削係數不需先設定工件銑削係數輸出的新係數也與原工件銑削係數無關。 ReTrainMillingPara校正銑削係數需基於已設定之工件銑削係數才可輸出校正後係數。校正時原係數的權重10%、從資訊映射而得的樣本權重90%。 Note 指令格式 //訓練銑削係數 TrainMillingPara(<樣本旗標>, <檔案輸出路徑>); //校正銑削係數 ReTrainMillingPara(<樣本旗標>, <檔案輸出路徑>); <樣本旗標> 為應用於訓練資料的資料種類包含Fx、Fy、Fz、Mx、My、Mz。 使用|號作聯集。 Tip 以動力計資料為例,輸出訓練銑削係數 ClearTimeMappingData(); AddTimeDataByFile( \"lineA\", \"Mapping/sensor1.csv\", \"18:25:51.7100\", \"18:26:12.9910\"); AddTimeDataByFile( \"lineB\", \"Mapping/sensor1.csv\", \"18:26:30.5750\", \"18:27:12.2880\"); PlayNcFile(\"NC/file1.nc\") TrainMillingPara(Fx|Fy|Fz, \"StainlessSteel.mp\"); Tip 以智慧刀把資料為例,輸出校正銑削係數 ClearTimeMappingData(); AddTimeDataByFile( \"lineA\", \"Mapping/sensor1.csv\", \"18:25:51.7100\", \"18:26:12.9910\"); AddTimeDataByFile( \"lineB\", \"Mapping/sensor1.csv\", \"18:26:30.5750\", \"18:27:12.2880\"); PlayNcFile(\"NC/file1.nc\") ReTrainMillingPara(Fz|Mx|My|Mz, \"StainlessSteel.mp\"); 訓練條件 路徑樣本 以穩定資料訓練佳 ,即資料波形有重複性維持至少兩轉。因系統演算法最低以一轉波形做訓練。 在非穩定情況,會因為模擬中的每刃進給固定、訓練資料不穩定,造成剪切力於總力占比降低,使得訓練出的犁切係數偏高。 樣本穩定的情況下NC路徑沒有限制切削形狀槽銑或側銑任意形狀刀具皆可用來訓練及校正銑削係數。 以TrainMillingPara訓練銑削係數資訊映射須包含至少一組不同每刃進給的路徑樣本。訓練資料的資料種類建議最少為(動力計)Fx|Fy|Fz或(智慧刀把)Fz|Mx|My|Mz。 如果資料種類少於前述如Fx|Fy或Mx|My|Mz則樣本的自由度太高訓練出來的係數不能符合訓練樣本以外的路徑。 如果僅使用Mx|My|Mz由於力矩資料為 \\(\\vec{r} \\times \\vec{F}\\)所以r方向資料會遺失相當於少了一個自由度難以訓練材料系數。 所以力矩資料須搭配Fz使用。 以ReTrainMillingPara校正銑削係數沒有限制資料種類及每刃進給。"
},
"brief/user-guide/zh-Hant/script/NcOptimization/index.html": {
"href": "brief/user-guide/zh-Hant/script/NcOptimization/index.html",
"title": "NC優化 | HiAPI-C# 2025",
"summary": "NC優化 組態在NC仿真前設定然後執行輸出優化NC檔指令。 組態 Note 指令格式 OptEnableFeedrate = <布林值>; OptEnableInterpolation = <布林值>; OptRapidFeed_mmdmin = <實數>; OptMinFeedrate_mmdmin = <實數>; OptMaxFeedrate_mmdmin = <實數>; OptMaxAcceleration_mmds2 = <實數>; OptExtendedPreDistance_mm = <實數>; OptExtendedPostDistance_mm = <實數>; OptSpindlePowerSafetyFactor = <實數>; OptEnableFeedrate啟用順序式(Sequential)進給率優化。 順序式係指該功能從下指令開始作用。與其相對的設定在刀具端,刀具端也能設定進給率優化,但是在裝刀時才會發揮作用。 OptEnableFeedrate與所有其他啟用進給率優化的指令需同時為真進給率優化才會啟用。 即與刀具設定端必須同時為真(true),進給率優化才會啟用。 OptEnableFeedrate預設值為真。 OptEnableInterpolation優化程序用重新插補。 重新插捕後NC碼會增加可以更好地控制加減速。 OptRapidFeed_mmdmin優化程序中的無切削區域進給率。單位mm/min。 沒有切到工件的NC路徑為無切削區域。優化後該路徑將採用無切削區域進給率。 OptMinFeedrate_mmdmin優化程序中的有切削區域最小進給。單位mm/min。 OptMaxFeedrate_mmdmin優化程序中的有切削區域最大進給。單位mm/min。 有切到工件的NC路徑為有切削區域。有切削區域的最大最小進給的設定通常依據經驗法則。 OptMaxAcceleration_mmds2優化程序中的加減速限制。優化後NC碼的F值變化在該限制之內。單位$mm/s^2$。 OptExtendedPreDistance_mm優化程序中的有切削區域等效計算的前長度。單位mm。 OptExtendedPostDistance_mm優化程序中的有切削區域等效計算的後長度。單位mm。 優化程序中的有切削區域等效計算的長度 OptSpindlePowerSafetyFactor主軸功率安全係數。 OptSpindleTorqueSafetyFactor主軸扭力安全係數。 優化後的NC碼主軸功率及主軸扭力將被限制於安全係數之內。 OptPreferedForce_N優化程中的目標力。單位N。 在符合所有限制的條件下,優化程序中的加工路徑產生的力會盡可能的趨近目標力。 NC碼中的優化腳本指令 於指定NC行不啟用優化 在執行 Preserve() 的NC行中不啟用優化。 Tip 指令範例 在 N0140 行不啟用優化。 ... N0130 X-1.965 Y17.053 N0140 G03 X-2.66 Y38.193 I-103.796 J7.172 (;@Preserve();) N0150 G01 X-3.068 Y40.776 ... 於指定NC範圍不啟用優化 使用BeginPreserve()的NC行及EndPreserve()的NC行及包含的NC範圍不啟用優化。 Tip 指令範例 在 N0140、N0150、N0160 行不啟用優化。 ... N0130 X-1.965 Y17.053 N0140 G03 X-2.66 Y38.193 I-103.796 J7.172 (;@BeginPreserve();) N0150 G01 X-3.068 Y40.776 N0160 X-3.555 Y43.338 (;@EndPreserve();) N0170 X-4.125 Y45.875 ... 輸出優化NC檔 Note 指令格式 OptimizeToFiles(<路徑樣板>); <路徑樣板>支援 檔案路徑樣板。 Tip 指令範例 OptEnableFeedrate = true; OptEnableInterpolation = true; OptRapidFeed_mmdmin = 4000; OptMinFeedrate_mmdmin = 100; OptMaxFeedrate_mmdmin = 4000; OptMaxAcceleration_mmds2 = 10; OptExtendedPreDistance_mm = 3; OptExtendedPostDistance_mm = 2; OptSpindlePowerSafetyFactor = 1.5; OptSpindleTorqueSafetyFactor = 1.5; OptPreferedForce_N = double.PositiveInfinity; RunNcFile(\"NC/file1.nc\"); OptRapidFeed_mmdmin = 8000; RunNcFile(\"NC/file2.nc\"); OptimizeToFiles(\"Cache/Opt-[NcName]\"); 組態設定可以穿插在NC仿真間將會作用在組態設定後的NC仿真。 以上範例為例優化後的NC程式file1.nc的無切削區域快速進給為4000file2.nc則為8000。 Tip NC碼中的優化指令範例 ... N0110 X-3.064 Y6.378 (;@OptMaxAcceleration_mmds2=10;) N0120 X-2.411 Y11.712 N0130 X-1.965 Y17.053 N0140 G03 X-2.66 Y38.193 I-103.796 J7.172 (;@Preserve();) N0150 G01 X-3.068 Y40.776 (;@OptMaxAcceleration_mmds2=100; OptMaxFeedrate_mmdmin=12000;) N0160 X-3.555 Y43.338 N0170 X-4.125 Y45.875 ... N0110至N0150前優化區加速度設為10 \\(mm/s^2\\) N0140單行不做優化 N0150及以後優化區加速度設為100 \\(mm/s^2\\) N0150及以後優化區切削區域最大進給設為12000 \\(mm/min\\) Tip 斷刀解決方案 更改加工路徑降低切寬深 或 以HiNC優化功能調整進給率將降伏應力比、主軸最大扭矩比、主軸最大功率比降至100%以下。 Tip 熱崩刃解決方案 在解決斷刀問題的前提下,降低轉速,讓刀刃有充足時間散熱。 注意冷卻液是否對準刀刃影響甚大。"
"summary": "NC優化 組態在NC仿真前設定然後執行輸出優化NC檔指令。 組態 Note 指令格式 OptEnableFeedrate = <布林值>; OptEnableInterpolation = <布林值>; OptRapidFeed_mmdmin = <實數>; OptMinFeedrate_mmdmin = <實數>; OptMaxFeedrate_mmdmin = <實數>; OptMaxAcceleration_mmds2 = <實數>; OptExtendedPreDistance_mm = <實數>; OptExtendedPostDistance_mm = <實數>; OptSpindlePowerSafetyFactor = <實數>; OptEnableFeedrate啟用順序式(Sequential)進給率優化。 順序式係指該功能從下指令開始作用。與其相對的設定在刀具端,刀具端也能設定進給率優化,但是在裝刀時才會發揮作用。 OptEnableFeedrate與所有其他啟用進給率優化的指令需同時為真進給率優化才會啟用。 即與刀具設定端必須同時為真(true),進給率優化才會啟用。 OptEnableFeedrate預設值為真。 OptEnableInterpolation優化程序用重新插補。 重新插捕後NC碼會增加可以更好地控制加減速。 OptRapidFeed_mmdmin優化程序中的無切削區域進給率。單位mm/min。 沒有切到工件的NC路徑為無切削區域。優化後該路徑將採用無切削區域進給率。 OptMinFeedrate_mmdmin優化程序中的有切削區域最小進給。單位mm/min。 OptMaxFeedrate_mmdmin優化程序中的有切削區域最大進給。單位mm/min。 有切到工件的NC路徑為有切削區域。有切削區域的最大最小進給的設定通常依據經驗法則。 OptMaxAcceleration_mmds2優化程序中的加減速限制。優化後NC碼的F值變化在該限制之內。單位$mm/s^2$。 OptExtendedPreDistance_mm優化程序中的有切削區域等效計算的前長度。單位mm。 OptExtendedPostDistance_mm優化程序中的有切削區域等效計算的後長度。單位mm。 優化程序中的有切削區域等效計算的長度 OptSpindlePowerSafetyFactor主軸功率安全係數。 OptSpindleTorqueSafetyFactor主軸扭力安全係數。 優化後的NC碼主軸功率及主軸扭力將被限制於安全係數之內。 OptPreferedForce_N優化程中的目標力。單位N。 在符合所有限制的條件下,優化程序中的加工路徑產生的力會盡可能的趨近目標力。 NC碼中的優化腳本指令 於指定NC行不啟用優化 在執行 Preserve() 的NC行中不啟用優化。 Tip 指令範例 在 N0140 行不啟用優化。 ... N0130 X-1.965 Y17.053 N0140 G03 X-2.66 Y38.193 I-103.796 J7.172 (;@Preserve();) N0150 G01 X-3.068 Y40.776 ... 於指定NC範圍不啟用優化 使用BeginPreserve()的NC行及EndPreserve()的NC行及包含的NC範圍不啟用優化。 Tip 指令範例 在 N0140、N0150、N0160 行不啟用優化。 ... N0130 X-1.965 Y17.053 N0140 G03 X-2.66 Y38.193 I-103.796 J7.172 (;@BeginPreserve();) N0150 G01 X-3.068 Y40.776 N0160 X-3.555 Y43.338 (;@EndPreserve();) N0170 X-4.125 Y45.875 ... 輸出優化NC檔 Note 指令格式 OptimizeToFiles(<路徑樣板>); <路徑樣板>支援 檔案路徑樣板。 Tip 指令範例 OptEnableFeedrate = true; OptEnableInterpolation = true; OptRapidFeed_mmdmin = 4000; OptMinFeedrate_mmdmin = 100; OptMaxFeedrate_mmdmin = 4000; OptMaxAcceleration_mmds2 = 10; OptExtendedPreDistance_mm = 3; OptExtendedPostDistance_mm = 2; OptSpindlePowerSafetyFactor = 1.5; OptSpindleTorqueSafetyFactor = 1.5; OptPreferedForce_N = double.PositiveInfinity; PlayNcFile(\"NC/file1.nc\"); OptRapidFeed_mmdmin = 8000; PlayNcFile(\"NC/file2.nc\"); OptimizeToFiles(\"Cache/Opt-[NcName]\"); 組態設定可以穿插在NC仿真間將會作用在組態設定後的NC仿真。 以上範例為例優化後的NC程式file1.nc的無切削區域快速進給為4000file2.nc則為8000。 Tip NC碼中的優化指令範例 ... N0110 X-3.064 Y6.378 (;@OptMaxAcceleration_mmds2=10;) N0120 X-2.411 Y11.712 N0130 X-1.965 Y17.053 N0140 G03 X-2.66 Y38.193 I-103.796 J7.172 (;@Preserve();) N0150 G01 X-3.068 Y40.776 (;@OptMaxAcceleration_mmds2=100; OptMaxFeedrate_mmdmin=12000;) N0160 X-3.555 Y43.338 N0170 X-4.125 Y45.875 ... N0110至N0150前優化區加速度設為10 \\(mm/s^2\\) N0140單行不做優化 N0150及以後優化區加速度設為100 \\(mm/s^2\\) N0150及以後優化區切削區域最大進給設為12000 \\(mm/min\\) Tip 斷刀解決方案 更改加工路徑降低切寬深 或 以HiNC優化功能調整進給率將降伏應力比、主軸最大扭矩比、主軸最大功率比降至100%以下。 Tip 熱崩刃解決方案 在解決斷刀問題的前提下,降低轉速,讓刀刃有充足時間散熱。 注意冷卻液是否對準刀刃影響甚大。"
},
"brief/user-guide/zh-Hant/script/PlayCsvFile/play-csv-file.html": {
"href": "brief/user-guide/zh-Hant/script/PlayCsvFile/play-csv-file.html",
"title": "執行CSV檔 | HiAPI-C# 2025",
"summary": "執行CSV檔 以CSV格式檔案驅動仿真。 執行NC檔指令為 PlayCsvFile <檔案路徑> 的根目錄為專案目錄。 Note 指令格式 PlayCsvFile(<檔案路徑>); Tip 指令範例 PlayCsvFile(\"Data/file1.csv\"); Tip 本撥放器可直接讀取<xref:Cmd-WriteStepFiles>匯出之檔案。 檔案格式 驅動的CSV檔案為逗號分隔第一列須為標頭列。其餘每列為一步。標頭大小寫不同會被視為不同資料。 驅動欄位 依預設設定,關鍵的 CSV 欄位標題如下。這些欄位的資料會驅動模擬。 MC.X, MC.Y, MC.Z, MC.A, MC.B, MC.C, ToolId, SpindleSpeed, Feedrate_mmdmin, StepDuration 這些欄位標題可以在 .hincproj 的 CsvRunnerConfig 中更改。 自訂欄位 其他資料如感測器、事後分析資料等也可放入CSV檔中系統支援該資料的工件顏色梯度圖、時間序列圖、點選追蹤功能。 Tip 本範例檔案為可驅動系統的CSV檔案。"
},
"brief/user-guide/zh-Hant/script/PlayNcFile/index.html": {
"href": "brief/user-guide/zh-Hant/script/PlayNcFile/index.html",
"title": "執行NC檔 | HiAPI-C# 2025",
"summary": "執行NC檔 執行NC檔指令為 PlayNcFile <檔案路徑> 的根目錄為專案目錄。 Note 指令格式 PlayNcFile(<檔案路徑>); Tip 指令範例 PlayNcFile(\"NC/file1.nc\");"
},
"brief/user-guide/zh-Hant/script/Resolution/index.html": {
"href": "brief/user-guide/zh-Hant/script/Resolution/index.html",
"title": "仿真解析度 | HiAPI-C# 2025",
"summary": "仿真解析度 仿真解析度可分為程序幾何的實體解析度、程序幾何的顯示解析度、加工運動解析度。 程序幾何實體解析度 Note 指令格式 MachiningResolution_mm = <實數>; Tip 指令範例 MachiningResolution_mm = 0.125; 工件網格由正立方體組成,工件實體解析度為最小工件網格立方體的寬度。 網格立方體的寬度僅能為2的指數包含 ..., 4, 2, 1, 0.5, 0.25, 0.125, ... 。如果設置的值不是2的指數則系統會將其調整為2的指數。 工件實體解析度越高,切削時計算量越大、仿真速度越慢。 工件實體解析度每增加一倍需要至多8倍的材料移除演算時間與RAM記憶體空間。 工件顯示暫存組態 Note 指令格式 DispCache_Mb = <實數(Mb)>; Tip 指令範例 DispCache_Mb = 260; 工件網格的顯示解析度由暫存空間的大小決定。 顯示網格是基於實體網格,所以顯示網格不會小於實體網格。 數值設置越大顯示延遲越長建議數值不超過1000Mb。 加工運動解析度 加工運動解析度(Machining Motion Resolution)決定仿真的每步間隔。 有以下項目可選擇,預設值為每刃進給。 每轉進給(Feed Per Cycle) 一步為主軸一轉。 每刃進給(Feed Per Tooth) 一步為刀刃一轉。 固定解析度(Fixed Resolution) 固定解析度在仿真時採用掃掠,兩步間沒有殘丘。 其中線性解析度(Linear Resolution)為兩步間最大直線距離;旋轉解析度(Rotary Resolution)為兩步間最大旋轉角度。 Note 指令格式 MachiningMotionResolution = <運動解析度物件>; MachiningMotionResolution = FeedPerCycle; MachiningMotionResolution = FeedPerTooth; MachiningMotionResolution = FixedPace(<線性解析度(mm)>, <旋轉解析度(deg)>); Tip 指令範例 MachiningMotionResolution = FeedPerCycle; MachiningMotionResolution = FixedPace(1, 15); 仿真效率 物理仿真採用平行處理,在大部分情況下不影響仿真速度,持續的高解析度大面積切削會出現暫時卡頓。 與市面其他仿真軟件不同HiNC的仿真使用體模型刀具與工件接觸範圍越小仿真速度越快。 五軸切削仿真的速度會快於大面銑刀的仿真速度。"
},
"brief/user-guide/zh-Hant/script/RunNcFile/index.html": {
"href": "brief/user-guide/zh-Hant/script/RunNcFile/index.html",
"title": "執行NC檔 | HiAPI-C# 2025",
"summary": "執行NC檔 執行NC檔指令為 RunNcFile <檔案路徑> 的根目錄為專案目錄。 Note 指令格式 RunNcFile(<檔案路徑>); Tip 指令範例 RunNcFile(\"NC/file1.nc\");"
},
"brief/user-guide/zh-Hant/script/RuntimeGeom/index.html": {
"href": "brief/user-guide/zh-Hant/script/RuntimeGeom/index.html",
"title": "程序幾何 | HiAPI-C# 2025",
"summary": "程序幾何 程序幾何(RuntimeGeom)是工件幾何在HiNC仿真運作期間的資料格式由大小不一的正立方線架構網格組成。 程序幾何外觀 程序幾何的正立方線架構網格 讀寫程序幾何 ReadRuntimeGeom、WriteRuntimeGeom可以讀寫程序幾何至檔案。 WriteRuntimeGeomToStl可以將程序幾何轉換為STL並寫入檔案。 Note 指令格式 WriteRuntimeGeom(<檔案路徑>); ReadRuntimeGeom(<檔案路徑>); WriteRuntimeGeomToStl(<檔案路徑>, <解析度(mm)> = 0); <檔案路徑> 的根目錄為專案目錄。 <解析度> 輸出STL時依據的最小工件網格立方體寬度。 該寬度不小於實體解析度。若設定本參數小於實體解析度,則等同於設定為實體解析度。 預設值為0意同採用實體解析度。 解析度越大,則檔案生成速度越快、佔用記憶體空間越小。 Tip 指令範例 ReadRuntimeGeom(\"Cache/init.wct\"); RunNcFile(\"NC/file1.nc\"); WriteRuntimeGeom(\"Cache/file1.wct\"); WriteRuntimeGeomToStl(\"Output/file1.stl\"); 在仿真開始時,會將幾何模型轉換為程序幾何,轉換時間會依照初始解析度及幾何複雜度有所不同。 如果工件模型會重複使用且轉換時間很長可以在腳本執行NC指令前搭配使用ReadRuntimeGeom、WriteRuntimeGeom節省等待時間。"
"summary": "程序幾何 程序幾何(RuntimeGeom)是工件幾何在HiNC仿真運作期間的資料格式由大小不一的正立方線架構網格組成。 程序幾何外觀 程序幾何的正立方線架構網格 讀寫程序幾何 ReadRuntimeGeom、WriteRuntimeGeom可以讀寫程序幾何至檔案。 WriteRuntimeGeomToStl可以將程序幾何轉換為STL並寫入檔案。 Note 指令格式 WriteRuntimeGeom(<檔案路徑>); ReadRuntimeGeom(<檔案路徑>); WriteRuntimeGeomToStl(<檔案路徑>, <解析度(mm)> = 0); <檔案路徑> 的根目錄為專案目錄。 <解析度> 輸出STL時依據的最小工件網格立方體寬度。 該寬度不小於實體解析度。若設定本參數小於實體解析度,則等同於設定為實體解析度。 預設值為0意同採用實體解析度。 解析度越大,則檔案生成速度越快、佔用記憶體空間越小。 Tip 指令範例 ReadRuntimeGeom(\"Cache/init.wct\"); PlayNcFile(\"NC/file1.nc\"); WriteRuntimeGeom(\"Cache/file1.wct\"); WriteRuntimeGeomToStl(\"Output/file1.stl\"); 在仿真開始時,會將幾何模型轉換為程序幾何,轉換時間會依照初始解析度及幾何複雜度有所不同。 如果工件模型會重複使用且轉換時間很長可以在腳本執行NC指令前搭配使用ReadRuntimeGeom、WriteRuntimeGeom節省等待時間。"
},
"brief/user-guide/zh-Hant/script/WriteShotFiles/index.html": {
"href": "brief/user-guide/zh-Hant/script/WriteShotFiles/index.html",

View File

@ -13797,6 +13797,16 @@
},
"version": ""
},
{
"type": "Conceptual",
"source_relative_path": "brief/dev-doc/hinc-web-service/disp-web-service.md",
"output": {
".html": {
"relative_path": "brief/dev-doc/hinc-web-service/disp-web-service.html"
}
},
"version": ""
},
{
"type": "Conceptual",
"source_relative_path": "brief/dev-doc/index.md",
@ -14637,20 +14647,30 @@
},
{
"type": "Conceptual",
"source_relative_path": "brief/user-guide/zh-Hant/script/Resolution/index.md",
"source_relative_path": "brief/user-guide/zh-Hant/script/PlayCsvFile/play-csv-file.md",
"output": {
".html": {
"relative_path": "brief/user-guide/zh-Hant/script/Resolution/index.html"
"relative_path": "brief/user-guide/zh-Hant/script/PlayCsvFile/play-csv-file.html"
}
},
"version": ""
},
{
"type": "Conceptual",
"source_relative_path": "brief/user-guide/zh-Hant/script/RunNcFile/index.md",
"source_relative_path": "brief/user-guide/zh-Hant/script/PlayNcFile/index.md",
"output": {
".html": {
"relative_path": "brief/user-guide/zh-Hant/script/RunNcFile/index.html"
"relative_path": "brief/user-guide/zh-Hant/script/PlayNcFile/index.html"
}
},
"version": ""
},
{
"type": "Conceptual",
"source_relative_path": "brief/user-guide/zh-Hant/script/Resolution/index.md",
"output": {
".html": {
"relative_path": "brief/user-guide/zh-Hant/script/Resolution/index.html"
}
},
"version": ""

View File

@ -35,7 +35,7 @@
"Cmd-Resolution",
"Cmd-RuntimeGeom",
"Cmd-Collision",
"Cmd-RunNcFile",
"Cmd-PlayNcFile",
"Cmd-RemoveFlyPiece",
"Cmd-NcOptimization",
"Cmd-WriteShotFiles",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.