213 lines
12 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Player Panel | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Player Panel | 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="player-panel">Player Panel</h1>
<p>The Player Panel is the primary visualization component for machining simulation playback.</p>
<h2 id="key-models">Key Models</h2>
<ul>
<li><a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> - Project data service</li>
<li><a class="xref" href="../../api/Hi.HiNcKits.UserService.html">UserService</a> - User service</li>
</ul>
<h2 id="associated-tool-bars">Associated Tool Bars</h2>
<ul>
<li><a href="player-tool-bar.html">Player Tool Bar</a></li>
<li><a href="../renderingcanvas-tool-bar.html">RenderingCanvas Tool Bar</a></li>
<li><a href="player-extended-renderingcanvas-tool-bar.html">Player extended RenderingCanvas Tool Bar</a></li>
</ul>
<h2 id="layout-structure">Layout Structure</h2>
<p>The Player Panel consists of:</p>
<ul>
<li><strong>Central Area</strong>: <a href="../../fundamentals/rendering/rendering-canvas/index.html">RenderingCanvas</a> for 3D visualization</li>
<li><strong>Vertical Splitter</strong>: Draggable bar to resize widths</li>
<li><strong>Side Panel</strong>:
<ul>
<li>Upper: <a href="selected-step-info-panel.html">Selected-Step Info Panel</a></li>
<li>Horizontal Splitter: Draggable bar to resize heights</li>
<li>Lower: <a href="../session-message-panel/index.html">Session Message Panel</a></li>
</ul>
</li>
</ul>
<h2 id="default-panel-configuration">Default Panel Configuration</h2>
<p>The Player Panel is set as the default panel on the <code>Page Panel</code> when the main window opens. The associated toolbars (Player Tool Bar, RenderingCanvas Tool Bar, Player Extended RenderingCanvas Tool Bar) are also configured accordingly.</p>
<h2 id="player-extended-renderingcanvas-tool-bar-behavior">Player Extended RenderingCanvas Tool Bar Behavior</h2>
<p>The <a href="player-extended-renderingcanvas-tool-bar.html">Player Extended RenderingCanvas Tool Bar</a> provides additional controls:</p>
<ul>
<li><a href="player-extended-renderingcanvas-tool-bar.html#behavior-of-cl-strip-buttons-and-fit-view-button">CL Strip Buttons and Fit View Button</a> - Controls for CL strip display and view fitting</li>
<li><a href="player-extended-renderingcanvas-tool-bar.html#behavior-of-project-rendering-items-dropdown">Project Rendering Items DropDown</a> - Selection of rendering items</li>
</ul>
<p>The toolbar receives notifications when the project is changed from <a href="../main-panel.html">Main Panel</a>.</p>
<h2 id="related-preference">Related Preference</h2>
<ul>
<li><a href="../preference/step-present-preference-page.html">Step Present Preference Page</a> - Controls step presentation settings</li>
</ul>
<h2 id="renderingcanvas-behavior">RenderingCanvas Behavior</h2>
<p>The RenderingCanvas displays the machining project visualization:</p>
<ol>
<li>On initialization, a <a class="xref" href="../../api/Hi.MachiningProcs.MachiningProjectDisplayee.html">MachiningProjectDisplayee</a> is created and assigned to <code>RenderingCanvas</code>.<a class="xref" href="../../api/Hi.Disp.DispEngine.html">DispEngine</a>.<a class="xref" href="../../api/Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_Displayee">Displayee</a></li>
<li>The displayee receives project data from <a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a></li>
<li>The RenderingCanvas is disposed when the Player Panel is disposed</li>
</ol>
<h2 id="source-code-locations">Source Code Locations</h2>
<p>See <a href="../index.html">HiNC GUI Architecture</a> for git repository links.</p>
<h3 id="wpf-application">WPF Application</h3>
<ul>
<li><code>Play/PlayerPanel</code></li>
</ul>
<h3 id="web-application">Web Application</h3>
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
<p>Core page + toolbars:</p>
<ul>
<li><code>wwwroot-src/src/pages/PlayerPage.vue</code> — routed page at <code>/player</code>. Hosts the top toolbar row, the central <code>&lt;RenderingCanvas&gt;</code>, and the right-hand splitter with step-info + session-message panels.</li>
<li><code>wwwroot-src/src/components/player/PlayerToolBar.vue</code> — play / pause / stop / seek controls.</li>
<li><code>wwwroot-src/src/components/player/PlayerExtendedToolBar.vue</code> — Display Options ▾ (via the shared <code>DisplayOptionsMenu</code>) + CL-strip fit-view controls + Project Rendering Items dropdown.</li>
<li><code>wwwroot-src/src/components/player/PlayerDivisionVisibilityButton.vue</code><code>view_quilt</code> icon button that drives the ten O1.1 layout toggles (which strip charts / cycle-line charts / info panels are visible). Persists via <code>/api/preference/player-div-config</code>.</li>
<li><code>wwwroot-src/src/components/player/SelectedStepInfoPanel.vue</code> — condensed step-info summary (see <a href="selected-step-info-panel.html">Selected-Step Info Panel</a>).</li>
<li><code>wwwroot-src/src/components/player/SessionMessagePanel.vue</code> — mission-time message list.</li>
</ul>
<p>Charts (see the dedicated anatomy pages for details):</p>
<ul>
<li><a href="strip-charts.html">Strip Charts</a> — three <code>uplot</code>-backed strip charts (availability / surface roughness / individual-property) driven by <code>ClStrip</code>.</li>
<li><a href="cycle-line-charts.html">Cycle-Line Charts</a> — four <code>uplot</code>-backed cycle-line charts (force / sim spindle moment / sensor spindle moment / dynamometer force).</li>
</ul>
<p>Shared chart primitives (under <code>components/player/charts/</code>):</p>
<ul>
<li><code>UplotChart.vue</code> — thin uplot wrapper with <code>ResizeObserver</code> + reactive <code>data</code> / <code>series</code> / <code>bands</code> bindings.</li>
<li><code>BaseStripChart.vue</code> — strip-chart skeleton that matches <code>PluralStripChart</code> (min / max banded series, header aspect picker, wheel / drag / click pointer handlers).</li>
<li><code>BaseCycleLineChart.vue</code> — cycle-line skeleton that takes a <code>fetcher</code> prop and re-fetches on <code>SelectedStepInfoHub</code> updates.</li>
</ul>
<p>Backends:</p>
<ul>
<li><code>Players/PlayerController.cs</code> — play / pause / stop / seek.</li>
<li><code>Players/PlayerStatusHub.cs</code> + <code>Players/PlayerStatusService.cs</code> — session lifecycle broadcasts.</li>
<li><code>Players/SessionMessageHub.cs</code> + <code>Players/SessionMessageService.cs</code> — mission-time message stream.</li>
<li><code>Players/SelectedStepInfoHub.cs</code> + <code>Players/SelectedStepInfoService.cs</code> — selected-step push notifications (drives step-info panel + cycle-line chart refetches).</li>
<li><code>Players/ClStripController.cs</code> + <code>Players/ClStripHub.cs</code> + <code>Players/ClStripBroadcastService.cs</code> — CL-strip range state + zoom / pan / select / enter broadcasts.</li>
<li><code>Players/PlayerChartsController.cs</code> — unified strip-chart + cycle-line-chart data endpoints.</li>
<li><code>Players/PlayerCanvasHub.cs</code> — rendering-canvas SignalR hub for the central viewer.</li>
</ul>
<h2 id="implementation-checklist">Implementation Checklist</h2>
<div class="TIP">
<h5>Tip</h5>
<p>When building a new Player Panel implementation:</p>
<ol>
<li>Create the layout with RenderingCanvas</li>
<li>Set up RenderingCanvas behavior</li>
<li>Create <a href="player-tool-bar.html">Player Tool Bar</a></li>
<li>Create <a href="player-extended-renderingcanvas-tool-bar.html">Player Extended RenderingCanvas Tool Bar</a> with CL Strip, Fit View, and Rendering Items behaviors</li>
<li>Connect to Navigation Menu on <a href="../main-panel.html">Main Panel</a></li>
<li>Set Player Panel as default panel with associated toolbars</li>
<li>Build <a href="../session-message-panel/index.html">Session Message Panel</a>, <a href="selected-step-info-panel.html">Selected-Step Info Panel</a>, and <a href="../preference/step-present-preference-page.html">Step Present Preference Page</a></li>
</ol>
</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>