158 lines
7.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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 &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="Cmd-GeomDefect">
<h1 id="幾何缺陷掃描">幾何缺陷掃描</h1>
<p>幾何缺陷掃描用於當工件幾何或刀具幾何異常時,協助使用者進行除錯。一般情況下不需要使用此功能。</p>
<div class="NOTE">
<h5>Note</h5>
<p>在工件幾何初始化時,若偵測到建構缺陷,缺陷標記也會自動顯示於工件上。可使用 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ClearDefectDisplayee_">ClearDefectDisplayee</a> 清除這些標記。</p>
</div>
<h2 id="scanruntimegeominfdefect">ScanRuntimeGeomInfDefect</h2>
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ScanRuntimeGeomInfDefect_">ScanRuntimeGeomInfDefect</a><small>(API)</small> 掃描程序幾何中的無窮邊切缺陷(Inf Edge Cuts)。掃描完成後,缺陷區域會以彩色標記渲染在工件上。</p>
<div class="NOTE">
<h5>Note</h5>
<p><strong>指令格式</strong></p>
<pre><code class="lang-csharp">ScanRuntimeGeomInfDefect();
</code></pre>
<p>回傳值:</p>
<ul>
<li><code>true</code>:偵測到缺陷</li>
<li><code>false</code>:無缺陷</li>
<li><code>null</code>:無法執行(例如工件不存在)</li>
</ul>
</div>
<div class="TIP">
<h5>Tip</h5>
<p><strong>指令範例</strong></p>
<p>若需在執行NC仿真前檢查幾何缺陷可搭配 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Pause_">Pause</a> 暫停播放器,目視確認缺陷後再繼續:</p>
<pre><code class="lang-csharp">ScanRuntimeGeomInfDefect();
Pause();
ClearDefectDisplayee();
PlayNcFile(&quot;NC/file1.nc&quot;);
</code></pre>
<p>相關指令:<a class="xref" href="../RuntimeGeom/index.html">程序幾何</a><a class="xref" href="../Messages/index.html">訊息處理</a><a class="xref" href="../PlayerControl/index.html">播放器控制</a></p>
</div>
<h2 id="cleardefectdisplayee">ClearDefectDisplayee</h2>
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ClearDefectDisplayee_">ClearDefectDisplayee</a><small>(API)</small> 清除工件上的缺陷視覺化標記,包含建構缺陷與掃描缺陷。</p>
<div class="NOTE">
<h5>Note</h5>
<p><strong>指令格式</strong></p>
<pre><code class="lang-csharp">ClearDefectDisplayee();
</code></pre>
</div>
<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>