This commit is contained in:
2025-12-06 02:38:22 +08:00
parent 9de88d2db0
commit 8e6a52be15
28 changed files with 204 additions and 176 deletions
@@ -92,7 +92,7 @@
<p>You MUST read the cited hyperlink before you do the job. ASK if you think the hyperlink is not work.</p>
</div>
<h2 id="handle-message-and-exception">Handle Message and Exception</h2>
<p>If message is well-managed, apply &lt;xref:Hi.Common.Messages.MessageKit&gt; to show the message; if the message is <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a>, apply <a class="xref" href="../../../api/Hi.Common.ExceptionUtil.html">ExceptionUtil</a>.<a class="xref" href="../../../api/Hi.Common.ExceptionUtil.html#Hi_Common_ExceptionUtil_ShowException_System_Exception_System_Object_">ShowException(Exception, object)</a> to show the exception for detail treatment. The messages are shown in <a href="message-section-on-main-panel.html">Message Section on Main Panel</a>.</p>
<p>If message is well-managed, apply <a class="xref" href="../../../api/Hi.Common.Messages.MessageHost.html">MessageHost</a> to show the message; if the message is <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a>, apply <a class="xref" href="../../../api/Hi.Common.ExceptionUtil.html">ExceptionUtil</a>.<a class="xref" href="../../../api/Hi.Common.ExceptionUtil.html#Hi_Common_ExceptionUtil_ShowException_System_Exception_System_Object_">ShowException(Exception, object)</a> to show the exception for detail treatment. The messages are shown in <a href="message-section-on-main-panel.html">Message Section on Main Panel</a>.</p>
<p>For examples of message and exception handling patterns:</p>
<ol>
<li>Normal message handling:</li>
@@ -156,11 +156,11 @@ Users can refresh the log content or download the current day's log file for off
<p>The <code>Project</code> Menu Managing <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>.</p>
<p>To <code>New</code> (create), <code>Save</code> and <code>Save As</code> the <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>, See <a class="xref" href="../../sample/Sample.Machining.DemoBuildGeomOnlyMachiningProject.html">DemoBuildGeomOnlyMachiningProject</a> for the example.</p>
<p>To <code>Load</code> <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>, See <a class="xref" href="../../sample/Sample.Machining.DemoUseMachiningProject.html">DemoUseMachiningProject</a> for the example.</p>
<p>Show message for the actions result (successed or has exception) by &lt;xref:Hi.Common.Messages.MessageKit&gt;.</p>
<p>Show message for the actions result (successed or has exception) by <a class="xref" href="../../../api/Hi.Common.Messages.MessageHost.html">MessageHost</a>.</p>
<div class="TIP">
<h5>Tip</h5>
<p>Recommmand using static function of &lt;xref:Hi.Common.Messages.MessageKit&gt; to do the job.
Read document of &lt;xref:Hi.Common.Messages.MessageKit&gt; to ensure the proper usage.</p>
<p>Recommmand using static function of <a class="xref" href="../../../api/Hi.Common.Messages.MessageHost.html">MessageHost</a> to do the job.
Read document of <a class="xref" href="../../../api/Hi.Common.Messages.MessageHost.html">MessageHost</a> to ensure the proper usage.</p>
</div>
<p>On project loaded (<code>Navigation Menu</code>/<code>Project</code>/<code>Load MenuItem</code>)
, set the Player.Panel.RenderingCanvas.DispEngine to <a class="xref" href="../../../api/Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SetViewToIsometricView">SetViewToIsometricView()</a>.</p>
@@ -87,8 +87,8 @@
<article data-uid="">
<h1 id="message-section-on-main-panel">Message Section on Main Panel</h1>
<h2 id="initialize--with-message-section">Initialize &lt;xref:Hi.Common.Messages.MessageKit&gt;.&lt;xref:Hi.Common.Messages.MessageKit.Default&gt; with Message Section</h2>
<p>To show and save the message on <code>Brief Message Text Field</code>, add event to &lt;xref:Hi.Common.Messages.MessageKit.Default&gt;.&lt;xref:Hi.Common.Messages.MessageKit.OnAdding&gt;.</p>
<h2 id="initialize--with-message-section">Initialize <a class="xref" href="../../../api/Hi.Common.Messages.MessageHost.html">MessageHost</a>.<a class="xref" href="../../../api/Hi.Common.Messages.MessageHost.html#Hi_Common_Messages_MessageHost_Default">Default</a> with Message Section</h2>
<p>To show and save the message on <code>Brief Message Text Field</code>, add event to <a class="xref" href="../../../api/Hi.Common.Messages.MessageHost.html#Hi_Common_Messages_MessageHost_Default">Default</a>.<code>OnAdding</code>.</p>
<p>The event contains:</p>
<ul>
<li>update the text content of <code>Brief Message Text Field</code></li>
@@ -98,7 +98,7 @@
<h5>Tip</h5>
<ul>
<li>Handle the situation that logs over one day.</li>
<li>Check if passing argument of &lt;xref:Hi.Common.Messages.MessageKit.OnAdding&gt; is <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a>. If the it is Exception, update text content by <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a>.<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.message">Message</a> but log to file with the full Exception information.</li>
<li>Check if passing argument of <code>OnAdding</code> event is <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a>. If the it is Exception, update text content by <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.message">Message</a> but log to file with the full Exception information.</li>
<li>Consider <a class="xref" href="../../../api/Hi.Common.Messages.MessageFlag.html">MessageFlag</a> to set the behavior of Message Section. For example, apply alert style if passing argument is exception. The <a class="xref" href="../../../api/Hi.Common.Messages.MessageFlag.html#Hi_Common_Messages_MessageFlag_Info">Info</a> (and the other flags that the priority lower than it) should only record in the logs but not shows in the Message Section.</li>
</ul>
</div>
@@ -87,6 +87,19 @@
<article data-uid="">
<h1 id="release-note">Release Note</h1>
<h2 id="hinc-packages-version-3187">HiNc Packages Version 3.1.87</h2>
<ul>
<li>Re-build <a class="xref" href="../../../api/Hi.NcOpt.NcOptProc.html">NcOptProc</a> with stricter optimization logics (see <a class="xref" href="../../user-guide/zh-Hant/script/NcOptimization/index.html">NC優化</a>)</li>
<li>Add optimization logging features (see <a href="../../user-guide/zh-Hant/script/NcOptimization/index.html#%E5%84%AA%E5%8C%96%E6%97%A5%E8%AA%8C">優化日誌</a>):
<ul>
<li><code>.flatproc.log</code> file output for optimization process analysis (controlled by <a class="xref" href="../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptEnableFlatProcLog_">OptEnableFlatProcLog</a>)</li>
<li>Embedded log comments in optimized NC file marking source lines with <code>(src)</code> suffix (controlled by <a class="xref" href="../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptEnableEmbeddedLog_">OptEnableEmbeddedLog</a>)</li>
</ul>
</li>
<li>Fix cutting depth and width accuracy by bounding-box method with workpiece surface</li>
<li>Fix collision check error during concurrent changing collidable object</li>
<li>Various stability improvements and bug fixes</li>
</ul>
<h2 id="hinc-packages-version-3184">HiNc Packages Version 3.1.84</h2>
<ul>
<li>Optimize memory usage by shrinking map-size of clStripPos</li>
@@ -239,6 +239,21 @@ N0170 X-4.125 Y45.875
...
</code></pre>
</div>
<h2 id="優化日誌">優化日誌</h2>
<p>優化過程提供兩種日誌功能,方便分析與除錯。</p>
<h3 id="優化過程日誌檔">優化過程日誌檔</h3>
<p><a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptEnableFlatProcLog_">OptEnableFlatProcLog</a><small>(API)</small>:啟用優化過程日誌檔輸出。預設為真。</p>
<p>啟用後,優化過程會為每個NC檔輸出一個 <code>.flatproc.log</code> 檔案,記錄各步階的優化條件經<a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptExtendedPreDistance_mm">OptExtendedPreDistance_mm</a><small>(API)</small><a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptExtendedPostDistance_mm">OptExtendedPostDistance_mm</a><small>(API)</small>展開後獨立優化計算的資訊(不包含步階間的交互關係,如加減速)。</p>
<h3 id="嵌入式日誌註解">嵌入式日誌註解</h3>
<p><a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptEnableEmbeddedLog_">OptEnableEmbeddedLog</a><small>(API)</small>:啟用嵌入式日誌註解。預設為真。</p>
<p>啟用後,優化後的NC檔中會在原始NC行後方加上 <code>(src)</code> 後綴,方便對照原始NC碼與優化後的NC碼。</p>
<div class="NOTE">
<h5>Note</h5>
<p><strong>指令格式</strong></p>
<pre><code class="lang-csharp">OptEnableFlatProcLog = &lt;布林值&gt;;
OptEnableEmbeddedLog = &lt;布林值&gt;;
</code></pre>
</div>
<h2 id="輸出優化nc檔">輸出優化NC檔</h2>
<p>使用 <a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptimizeToFiles_">OptimizeToFiles</a><small>(API)</small> 方法輸出優化後的NC檔。</p>
<div class="NOTE">