Archived
211 lines
12 KiB
HTML
211 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Transformation Geometry Control | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Transformation Geometry Control | 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="Anatomy-TransformationGeomControl">
|
|
<h1 id="transformation-geometry-control">Transformation Geometry Control</h1>
|
|
|
|
<p>A <a class="xref" href="../../api/Hi.Geom.TransformationGeom.html">TransformationGeom</a> is an inner geometry plus the transformer that places it, and the
|
|
editor is those two things side by side. It has two faces: an embedded two-card editor,
|
|
and a Control-Tree panel that shows only the status of each half and puts the editing on child
|
|
nodes.</p>
|
|
<div class="IMPORTANT">
|
|
<h5>Important</h5>
|
|
<p><strong>Choosing a kind here replaces, it does not wrap.</strong> Picking an inner geometry calls the
|
|
container-aware create endpoint, which constructs a fresh instance and discards whatever was
|
|
there. There is no operation anywhere that wraps an existing geometry into a transformation
|
|
geometry, or extracts it back out — see
|
|
<a href="geom-manage-control.html">Geometry Management Panel</a>.</p>
|
|
</div>
|
|
<h2 id="layout">Layout</h2>
|
|
<h3 id="the-embedded-editor">The embedded editor</h3>
|
|
<p>Two bordered cards, each badged with the live type behind it, over a short explanation of what a
|
|
transformer applied to a geometry means:</p>
|
|
<ul>
|
|
<li><strong>Inner Geometry</strong> (<code>.../inner-geom</code>) — the full <a href="geom-manage-control.html">Geometry Management Panel</a>,
|
|
its dropdown labelled <em>Inner geometry type</em>, over five kinds: Box3d, Cylindroid, StlFile, a nested
|
|
TransformationGeom and GeomCombination — which is what makes recursion and nesting legal — plus a
|
|
<strong>None (unset)</strong> entry.</li>
|
|
<li><strong>Inner Transformer</strong> — the
|
|
<a class="xref" href="transformer-panel.html">Transformer Select Panel</a>, mounted with no kind restriction at all, so
|
|
its own default of <strong>all seven</strong> transformer kinds applies.</li>
|
|
</ul>
|
|
<h3 id="the-control-tree-panel">The Control-Tree panel</h3>
|
|
<p>Status badges for the two halves and the same explanation, and nothing editable: the tree grows an
|
|
<strong>Inner Geometry</strong> slot and an <strong>Inner Transformer</strong> slot as children, and each of those grows its
|
|
own kind child. The registry deliberately overrides the kind → editor map here, so the two-card
|
|
editor never appears inside a tree.</p>
|
|
<h2 id="behavior">Behavior</h2>
|
|
<ul>
|
|
<li><strong>The identity transformer is the floor.</strong> The inner-transformer picker offers no null entry, and
|
|
the server installs a <code>NoTransform</code> whenever the field is null, so the slot is never unset.</li>
|
|
<li><strong>Creation is container-aware on both halves.</strong> Both go through this type's own create endpoints
|
|
rather than the generic per-kind ones, so the owning field is rebound and not merely the store
|
|
entry.</li>
|
|
<li><strong>The control does not preview.</strong> There is no viewport on it. It reports edits upward — one
|
|
event when a half is mutated, another when a half is replaced — and the hosting page's shared 3D
|
|
canvas re-renders from there.</li>
|
|
<li><strong>A null inner geometry has a deterministic key anyway.</strong> When the inner geometry is unset the
|
|
server returns no key, so the editor falls back to a derived alias; without it the picker could
|
|
never create the first geometry.</li>
|
|
</ul>
|
|
<h2 id="source-code-path">Source Code Path</h2>
|
|
<p>See <a class="xref" href="../index.html">HiNC App Anatomy</a> for git repository links.</p>
|
|
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
|
|
<ul>
|
|
<li><code>wwwroot-src/src/components/geom/TransformationGeomEditor.vue</code> — the embedded editor: the two
|
|
cards and their type badges, the two container-aware create hooks, and the fallback alias for a
|
|
null inner geometry.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/TransformationGeomTreePanel.vue</code> — the Control-Tree face:
|
|
status only.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/itemTypes.ts</code> — registers the kind against that panel with
|
|
a child builder that grows the Inner Geometry and Inner Transformer slots, and is where the
|
|
override of the kind → editor map lives.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/GeometrySlotPanel.vue</code>,
|
|
<code>wwwroot-src/src/components/controlTree/TransformerSlotPanel.vue</code> and
|
|
<code>wwwroot-src/src/components/controlTree/SoleEditorPanel.vue</code> — the two child slots' pickers and
|
|
each kind grandchild's editor.</li>
|
|
<li><code>wwwroot-src/src/components/geom/geometryEditors.ts</code> and
|
|
<code>wwwroot-src/src/components/geom/GeometryEditor.vue</code> — the kind map that reaches this editor, and
|
|
the switchboard it re-enters for its own inner geometry.</li>
|
|
<li><code>wwwroot-src/src/components/topo/TransformerSelectPanel.vue</code> and
|
|
<code>wwwroot-src/src/components/topo/transformerEditors.ts</code> — the inner-transformer picker and the
|
|
seven kinds it offers, with the labels it renders them under.</li>
|
|
<li><code>wwwroot-src/src/components/geom/GeomCombinationEditor.vue</code>,
|
|
<code>wwwroot-src/src/pages/MechBuilderPage.vue</code> and
|
|
<code>wwwroot-src/src/components/toolhouse/UpperBeamDiv.vue</code> — the three embedders of the non-tree
|
|
form.</li>
|
|
<li><code>wwwroot-src/src/api/geometry.ts</code> — the transformation-geometry DTO, the two index calls and the
|
|
two create calls.</li>
|
|
<li><code>wwwroot-src/src/api/transformer.ts</code> — the transformer kind union and the per-kind endpoints the
|
|
inner transformer's editors bind through.</li>
|
|
<li><code>wwwroot-src/src/i18n/en/geom.ts</code> and <code>wwwroot-src/src/i18n/en/tree.ts</code> — the card labels, the
|
|
explanation, and the two child-node labels.</li>
|
|
<li><code>Geom/TransformationGeomController.cs</code> — REST endpoints at <code>/api/TransformationGeom/*</code>: <code>New</code>,
|
|
<code>Get</code>, <code>IndexGeom</code>, <code>IndexTransformer</code>, <code>CreateGeom</code>, <code>CreateTransformer</code>, <code>UpdateTransformer</code>,
|
|
<code>GetGeomType</code> and <code>GetTransformerType</code>. <code>IndexGeom</code> answers empty for a null geometry, and
|
|
<code>IndexTransformer</code> is where the identity default is installed.</li>
|
|
<li><code>Geom/Box3dController.cs</code>, <code>Geom/CylindroidController.cs</code>, <code>Geom/StlFileController.cs</code> and
|
|
<code>Geom/GeomCombinationController.cs</code> — the four other inner-geometry kinds' own surfaces.</li>
|
|
<li>The seven per-kind transformer controllers under <code>Mech/Topo/</code> — reached by the inner transformer's
|
|
editors for their own reads and writes, not for creation, which this type's own endpoint owns.</li>
|
|
<li><code>Common/IndexController.cs</code> and <code>Common/IndexService.cs</code> — the type probe both pickers use, and
|
|
the store the two aliases are registered into.</li>
|
|
</ul>
|
|
<h2 id="see-also">See Also</h2>
|
|
<ul>
|
|
<li><a class="xref" href="../../technique/mechanism/transformers.html">Transformers</a></li>
|
|
<li><a href="geom-manage-control.html">Geometry Management Panel</a> — the switchboard this editor embeds for its
|
|
inner geometry, and the only place a wrap or extract exists</li>
|
|
<li><a class="xref" href="transformer-panel.html">Transformer Select Panel</a> — the inner-transformer picker and its seven
|
|
kinds</li>
|
|
</ul>
|
|
|
|
</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>
|