tune
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,145 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Kinematic Topology | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Kinematic Topology | 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="Usage.HiMech.Topo">
|
||||
<h1 id="kinematic-topology">Kinematic Topology</h1>
|
||||
|
||||
<p>The Kinematic Topology is composed of three elemental classes: <strong><a class="xref" href="../../../../api/Hi.Mech.Topo.Anchor.html">Anchor</a></strong>, <strong><a class="xref" href="../../../../api/Hi.Mech.Topo.Branch.html">Branch</a></strong> and <strong><a class="xref" href="../../../../api/Hi.Mech.Topo.Asmb.html">Asmb</a></strong>.</p>
|
||||
<h2 id="basic-elements">Basic Elements</h2>
|
||||
<h3 id="anchors-and-branches">Anchors and Branches</h3>
|
||||
<p><strong><a class="xref" href="../../../../api/Hi.Mech.Topo.Anchor.html">Anchor</a></strong> object contains a cartesian coordinate. It can be a mechanical component or a flag.</p>
|
||||
<p><strong><a class="xref" href="../../../../api/Hi.Mech.Topo.Branch.html">Branch</a></strong> object is a directional link between two <a class="xref" href="../../../../api/Hi.Mech.Topo.Anchor.html">Anchor</a> objects. It contains the <strong><a class="xref" href="../../../../api/Hi.Mech.Topo.ITransformer.html">ITransformer</a></strong> object. The <a class="xref" href="../../../../api/Hi.Mech.Topo.ITransformer.html">ITransformer</a> object contains a coordinate <strong>transformation matrix</strong>. As shown in the following sketch:</p>
|
||||
<p><img src="chainLink.png" alt="Chain Structure"></p>
|
||||
<h3 id="assembly-management">Assembly Management</h3>
|
||||
<p><strong><a class="xref" href="../../../../api/Hi.Mech.Topo.Asmb.html">Asmb</a></strong> (Assembly) provides organization and management of Anchors. An Assembly can contain both Anchors and other Assemblies. Key features include:</p>
|
||||
<ul>
|
||||
<li>Grouping related Anchors together</li>
|
||||
<li>Managing coordinate transformations</li>
|
||||
<li>Providing display and indexing functions</li>
|
||||
<li>Supporting hierarchical structure</li>
|
||||
</ul>
|
||||
<h2 id="kinematic-chain-example">Kinematic Chain Example</h2>
|
||||
<p>The following figure shows a kinematic chain of a non-orthogonal 5-axis machine tool:</p>
|
||||
<p><img src="vmt.png" alt="VMT Structure"></p>
|
||||
<p>Each <a class="xref" href="../../../../api/Hi.Mech.Topo.Anchor.html">Anchor</a> represents a component:</p>
|
||||
<ul>
|
||||
<li>Axis components: X, Y, Z, B, C</li>
|
||||
<li>Base components: O (base1), O* (base2)</li>
|
||||
<li>Tool components: S (spindle), T (tool body), T* (tool flute)</li>
|
||||
<li>Workpiece: W</li>
|
||||
</ul>
|
||||
<p>The relative transform between two Anchors is calculated by multiplying the transform matrices along the Branch. For example, the transform matrix from W to T is:</p>
|
||||
<div class="math">
|
||||
\[
|
||||
M_{WT} = M_{CW}^{-1} \cdot M_{YC}^{-1} \cdot M_{OY}^{-1} \cdot M_{OO^*} \cdot M_{O^*X} \cdot M_{XZ} \cdot M_{ZB} \cdot M_{BS} \cdot M_{ST}
|
||||
\]</div>
|
||||
<p>This matrix can be obtained using <a class="xref" href="../../../../api/Hi.Mech.Topo.Asmb.html#Hi_Mech_Topo_Asmb_GetMat4d_Hi_Mech_Topo_IGetAnchor_Hi_Mech_Topo_IGetAnchor_">GetMat4d(IGetAnchor, IGetAnchor)</a>.</p>
|
||||
|
||||
</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>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 90 KiB |
@@ -0,0 +1,139 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>HiAPI Mechanics Overview | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="HiAPI Mechanics Overview | 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="HiMech.Overview">
|
||||
<h1 id="mechanism-topology">Mechanism Topology</h1>
|
||||
|
||||
<p>HiAPI Mechanism Topology provides basic functionality for assembling mechanical structures and simulating their motions. It allows you to build kinematic models of milling machines and similar mechanical structures through a topology-based approach.</p>
|
||||
<h2 id="core-concepts">Core Concepts</h2>
|
||||
<h3 id="kinematic-topology">Kinematic Topology</h3>
|
||||
<p>Kinematic Topology is the core concept of this module, which describes the motion relationships between mechanical components. With Kinematic Topology, you can:</p>
|
||||
<ul>
|
||||
<li>Define mechanical structures and motion relationships</li>
|
||||
<li>Calculate forward and inverse kinematics</li>
|
||||
<li>Display component positions and orientations</li>
|
||||
<li>Conduct collision detection</li>
|
||||
</ul>
|
||||
<h3 id="main-modules">Main Modules</h3>
|
||||
<ul>
|
||||
<li><a href="Topo/index.html">Topology</a> - Kinematic topology structure, including assembly management and chain definition</li>
|
||||
<li><a href="transformers/index.html">Transformers</a> - Coordinate transformation and motion transformation</li>
|
||||
<li><a href="render-topology/index.html">Render Topology</a> - Rendering with topology structure and anchored display</li>
|
||||
</ul>
|
||||
<h2 id="api-references">API References</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../api/Hi.Mech.Topo.html">Hi.Mech.Topo</a> - Core topology functionality</li>
|
||||
<li><a class="xref" href="../../../api/Hi.Mech.Topo.Asmb.html">Asmb</a> - Assembly-related functionality</li>
|
||||
<li><a class="xref" href="../../../api/Hi.Mech.Topo.Branch.html">Branch</a> - Chain-related functionality</li>
|
||||
</ul>
|
||||
<h2 id="examples">Examples</h2>
|
||||
<p>Please refer to the examples in each sub-section to learn how to use these features to build your applications.</p>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,228 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Render Topology | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Render Topology | 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="">
|
||||
<h1 id="render-topology">Render Topology</h1>
|
||||
|
||||
<p>Read <a href="../Topo/index.html">Kinematic Topology</a> <a href="../../rendering/index.html">Rendering</a> for the prerequisite.</p>
|
||||
<p>A <a class="xref" href="../../../../api/Hi.Mech.Topo.Asmb.html">Asmb</a> is a group to render its descendent <a class="xref" href="../../../../api/Hi.Mech.Topo.Anchor.html">Anchor</a>s.</p>
|
||||
<p>Several ways to render with the topology:</p>
|
||||
<ul>
|
||||
<li>Render by Anchoring Matrix Map</li>
|
||||
<li>Render by Anchored Displayee</li>
|
||||
</ul>
|
||||
<h2 id="render-by-anchoring-matrix-map">Render by Anchoring Matrix Map</h2>
|
||||
<h2 id="render-by-anchored-displayee">Render by Anchored Displayee</h2>
|
||||
<p>Inherit <a class="xref" href="../../../../api/Hi.Mech.Topo.IAnchoredDisplayee.html">IAnchoredDisplayee</a> or apply <a class="xref" href="../../../../api/Hi.Mech.Topo.AnchoredDisplayee.html">AnchoredDisplayee</a> to <a class="xref" href="../../../../api/Hi.Mech.Topo.Asmb.html">Asmb</a>.Display().</p>
|
||||
<p>Inherit <a class="xref" href="../../../../api/Hi.Mech.Topo.ITopoDisplayee.html">ITopoDisplayee</a> to manage the object with <a class="xref" href="../../../../api/Hi.Mech.Topo.Asmb.html">Asmb</a> and plural anchors .</p>
|
||||
<p>The base logic is also by the anchoring matrix. Here is some class and function wrapping the logic.</p>
|
||||
<p>The sample code shows the topology rendering for a <a class="xref" href="../../../../api/Hi.Milling.MillingTools.MillingTool.html">MillingTool</a> editing helper:</p>
|
||||
<pre><code class="lang-csharp" name="MillingToolEditorDisplayee">using Hi.Common;
|
||||
using Hi.Common.Messages;
|
||||
using Hi.Disp;
|
||||
using Hi.Disp.Flag;
|
||||
using Hi.Geom;
|
||||
using Hi.Mech.Topo;
|
||||
using Hi.Milling.Cutters;
|
||||
using Hi.NcMech.Holders;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Hi.Milling.MillingTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Display host for a milling tool composed of a cutter and a holder.
|
||||
/// </summary>
|
||||
public class MillingToolEditorDisplayee : ITopoDisplayee, IClearCache
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the delegate that provides the <see cref="MillingTool"/> instance.
|
||||
/// </summary>
|
||||
public Func<MillingTool> MillingToolGetter { get; set; }
|
||||
/// <summary>
|
||||
/// Gets the current <see cref="MillingTool"/> instance.
|
||||
/// </summary>
|
||||
public MillingTool MillingTool => MillingToolGetter?.Invoke();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether to show the cutter.
|
||||
/// </summary>
|
||||
public bool ShowCutter { get; set; } = true;
|
||||
/// <summary>
|
||||
/// Gets or sets whether to show the holder.
|
||||
/// </summary>
|
||||
public bool ShowHolder { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the displayee for the milling cutter.
|
||||
/// </summary>
|
||||
public MillingCutterEditorDisplayee MillingCutterEditorDisplayee { get; }
|
||||
= new MillingCutterEditorDisplayee();
|
||||
/// <summary>
|
||||
/// Gets the displayee for the holder.
|
||||
/// </summary>
|
||||
public HolderEditorDisplayee HolderEditorDisplayee { get; }
|
||||
= new HolderEditorDisplayee();
|
||||
/// <inheritdoc/>
|
||||
public List<IAnchoredDisplayee> GetAnchoredDisplayeeList()
|
||||
{
|
||||
var dst = new List<IAnchoredDisplayee>();
|
||||
|
||||
var millingTool = MillingTool;
|
||||
if (millingTool == null)
|
||||
return dst;
|
||||
|
||||
if (ShowCutter)
|
||||
{
|
||||
var cutter = millingTool.Cutter;
|
||||
if (cutter is MillingCutter millingCutter)
|
||||
{
|
||||
//MessageKit.AddMessage($"MillingTool.Cutter: {MillingTool?.Cutter?.GetHashCode()}");
|
||||
MillingCutterEditorDisplayee.MillingCutterSourceFunc
|
||||
= () => MillingTool?.Cutter as MillingCutter;
|
||||
dst.Add(MillingCutterEditorDisplayee);
|
||||
}
|
||||
else if(cutter!=null)
|
||||
dst.Add(cutter);
|
||||
}
|
||||
if (ShowHolder)
|
||||
{
|
||||
HolderEditorDisplayee.Holder = millingTool.Holder;
|
||||
dst.Add(HolderEditorDisplayee);
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
/// <inheritdoc/>
|
||||
public void Display(Bind bind)
|
||||
{
|
||||
bind.PushCoveringPixelMode();
|
||||
DimensionBar.Display(bind, "mm");
|
||||
bind.ModelMatStack.Pop();
|
||||
|
||||
TopoDisplayeeUtil.Display(this, bind);
|
||||
}
|
||||
/// <inheritdoc/>
|
||||
public void ExpandToBox3d(Box3d dst)
|
||||
{
|
||||
TopoDisplayeeUtil.ExpandToBox3d(this, dst);
|
||||
}
|
||||
/// <inheritdoc/>
|
||||
public Asmb GetAsmb() => MillingTool?.Asmb;
|
||||
/// <inheritdoc/>
|
||||
public Anchor GetAnchor() => MillingTool?.GetAnchor();
|
||||
/// <inheritdoc/>
|
||||
public void ClearCache()
|
||||
{
|
||||
MillingCutterEditorDisplayee?.ClearCache();
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</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>
|
||||
@@ -0,0 +1,199 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Handle Transform Matrix by ITransformer | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Handle Transform Matrix by ITransformer | 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="HiMech.Tutor.transformers">
|
||||
<h1 id="handle-transform-matrix-by-itransformer">Handle Transform Matrix by ITransformer</h1>
|
||||
|
||||
<p><strong><a class="xref" href="../../../../api/Hi.Mech.Topo.ITransformer.html">ITransformer</a></strong> contains a transform matrix and a inverse transform matrix. The matrix is 4x4 column-major matrix, which describe the orientation or movement between 3D coordinates.</p>
|
||||
<p>Several common used interface and class are implemented from <a class="xref" href="../../../../api/Hi.Mech.Topo.ITransformer.html">ITransformer</a>. The inheritance is shown:</p>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.Mech.Topo.IStaticTransformer.html">IStaticTransformer</a>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.Mech.Topo.NoTransform.html">NoTransform</a></li>
|
||||
<li><a class="xref" href="../../../../api/Hi.Mech.Topo.StaticTranslation.html">StaticTranslation</a></li>
|
||||
<li><a class="xref" href="../../../../api/Hi.Mech.Topo.StaticRotation.html">StaticRotation</a></li>
|
||||
<li><a class="xref" href="../../../../api/Hi.Mech.Topo.StaticFreeform.html">StaticFreeform</a></li>
|
||||
<li><a class="xref" href="../../../../api/Hi.Mech.Topo.GeneralTransform.html">GeneralTransform</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="xref" href="../../../../api/Hi.Mech.Topo.IDynamicTransformer.html">IDynamicTransformer</a>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.Mech.Topo.IDynamicRegular.html">IDynamicRegular</a>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.Mech.Topo.DynamicTranslation.html">DynamicTranslation</a></li>
|
||||
<li><a class="xref" href="../../../../api/Hi.Mech.Topo.DynamicRotation.html">DynamicRotation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="xref" href="../../../../api/Hi.Mech.Topo.DynamicFreeform.html">DynamicFreeform</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p><strong><a class="xref" href="../../../../api/Hi.Mech.Topo.IStaticTransformer.html">IStaticTransformer</a></strong> is transformer with constant matrix. <strong><a class="xref" href="../../../../api/Hi.Mech.Topo.NoTransform.html">NoTransform</a></strong>, <strong><a class="xref" href="../../../../api/Hi.Mech.Topo.StaticTranslation.html">StaticTranslation</a></strong> and <strong><a class="xref" href="../../../../api/Hi.Mech.Topo.StaticRotation.html">StaticRotation</a></strong> contains transform matrix of identity, translate and rotate respectively. <strong><a class="xref" href="../../../../api/Hi.Mech.Topo.StaticFreeform.html">StaticFreeform</a></strong> contains a arbitrary constant transform matrix.</p>
|
||||
<p>The transform matrix of <a class="xref" href="../../../../api/Hi.Mech.Topo.StaticTranslation.html">StaticTranslation</a> is:</p>
|
||||
<div class="math">
|
||||
\[
|
||||
M_{StaticTranslate}=
|
||||
\begin{bmatrix}
|
||||
1 & 0 & 0 & 0 \\\\
|
||||
0 & 1 & 0 & 0 \\\\
|
||||
0 & 0 & 1 & 0 \\\\
|
||||
Trans.x & Trans.y & Trans.z & 1
|
||||
\end{bmatrix}
|
||||
\]</div>
|
||||
<p>The transform matrix of <a class="xref" href="../../../../api/Hi.Mech.Topo.StaticRotation.html">StaticRotation</a> and <a class="xref" href="../../../../api/Hi.Mech.Topo.DynamicRotation.html">DynamicRotation</a> is:</p>
|
||||
<div class="math">
|
||||
\[
|
||||
M_{Rotate}=
|
||||
\begin{bmatrix}
|
||||
1 & 0 & 0 & 0 \\\\
|
||||
0 & 1 & 0 & 0 \\\\
|
||||
0 & 0 & 1 & 0 \\\\
|
||||
-Pivot.x & -Pivot.y & -Pivot.z & 1
|
||||
\end{bmatrix}
|
||||
\cdot
|
||||
\\\\
|
||||
\begin{bmatrix}
|
||||
Rot_{00}(axis,rad) & Rot_{01}(axis,rad) & Rot_{02}(axis,rad) & 0 \\\\
|
||||
Rot_{10}(axis,rad) & Rot_{11}(axis,rad) & Rot_{12}(axis,rad) & 0 \\\\
|
||||
Rot_{20}(axis,rad) & Rot_{21}(axis,rad) & Rot_{22}(axis,rad) & 0 \\\\
|
||||
0 & 0 & 0 & 1
|
||||
\end{bmatrix}
|
||||
\cdot
|
||||
\\\\
|
||||
\begin{bmatrix}
|
||||
1 & 0 & 0 & 0 \\\\
|
||||
0 & 1 & 0 & 0 \\\\
|
||||
0 & 0 & 1 & 0 \\\\
|
||||
Pivot.x & Pivot.y & Pivot.z & 1
|
||||
\end{bmatrix}
|
||||
\]</div>
|
||||
<p>Where <a class="xref" href="../../../../api/Hi.Mech.Topo.DynamicRotation.html#Hi_Mech_Topo_DynamicRotation_Pivot">Pivot</a> is the position of the rotation axis.</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>Pivot is a point. However, rotation axis is a line. It means that it causes the same matrix no matter how the pivot is moving along the axis.</p>
|
||||
</div>
|
||||
<p><strong><a class="xref" href="../../../../api/Hi.Mech.Topo.IDynamicTransformer.html">IDynamicTransformer</a></strong> is transformer with inconstant transform matrix. <strong><a class="xref" href="../../../../api/Hi.Mech.Topo.IDynamicRegular.html">IDynamicRegular</a></strong> has a property <a class="xref" href="../../../../api/Hi.Mech.Topo.IDynamicRegular.html#Hi_Mech_Topo_IDynamicRegular_Step">Step</a>, implied that the transform matrix is one parameter driven. <a class="xref" href="../../../../api/Hi.Mech.Topo.TransformerUtil.html#Hi_Mech_Topo_TransformerUtil_GetSteps_Hi_Mech_Topo_IDynamicRegular___">GetSteps(IDynamicRegular[])</a> and <a class="xref" href="../../../../api/Hi.Mech.Topo.TransformerUtil.html#Hi_Mech_Topo_TransformerUtil_SetSteps_Hi_Mech_Topo_IDynamicRegular___System_Double___">SetSteps(IDynamicRegular[], double[])</a> provide easy handle of an array of <a class="xref" href="../../../../api/Hi.Mech.Topo.IDynamicRegular.html">IDynamicRegular</a> objects.</p>
|
||||
<p>The transform matrix of <a class="xref" href="../../../../api/Hi.Mech.Topo.DynamicTranslation.html">DynamicTranslation</a> is:</p>
|
||||
<div class="math">
|
||||
\[
|
||||
M_{DynamicTranslate}=
|
||||
\begin{bmatrix}
|
||||
1 & 0 & 0 & 0 \\\\
|
||||
0 & 1 & 0 & 0 \\\\
|
||||
0 & 0 & 1 & 0 \\\\
|
||||
Trans.x \cdot Step & Trans.y \cdot Step & Trans.z \cdot Step & 1
|
||||
\end{bmatrix}
|
||||
\]</div>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>In convention, <a class="xref" href="../../../../api/Hi.Mech.Topo.StaticTranslation.html#Hi_Mech_Topo_StaticTranslation_Trans">Trans</a> should be normalized.</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>
|
||||
Reference in New Issue
Block a user