225 lines
9.3 KiB
HTML
225 lines
9.3 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>物理仿真設定 | HiAPI-C# 2025 </title>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="title" content="物理仿真設定 | 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="Cmd-Physics">
|
||
<h1 id="物理仿真設定">物理仿真設定</h1>
|
||
|
||
<p><a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> 提供了多個屬性來配置物理仿真的行為。</p>
|
||
<h2 id="enablephysics">EnablePhysics</h2>
|
||
<p><a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnablePhysics">EnablePhysics</a><small>(API)</small> 啟用或停用銑削力評估。</p>
|
||
<div class="NOTE">
|
||
<h5>Note</h5>
|
||
<p><strong>指令格式</strong></p>
|
||
<pre><code class="lang-csharp">EnablePhysics = true; // 或 false
|
||
</code></pre>
|
||
</div>
|
||
<div class="TIP">
|
||
<h5>Tip</h5>
|
||
<p><strong>指令範例</strong></p>
|
||
<pre><code class="lang-csharp">// 啟用物理仿真
|
||
EnablePhysics = true;
|
||
PlayNcFile("NC/file1.nc");
|
||
|
||
// 停用物理仿真(僅幾何仿真)
|
||
EnablePhysics = false;
|
||
PlayNcFile("NC/file2.nc");
|
||
</code></pre>
|
||
</div>
|
||
<h2 id="enableweareffect">EnableWearEffect</h2>
|
||
<p><a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnableWearEffect">EnableWearEffect</a><small>(API)</small> 啟用或停用刀具磨耗效應。</p>
|
||
<div class="NOTE">
|
||
<h5>Note</h5>
|
||
<p><strong>指令格式</strong></p>
|
||
<pre><code class="lang-csharp">EnableWearEffect = true; // 或 false
|
||
</code></pre>
|
||
</div>
|
||
<div class="TIP">
|
||
<h5>Tip</h5>
|
||
<p><strong>指令範例</strong></p>
|
||
<pre><code class="lang-csharp">// 啟用磨耗效應
|
||
EnableWearEffect = true;
|
||
PlayNcFile("NC/file1.nc");
|
||
|
||
// 停用磨耗效應
|
||
EnableWearEffect = false;
|
||
PlayNcFile("NC/file2.nc");
|
||
</code></pre>
|
||
</div>
|
||
<h2 id="millingforcecycledivisionnum">MillingForceCycleDivisionNum</h2>
|
||
<p><a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MillingForceCycleDivisionNum">MillingForceCycleDivisionNum</a><small>(API)</small> 設定銑削力計算的每轉分割數。</p>
|
||
<div class="NOTE">
|
||
<h5>Note</h5>
|
||
<p><strong>指令格式</strong></p>
|
||
<pre><code class="lang-csharp">MillingForceCycleDivisionNum = <分割數>;
|
||
</code></pre>
|
||
</div>
|
||
<div class="TIP">
|
||
<h5>Tip</h5>
|
||
<p><strong>指令範例</strong></p>
|
||
<pre><code class="lang-csharp">// 設定每轉分割數為360(每度一個計算點)
|
||
MillingForceCycleDivisionNum = 360;
|
||
|
||
// 此設定應在執行 TrainMillingPara 之前設定
|
||
PlayNcFile("NC/file1.nc");
|
||
TrainMillingPara(Fx|Fy|Fz, "output.mp");
|
||
</code></pre>
|
||
</div>
|
||
<div class="NOTE">
|
||
<h5>Note</h5>
|
||
<p>此屬性應在執行 <a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_TrainMillingPara_">TrainMillingPara</a><small>(API)</small> 之前設定,以確保訓練過程使用正確的分割數。</p>
|
||
</div>
|
||
<h2 id="initspindletemperature_c">InitSpindleTemperature_C</h2>
|
||
<p><a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_InitSpindleTemperature_C">InitSpindleTemperature_C</a><small>(API)</small> 設定初始主軸溫度(攝氏度)。</p>
|
||
<div class="NOTE">
|
||
<h5>Note</h5>
|
||
<p><strong>指令格式</strong></p>
|
||
<pre><code class="lang-csharp">InitSpindleTemperature_C = <溫度>;
|
||
</code></pre>
|
||
</div>
|
||
<div class="TIP">
|
||
<h5>Tip</h5>
|
||
<p><strong>指令範例</strong></p>
|
||
<pre><code class="lang-csharp">// 設定初始主軸溫度為25度
|
||
InitSpindleTemperature_C = 25.0;
|
||
PlayNcFile("NC/file1.nc");
|
||
</code></pre>
|
||
</div>
|
||
<h2 id="enablepauseonfailure">EnablePauseOnFailure</h2>
|
||
<p><a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnablePauseOnFailure">EnablePauseOnFailure</a><small>(API)</small> 啟用或停用在失敗時暫停執行。</p>
|
||
<div class="NOTE">
|
||
<h5>Note</h5>
|
||
<p><strong>指令格式</strong></p>
|
||
<pre><code class="lang-csharp">EnablePauseOnFailure = true; // 或 false
|
||
</code></pre>
|
||
</div>
|
||
<div class="TIP">
|
||
<h5>Tip</h5>
|
||
<p><strong>指令範例</strong></p>
|
||
<pre><code class="lang-csharp">// 啟用失敗時暫停
|
||
EnablePauseOnFailure = true;
|
||
EnableCollisionDetection = true;
|
||
PlayNcFile("NC/file1.nc"); // 如果發生碰撞,會暫停執行
|
||
</code></pre>
|
||
</div>
|
||
<h2 id="使用建議">使用建議</h2>
|
||
<ul>
|
||
<li><strong>EnablePhysics</strong>: 需要計算銑削力時啟用,會增加計算時間</li>
|
||
<li><strong>EnableWearEffect</strong>: 需要模擬刀具磨耗時啟用</li>
|
||
<li><strong>MillingForceCycleDivisionNum</strong>: 數值越大,計算越精確但速度越慢</li>
|
||
<li><strong>InitSpindleTemperature_C</strong>: 用於熱仿真,影響刀具溫度計算</li>
|
||
<li><strong>EnablePauseOnFailure</strong>: 用於除錯,當發生錯誤(如碰撞)時暫停執行</li>
|
||
</ul>
|
||
<div class="NOTE">
|
||
<h5>Note</h5>
|
||
<p>物理仿真會增加計算時間,但可以提供更準確的加工力、溫度等資訊。</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>
|