HiNC-2025-win-desktop-Deploy/App/wwwroot/HiAPI-docsite/api/Hi.NcMech.Workpieces.WorkpieceService.html

1375 lines
41 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class WorkpieceService | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class WorkpieceService | HiAPI-C# 2025 ">
<meta name="description" content="Runtime service for .">
<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="ManagedReference">
<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="Hi.NcMech.Workpieces.WorkpieceService">
<h1 id="Hi_NcMech_Workpieces_WorkpieceService" data-uid="Hi.NcMech.Workpieces.WorkpieceService" class="text-break">
Class WorkpieceService
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcMech.html">NcMech</a>.<a class="xref" href="Hi.NcMech.Workpieces.html">Workpieces</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Runtime service for <a class="xref" href="Hi.NcMech.Workpieces.WorkpieceService.html#Hi_NcMech_Workpieces_WorkpieceService_Workpiece">Workpiece</a>.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class WorkpieceService : IDisplayee, IExpandToBox3d, IDisposable, IGetAnchoredDisplayeeList, IAnchoredCollidableLeaf, IAnchoredCollidableNode, IAnchoredCollidableBased, ICollidable</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">WorkpieceService</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.Disp.IDisplayee.html">IDisplayee</a></div>
<div><a class="xref" href="Hi.Geom.IExpandToBox3d.html">IExpandToBox3d</a></div>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
<div><a class="xref" href="Hi.Mech.Topo.IGetAnchoredDisplayeeList.html">IGetAnchoredDisplayeeList</a></div>
<div><a class="xref" href="Hi.Collision.IAnchoredCollidableLeaf.html">IAnchoredCollidableLeaf</a></div>
<div><a class="xref" href="Hi.Collision.IAnchoredCollidableNode.html">IAnchoredCollidableNode</a></div>
<div><a class="xref" href="Hi.Collision.IAnchoredCollidableBased.html">IAnchoredCollidableBased</a></div>
<div><a class="xref" href="Hi.Collision.ICollidable.html">ICollidable</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Collision.CollisionUtil.html#Hi_Collision_CollisionUtil_Detect_Hi_Collision_ICollidable_Hi_Collision_ICollidable_Hi_Geom_Mat4d_System_Double_System_Int32_">CollisionUtil.Detect(ICollidable, ICollidable, Mat4d, double, int)</a>
</div>
<div>
<a class="xref" href="Hi.Disp.DispUtil.html#Hi_Disp_DispUtil_Display_Hi_Disp_IDisplayee_Hi_Disp_Bind_Hi_Geom_Mat4d_">DispUtil.Display(IDisplayee, Bind, Mat4d)</a>
</div>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 id="Hi_NcMech_Workpieces_WorkpieceService_remarks">Remarks</h2>
<div class="markdown level0 remarks"><p><a class="xref" href="Hi.NcMech.Workpieces.WorkpieceService.html">WorkpieceService</a> handles runtime geometry, caching, diff calculation,
defect scanning, display and collision — state that does not require configuration IO.
Compare to <a class="xref" href="Hi.NcMech.Workpieces.WorkpieceService.html#Hi_NcMech_Workpieces_WorkpieceService_Workpiece">Workpiece</a>, which holds the persistent/serializable configuration.</p>
</div>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcMech_Workpieces_WorkpieceService__ctor_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.#ctor*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService__ctor_System_Func_Hi_NcMech_Workpieces_Workpiece__" data-uid="Hi.NcMech.Workpieces.WorkpieceService.#ctor(System.Func{Hi.NcMech.Workpieces.Workpiece})">
WorkpieceService(Func&lt;Workpiece&gt;)
</h3>
<div class="markdown level1 summary"><p>Ctor.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public WorkpieceService(Func&lt;Workpiece&gt; workpieceGetter)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>workpieceGetter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a>&lt;<a class="xref" href="Hi.NcMech.Workpieces.Workpiece.html">Workpiece</a>&gt;</dt>
<dd></dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcMech_Workpieces_WorkpieceService_BottomResolution_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.BottomResolution*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_BottomResolution" data-uid="Hi.NcMech.Workpieces.WorkpieceService.BottomResolution">
BottomResolution
</h3>
<div class="markdown level1 summary"><p>Resolution.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public double BottomResolution { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_CollidableName_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.CollidableName*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_CollidableName" data-uid="Hi.NcMech.Workpieces.WorkpieceService.CollidableName">
CollidableName
</h3>
<div class="markdown level1 summary"><p>Gets the name of the collidable object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string CollidableName { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_CollisionFlag_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.CollisionFlag*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_CollisionFlag" data-uid="Hi.NcMech.Workpieces.WorkpieceService.CollisionFlag">
CollisionFlag
</h3>
<div class="markdown level1 summary"><p>Gets or sets the collision flag.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public CollisionFlag CollisionFlag { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Collision.CollisionFlag.html">CollisionFlag</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_ConstructionDefectDisplayee_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ConstructionDefectDisplayee*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_ConstructionDefectDisplayee" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ConstructionDefectDisplayee">
ConstructionDefectDisplayee
</h3>
<div class="markdown level1 summary"><p>Construction defect displayee.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ConstructionDefectDisplayee ConstructionDefectDisplayee { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Cbtr.ConstructionDefectDisplayee.html">ConstructionDefectDisplayee</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_DiffAttachmentBag_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.DiffAttachmentBag*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_DiffAttachmentBag" data-uid="Hi.NcMech.Workpieces.WorkpieceService.DiffAttachmentBag">
DiffAttachmentBag
</h3>
<div class="markdown level1 summary"><p>transient object.
For Internal Use.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ConcurrentBag&lt;DiffAttachment&gt; DiffAttachmentBag { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.concurrent.concurrentbag-1">ConcurrentBag</a>&lt;<a class="xref" href="Hi.Cbtr.DiffAttachment.html">DiffAttachment</a>&gt;</dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_DiffRangeColorRule_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.DiffRangeColorRule*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_DiffRangeColorRule" data-uid="Hi.NcMech.Workpieces.WorkpieceService.DiffRangeColorRule">
DiffRangeColorRule
</h3>
<div class="markdown level1 summary"><p>Internal used.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public RangeColorRule DiffRangeColorRule { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Coloring.RangeColorRule.html">RangeColorRule</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_DiffVisualRadius_mm_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.DiffVisualRadius_mm*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_DiffVisualRadius_mm" data-uid="Hi.NcMech.Workpieces.WorkpieceService.DiffVisualRadius_mm">
DiffVisualRadius_mm
</h3>
<div class="markdown level1 summary"><p>Visual radius for difference visualization.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public double DiffVisualRadius_mm { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_HasDiff_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.HasDiff*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_HasDiff" data-uid="Hi.NcMech.Workpieces.WorkpieceService.HasDiff">
HasDiff
</h3>
<div class="markdown level1 summary"><p>Indicates whether there are differences between ideal and actual geometry.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool HasDiff { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_IdealGeom_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.IdealGeom*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_IdealGeom" data-uid="Hi.NcMech.Workpieces.WorkpieceService.IdealGeom">
IdealGeom
</h3>
<div class="markdown level1 summary"><p>Delegate property for <a class="xref" href="Hi.NcMech.Workpieces.Workpiece.html#Hi_NcMech_Workpieces_Workpiece_IdealGeom">IdealGeom</a> with cache cleanup.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IGetStl IdealGeom { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Geom.IGetStl.html">IGetStl</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_IdealSolid_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.IdealSolid*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_IdealSolid" data-uid="Hi.NcMech.Workpieces.WorkpieceService.IdealSolid">
IdealSolid
</h3>
<div class="markdown level1 summary"><p>Gets the drawing representing the ideal geometry faces of the workpiece.
The derived solid from <a class="xref" href="Hi.NcMech.Workpieces.Workpiece.html#Hi_NcMech_Workpieces_Workpiece_IdealGeom">IdealGeom</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Solid IdealSolid { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcMech.Solids.Solid.html">Solid</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_InitGeom_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.InitGeom*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_InitGeom" data-uid="Hi.NcMech.Workpieces.WorkpieceService.InitGeom">
InitGeom
</h3>
<div class="markdown level1 summary"><p>Delegate property for <a class="xref" href="Hi.NcMech.Workpieces.Workpiece.html#Hi_NcMech_Workpieces_Workpiece_InitGeom">InitGeom</a> with runtime cleanup.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IMakeXmlSource InitGeom { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_InitSolid_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.InitSolid*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_InitSolid" data-uid="Hi.NcMech.Workpieces.WorkpieceService.InitSolid">
InitSolid
</h3>
<div class="markdown level1 summary"><p>The derived solid from <a class="xref" href="Hi.NcMech.Workpieces.Workpiece.html#Hi_NcMech_Workpieces_Workpiece_InitGeom">InitGeom</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Solid InitSolid { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcMech.Solids.Solid.html">Solid</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_IsRuntimeGeomInit_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.IsRuntimeGeomInit*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_IsRuntimeGeomInit" data-uid="Hi.NcMech.Workpieces.WorkpieceService.IsRuntimeGeomInit">
IsRuntimeGeomInit
</h3>
<div class="markdown level1 summary"><p>Indicates whether the runtime geometry is initialized.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool IsRuntimeGeomInit { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_Workpiece_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.Workpiece*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_Workpiece" data-uid="Hi.NcMech.Workpieces.WorkpieceService.Workpiece">
Workpiece
</h3>
<div class="markdown level1 summary"><p>The underlying workpiece data model.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Workpiece Workpiece { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcMech.Workpieces.Workpiece.html">Workpiece</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_WorkpieceGetter_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.WorkpieceGetter*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_WorkpieceGetter" data-uid="Hi.NcMech.Workpieces.WorkpieceService.WorkpieceGetter">
WorkpieceGetter
</h3>
<div class="markdown level1 summary"><p>Lazy factory for the active <a class="xref" href="Hi.NcMech.Workpieces.WorkpieceService.html#Hi_NcMech_Workpieces_WorkpieceService_Workpiece">Workpiece</a>; invoked whenever consumers read <a class="xref" href="Hi.NcMech.Workpieces.WorkpieceService.html#Hi_NcMech_Workpieces_WorkpieceService_Workpiece">Workpiece</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Func&lt;Workpiece&gt; WorkpieceGetter { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a>&lt;<a class="xref" href="Hi.NcMech.Workpieces.Workpiece.html">Workpiece</a>&gt;</dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcMech_Workpieces_WorkpieceService_ClearCache_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ClearCache*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_ClearCache" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ClearCache">
ClearCache()
</h3>
<div class="markdown level1 summary"><p>Drops runtime geometry and defect display caches so the next access rebuilds from the current <a class="xref" href="Hi.NcMech.Workpieces.WorkpieceService.html#Hi_NcMech_Workpieces_WorkpieceService_Workpiece">Workpiece</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ClearCache()</code></pre>
</div>
<a id="Hi_NcMech_Workpieces_WorkpieceService_ClearDefectDisplayee_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ClearDefectDisplayee*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_ClearDefectDisplayee" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ClearDefectDisplayee">
ClearDefectDisplayee()
</h3>
<div class="markdown level1 summary"><p>Clears all defect displayees.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ClearDefectDisplayee()</code></pre>
</div>
<a id="Hi_NcMech_Workpieces_WorkpieceService_ClearIdealGeomCache_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ClearIdealGeomCache*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_ClearIdealGeomCache" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ClearIdealGeomCache">
ClearIdealGeomCache()
</h3>
<div class="markdown level1 summary"><p>Clears the ideal geometry cache.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ClearIdealGeomCache()</code></pre>
</div>
<a id="Hi_NcMech_Workpieces_WorkpieceService_ClearRawGeomCache_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ClearRawGeomCache*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_ClearRawGeomCache" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ClearRawGeomCache">
ClearRawGeomCache()
</h3>
<div class="markdown level1 summary"><p>Clears the raw geometry cache.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ClearRawGeomCache()</code></pre>
</div>
<a id="Hi_NcMech_Workpieces_WorkpieceService_Diff_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.Diff*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_Diff_System_Double_System_Threading_CancellationToken_System_IProgress_System_Object__" data-uid="Hi.NcMech.Workpieces.WorkpieceService.Diff(System.Double,System.Threading.CancellationToken,System.IProgress{System.Object})">
Diff(double, CancellationToken, IProgress&lt;object&gt;)
</h3>
<div class="markdown level1 summary"><p>Calculates the difference between ideal and actual geometry.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Diff(double detectionRadius, CancellationToken token, IProgress&lt;object&gt; progress = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>detectionRadius</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd><p>Detection radius.</p>
</dd>
<dt><code>token</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
<dd><p>Cancellation token.</p>
</dd>
<dt><code>progress</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</dt>
<dd><p>Progress reporting interface.</p>
</dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_Display_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.Display*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_Display_Hi_Disp_Bind_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.Display(Hi.Disp.Bind)">
Display(Bind)
</h3>
<div class="markdown level1 summary"><p>Display function called in <a class="xref" href="Hi.Disp.DispEngine.html">DispEngine</a> rendering loop.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Display(Bind bind)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>bind</code> <a class="xref" href="Hi.Disp.Bind.html">Bind</a></dt>
<dd><p>Bind with <a class="xref" href="Hi.Disp.DispEngine.html">DispEngine</a>. See <a class="xref" href="Hi.Disp.Bind.html">Bind</a>.</p>
</dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_Dispose_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.Dispose*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_Dispose" data-uid="Hi.NcMech.Workpieces.WorkpieceService.Dispose">
Dispose()
</h3>
<div class="markdown level1 summary"><p>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
</div>
<a id="Hi_NcMech_Workpieces_WorkpieceService_Dispose_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.Dispose*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_Dispose_System_Boolean_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.Dispose(System.Boolean)">
Dispose(bool)
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected virtual void Dispose(bool disposing)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>disposing</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_ExpandToBox3d_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ExpandToBox3d*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_ExpandToBox3d_Hi_Geom_Box3d_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ExpandToBox3d(Hi.Geom.Box3d)">
ExpandToBox3d(Box3d)
</h3>
<div class="markdown level1 summary"><p>Expands the destination box.
This function is usually used to compute the bounding box of elements.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ExpandToBox3d(Box3d dst)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>dst</code> <a class="xref" href="Hi.Geom.Box3d.html">Box3d</a></dt>
<dd><p>Destination box</p>
</dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_GetAnchoredCollidableNode_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.GetAnchoredCollidableNode*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_GetAnchoredCollidableNode" data-uid="Hi.NcMech.Workpieces.WorkpieceService.GetAnchoredCollidableNode">
GetAnchoredCollidableNode()
</h3>
<div class="markdown level1 summary"><p>Gets the anchored collidable node associated with this object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IAnchoredCollidableNode GetAnchoredCollidableNode()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Collision.IAnchoredCollidableNode.html">IAnchoredCollidableNode</a></dt>
<dd><p>The anchored collidable node.</p>
</dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_GetAnchoredDisplayeeList_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.GetAnchoredDisplayeeList*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_GetAnchoredDisplayeeList" data-uid="Hi.NcMech.Workpieces.WorkpieceService.GetAnchoredDisplayeeList">
GetAnchoredDisplayeeList()
</h3>
<div class="markdown level1 summary"><p>Gets a list of anchored displayable objects.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public List&lt;IAnchoredDisplayee&gt; GetAnchoredDisplayeeList()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Hi.Mech.Topo.IAnchoredDisplayee.html">IAnchoredDisplayee</a>&gt;</dt>
<dd><p>A list of <a class="xref" href="Hi.Mech.Topo.IAnchoredDisplayee.html">IAnchoredDisplayee</a> objects</p>
</dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_GetCollidableAnchor_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.GetCollidableAnchor*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_GetCollidableAnchor" data-uid="Hi.NcMech.Workpieces.WorkpieceService.GetCollidableAnchor">
GetCollidableAnchor()
</h3>
<div class="markdown level1 summary"><p>Gets the anchor associated with this collidable leaf.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Anchor GetCollidableAnchor()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Mech.Topo.Anchor.html">Anchor</a></dt>
<dd><p>The anchor for this collidable leaf.</p>
</dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_GetCollidee_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.GetCollidee*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_GetCollidee" data-uid="Hi.NcMech.Workpieces.WorkpieceService.GetCollidee">
GetCollidee()
</h3>
<div class="markdown level1 summary"><p>Get <a class="xref" href="Hi.Collision.ICollidee.html">ICollidee</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ICollidee GetCollidee()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Collision.ICollidee.html">ICollidee</a></dt>
<dd><p><a class="xref" href="Hi.Collision.ICollidee.html">ICollidee</a></p>
</dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_GetRuntimeGeom_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.GetRuntimeGeom*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_GetRuntimeGeom_System_Threading_CancellationToken_System_IProgress_System_Object__" data-uid="Hi.NcMech.Workpieces.WorkpieceService.GetRuntimeGeom(System.Threading.CancellationToken,System.IProgress{System.Object})">
GetRuntimeGeom(CancellationToken, IProgress&lt;object&gt;)
</h3>
<div class="markdown level1 summary"><p>Gets the runtime geometry.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public CubeTree GetRuntimeGeom(CancellationToken token, IProgress&lt;object&gt; progress = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>token</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
<dd><p>Cancellation token.</p>
</dd>
<dt><code>progress</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</dt>
<dd><p>Progress reporting interface.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Cbtr.CubeTree.html">CubeTree</a></dt>
<dd><p>Cube tree representing the runtime geometry.</p>
</dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_ReadRuntimeGeom_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ReadRuntimeGeom*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_ReadRuntimeGeom_System_String_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ReadRuntimeGeom(System.String)">
ReadRuntimeGeom(string)
</h3>
<div class="markdown level1 summary"><p>Reads the runtime geometry from a file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ReadRuntimeGeom(string file)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>file</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Source file path.</p>
</dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_ResetRuntimeGeom_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ResetRuntimeGeom*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_ResetRuntimeGeom_Hi_CutterLocations_ClStrips_ClStrip_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ResetRuntimeGeom(Hi.CutterLocations.ClStrips.ClStrip)">
ResetRuntimeGeom(ClStrip)
</h3>
<div class="markdown level1 summary"><p>Resets the runtime geometry.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ResetRuntimeGeom(ClStrip clStrip)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>clStrip</code> <a class="xref" href="Hi.CutterLocations.ClStrips.ClStrip.html">ClStrip</a></dt>
<dd><p>Cutter location strip.</p>
</dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_ScanRuntimeGeomInfDefect_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ScanRuntimeGeomInfDefect*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_ScanRuntimeGeomInfDefect_System_IProgress_System_Object__System_Threading_CancellationToken_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.ScanRuntimeGeomInfDefect(System.IProgress{System.Object},System.Threading.CancellationToken)">
ScanRuntimeGeomInfDefect(IProgress&lt;object&gt;, CancellationToken)
</h3>
<div class="markdown level1 summary"><p>Scans the runtime geometry for inf defects.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool? ScanRuntimeGeomInfDefect(IProgress&lt;object&gt; messageHost, CancellationToken cancellationToken)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>messageHost</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</dt>
<dd></dd>
<dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>?</dt>
<dd></dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_SetRuntimeGeom_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.SetRuntimeGeom*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_SetRuntimeGeom_Hi_Cbtr_CubeTree_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.SetRuntimeGeom(Hi.Cbtr.CubeTree)">
SetRuntimeGeom(CubeTree)
</h3>
<div class="markdown level1 summary"><p>Sets the runtime geometry instance and rebuilds its attachments.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void SetRuntimeGeom(CubeTree runtimeGeom_)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>runtimeGeom_</code> <a class="xref" href="Hi.Cbtr.CubeTree.html">CubeTree</a></dt>
<dd><p>The runtime cube tree geometry.</p>
</dd>
</dl>
<a id="Hi_NcMech_Workpieces_WorkpieceService_WriteRuntimeGeom_" data-uid="Hi.NcMech.Workpieces.WorkpieceService.WriteRuntimeGeom*"></a>
<h3 id="Hi_NcMech_Workpieces_WorkpieceService_WriteRuntimeGeom_System_String_System_Threading_CancellationToken_System_IProgress_System_Object__" data-uid="Hi.NcMech.Workpieces.WorkpieceService.WriteRuntimeGeom(System.String,System.Threading.CancellationToken,System.IProgress{System.Object})">
WriteRuntimeGeom(string, CancellationToken, IProgress&lt;object&gt;)
</h3>
<div class="markdown level1 summary"><p>Writes the runtime geometry to a file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void WriteRuntimeGeom(string file, CancellationToken token, IProgress&lt;object&gt; progress = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>file</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Target file path.</p>
</dd>
<dt><code>token</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
<dd><p>Cancellation token.</p>
</dd>
<dt><code>progress</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</dt>
<dd><p>Progress reporting interface.</p>
</dd>
</dl>
</article>
<div class="contribution d-print-none">
</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>