feat(carrier): 航空母舰 PartDesign 有头创建工具包与初学者教学

- 新数据链 web/teaching/cases/carrier-partdesign:20 件零件(spec.json 唯一来源)、
  内核建造器 parts/*.mjs、traces/FCStd/replay 全量产物;装配 20 插入 + 19 关节。
- 工具包 tools/carrier:catalog / preflight / create-part / create-assembly /
  create-all / list / self-test / README,按零件与装配拆分为独立工具。
- 共享驱动扩展 web/tools/cad-ui-rebuild:Loft/Pipe/Hole/Fillet/Chamfer/Mirrored/
  LinearPattern 交互,Reversed 复选框补齐;装配 saveAssemblyBundle 先 Accept 再保存。
- 教学:lessons.mjs 新增 carrier 组(环境课 + 20 件 + 装配),suite-runner 增加
  carrier-part/carrier-assembly,生成 carrier-toolkit.html 并接入 index 与控制台证据。

验证:20 件 210 步全部有头通过(P05 修复后 39640 m³;P06 回归 8/8);
装配 20/20 插入、19/19 关节、20 组件 0 畸形、0 mismatch;check:carrier、
check:reducer、check-console --live 全绿。

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 18:46:27 +08:00
parent b876ad5742
commit 87b2a6cb8a
335 changed files with 80492 additions and 5 deletions

View File

@@ -0,0 +1,328 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>航空母舰 · PartDesign 有头创建工具(初学者)</title>
<style>
:root{--bg:#0f1419;--panel:#17212b;--panel2:#1b2733;--line:#2a3a45;--text:#dbe6ee;--muted:#93a6b3;--accent:#73c6d4;--ok:#7fc98b;--warn:#e0b15c;--bad:#e58a8a;color-scheme:dark}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.65 system-ui,-apple-system,"Segoe UI","Noto Sans CJK SC","Microsoft YaHei",sans-serif;overflow-wrap:break-word}
a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}
code,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
code{background:#0b1117;border:1px solid var(--line);border-radius:4px;padding:.1em .35em;font-size:.9em}
header.top{position:sticky;top:0;z-index:10;display:flex;gap:14px;align-items:center;padding:10px 18px;background:rgba(15,20,25,.94);border-bottom:1px solid var(--line);backdrop-filter:blur(6px)}
header.top .brand{font-weight:650}
header.top .spacer{flex:1}
main{max-width:1180px;margin:0 auto;padding:18px}
h1{font-size:22px;margin:6px 0}
h2{font-size:17px;margin:26px 0 10px;border-bottom:1px solid var(--line);padding-bottom:6px}
h3{font-size:15px;margin:0}
.lead{color:#c6d6e2}
.muted{color:var(--muted)}.small{font-size:12.5px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:14px 16px;margin:12px 0}
.pill{background:var(--panel2);border:1px solid var(--line);border-radius:999px;padding:1px 9px;font-size:12px;color:var(--muted)}
.parts{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:12px}
.part{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:12px 14px}
.part .head{display:flex;gap:8px;align-items:center;justify-content:space-between}
.part .meta{color:var(--muted);font-size:12.5px;margin:4px 0 8px}
.steps{margin:6px 0 10px 18px;padding:0;font-size:13px}
.steps li{margin:2px 0}
.steps .kind{display:inline-block;min-width:52px;color:var(--muted);font-size:11.5px;letter-spacing:.02em}
pre.cmd{background:#0b1117;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:12px;overflow:auto;white-space:pre-wrap;word-break:break-all}
.links{display:flex;gap:12px;flex-wrap:wrap;font-size:13px;margin-top:8px}
table{border-collapse:collapse;width:100%;font-size:13.5px}
th,td{border-bottom:1px solid var(--line);padding:6px 8px;text-align:left;vertical-align:top}
th{color:var(--muted);font-weight:500}
.note{border-left:3px solid var(--warn);padding:8px 12px;background:#1d1a12;border-radius:0 8px 8px 0;margin:10px 0}
@media (max-width:700px){.parts{grid-template-columns:1fr}main{padding:12px}}
@media print{header.top,.links,pre.cmd{display:none!important}}
</style>
</head>
<body>
<header class="top"><span class="brand">航空母舰 · PartDesign 有头创建工具</span><span class="spacer"></span>
<a href="index.html">教学中心</a><a href="console.html">教学控制台</a><a href="cases/carrier.html">旧版案例</a></header>
<main>
<h1>在真实界面里造一艘航空母舰</h1>
<p class="lead">20 个 PartDesign 零件,210 个界面步骤,分 12 个系统;每件都在真实浏览器里从草图开始点出来,最后装配成整舰(20 个链接 + 19 个固定关节)。舰长 333 m、甲板高 24 m,全部零件共用同一套舰体坐标。</p>
<div class="card">
<h2 style="margin-top:0">先做三件事</h2>
<ol>
<li>构建前端:<code>cd web &amp;&amp; npx vite build</code>(改过 <code>web/src</code> 之后必做)。</li>
<li>检查环境:<code>node tools/carrier/create-part.mjs P01 --dry</code> —— 只看前置,不启动浏览器。</li>
<li>建第一个零件:下面任意一张卡片里的命令,或直接打开<a href="console.html">教学控制台</a>点「开始」。</li>
</ol>
<p class="small muted">有头运行需要图形环境(<code>DISPLAY=:1</code>)与 Chrome。每次运行约 5–10 分钟,重型特征(甲板倒角、舰体放样)计算较久,界面会显示「计算中…」,等它结束即可。报告落在 <code>docs/current/carrier-partdesign-toolkit/runs/</code>,截图落在 <code>web/tools/carrier-partdesign-course/ui-stills/</code>。</p>
</div>
<div class="note"><strong>判定怎么读:</strong>通过 = 每一步都点到、最终体积与构建记录一致;产品失败(exit 1)= 界面建出的体积不对或有步骤没完成;前置失败(exit 2)= dist/内核/Chrome/DISPLAY/步骤文件缺失,此时还没开始点,不算产品问题。</div>
<div class="note"><strong>零件在船上是什么样:</strong>每件都按舰体坐标建模(X 向舰首为 +,z=24 m 为飞行甲板面),所以单独打开是零件、装配后自动就位,插装位姿是单位矩阵。改一个零件的尺寸,装配结果跟着变——这正是教学里要讲的“零件与装配同源”。</div>
<section class="group" id="group-hull-structure">
<h2>舰体结构 <span class="muted small">1 件</span></h2>
<div class="parts"><article class="part" id="P01">
<div class="head"><h3>P01 · 舰体</h3><span class="pill">10 步</span></div>
<div class="meta"><code>CarrierHull</code> · 记录体积 260,847 mm³ · 特征 Loft</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierHull · 横剖面 x=-166.5</code></li><li><span class="kind">草图</span><code>CarrierHull · 横剖面 x=-150</code></li><li><span class="kind">草图</span><code>CarrierHull · 横剖面 x=-120</code></li><li><span class="kind">草图</span><code>CarrierHull · 横剖面 x=-60</code></li><li><span class="kind">草图</span><code>CarrierHull · 横剖面 x=0</code></li><li><span class="kind">草图</span><code>CarrierHull · 横剖面 x=60</code></li><li><span class="kind">草图</span><code>CarrierHull · 横剖面 x=110</code></li><li><span class="kind">草图</span><code>CarrierHull · 横剖面 x=145</code></li><li><span class="kind">草图</span><code>CarrierHull · 横剖面 x=166.5</code></li><li><span class="kind">特征</span><code>CarrierHull · 舰体放样</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P01</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article></div>
</section><section class="group" id="group-angled-deck">
<h2>斜角甲板 <span class="muted small">1 件</span></h2>
<div class="parts"><article class="part" id="P03">
<div class="head"><h3>P03 · 斜角甲板</h3><span class="pill">2 步</span></div>
<div class="meta"><code>CarrierAngledDeck</code> · 记录体积 6,912 mm³ · 特征 Pad</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierAngledDeck · 斜角甲板平面</code></li><li><span class="kind">特征</span><code>CarrierAngledDeck · 斜角甲板</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P03</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article></div>
</section><section class="group" id="group-flight-deck">
<h2>飞行甲板 <span class="muted small">1 件</span></h2>
<div class="parts"><article class="part" id="P02">
<div class="head"><h3>P02 · 飞行甲板</h3><span class="pill">14 步</span></div>
<div class="meta"><code>CarrierDeck</code> · 记录体积 35,733 mm³ · 特征 Pad、Pocket、Chamfer</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierDeck · 甲板平面</code></li><li><span class="kind">特征</span><code>CarrierDeck · 甲板板</code></li><li><span class="kind">草图</span><code>CarrierDeck · 升降机井口 (-20, 26)</code></li><li><span class="kind">特征</span><code>CarrierDeck · 切除井口 WellPocket1</code></li><li><span class="kind">草图</span><code>CarrierDeck · 升降机井口 (-20, -26)</code></li><li><span class="kind">特征</span><code>CarrierDeck · 切除井口 WellPocket2</code></li><li><span class="kind">草图</span><code>CarrierDeck · 升降机井口 (-62, 26)</code></li><li><span class="kind">特征</span><code>CarrierDeck · 切除井口 WellPocket3</code></li><li><span class="kind">草图</span><code>CarrierDeck · 升降机井口 (-62, -26)</code></li><li><span class="kind">特征</span><code>CarrierDeck · 切除井口 WellPocket4</code></li><li><span class="kind">修整</span><code>CarrierDeck · 井口边缘倒角</code></li><li><span class="kind">草图</span><code>CarrierDeck · 系留桩平面</code></li><li><span class="kind">特征</span><code>CarrierDeck · 系留桩</code></li><li><span class="kind">阵列/镜像</span><code>CarrierDeck · 系留桩阵列</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P02</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article></div>
</section><section class="group" id="group-island">
<h2>舰岛上层建筑 <span class="muted small">1 件</span></h2>
<div class="parts"><article class="part" id="P04">
<div class="head"><h3>P04 · 舰岛</h3><span class="pill">11 步</span></div>
<div class="meta"><code>CarrierIsland</code> · 记录体积 10,658 mm³ · 特征 Pad、Chamfer</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierIsland · IslandBase 平面 z=24</code></li><li><span class="kind">特征</span><code>CarrierIsland · 塔体 IslandBase</code></li><li><span class="kind">草图</span><code>CarrierIsland · IslandTower 平面 z=36</code></li><li><span class="kind">特征</span><code>CarrierIsland · 塔体 IslandTower</code></li><li><span class="kind">草图</span><code>CarrierIsland · IslandBridge 平面 z=46</code></li><li><span class="kind">特征</span><code>CarrierIsland · 塔体 IslandBridge</code></li><li><span class="kind">草图</span><code>CarrierIsland · 烟囱平面</code></li><li><span class="kind">特征</span><code>CarrierIsland · 烟囱</code></li><li><span class="kind">草图</span><code>CarrierIsland · 桅杆截面</code></li><li><span class="kind">特征</span><code>CarrierIsland · 桅杆</code></li><li><span class="kind">修整</span><code>CarrierIsland · 舰桥顶倒角</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P04</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article></div>
</section><section class="group" id="group-hangar">
<h2>机库 <span class="muted small">1 件</span></h2>
<div class="parts"><article class="part" id="P05">
<div class="head"><h3>P05 · 机库</h3><span class="pill">4 步</span></div>
<div class="meta"><code>CarrierHangar</code> · 记录体积 39,640 mm³ · 特征 Pad、Pocket</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierHangar · 机库外壳平面</code></li><li><span class="kind">特征</span><code>CarrierHangar · 机库外壳</code></li><li><span class="kind">草图</span><code>CarrierHangar · 机库内腔平面</code></li><li><span class="kind">特征</span><code>CarrierHangar · 掏空内腔</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P05</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article></div>
</section><section class="group" id="group-aircraft-handling">
<h2>航空保障(升降机/弹射器/拦阻索) <span class="muted small">3 件</span></h2>
<div class="parts"><article class="part" id="P06">
<div class="head"><h3>P06 · 升降机</h3><span class="pill">8 步</span></div>
<div class="meta"><code>CarrierElevators</code> · 记录体积 1,008 mm³ · 特征 Pad</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierElevators · 升降机平台 (-20, 26)</code></li><li><span class="kind">特征</span><code>CarrierElevators · 升降机平台</code></li><li><span class="kind">草图</span><code>CarrierElevators · 升降机平台 (-20, -26)</code></li><li><span class="kind">特征</span><code>CarrierElevators · 升降机平台</code></li><li><span class="kind">草图</span><code>CarrierElevators · 升降机平台 (-62, 26)</code></li><li><span class="kind">特征</span><code>CarrierElevators · 升降机平台</code></li><li><span class="kind">草图</span><code>CarrierElevators · 升降机平台 (-62, -26)</code></li><li><span class="kind">特征</span><code>CarrierElevators · 升降机平台</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P06</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article><article class="part" id="P07">
<div class="head"><h3>P07 · 弹射器</h3><span class="pill">8 步</span></div>
<div class="meta"><code>CarrierCatapults</code> · 记录体积 347 mm³ · 特征 Pad</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierCatapults · 弹射轨道 (118, 14)</code></li><li><span class="kind">特征</span><code>CarrierCatapults · 弹射轨道</code></li><li><span class="kind">草图</span><code>CarrierCatapults · 弹射轨道 (118, -14)</code></li><li><span class="kind">特征</span><code>CarrierCatapults · 弹射轨道</code></li><li><span class="kind">草图</span><code>CarrierCatapults · 弹射轨道 (8, 24)</code></li><li><span class="kind">特征</span><code>CarrierCatapults · 弹射轨道</code></li><li><span class="kind">草图</span><code>CarrierCatapults · 弹射轨道 (-30, -28)</code></li><li><span class="kind">特征</span><code>CarrierCatapults · 弹射轨道</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P07</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article><article class="part" id="P08">
<div class="head"><h3>P08 · 拦阻索</h3><span class="pill">8 步</span></div>
<div class="meta"><code>CarrierArrestorWires</code> · 记录体积 25 mm³ · 特征 Pad</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierArrestorWires · 拦阻索 x=-150</code></li><li><span class="kind">特征</span><code>CarrierArrestorWires · 拦阻索</code></li><li><span class="kind">草图</span><code>CarrierArrestorWires · 拦阻索 x=-144</code></li><li><span class="kind">特征</span><code>CarrierArrestorWires · 拦阻索</code></li><li><span class="kind">草图</span><code>CarrierArrestorWires · 拦阻索 x=-138</code></li><li><span class="kind">特征</span><code>CarrierArrestorWires · 拦阻索</code></li><li><span class="kind">草图</span><code>CarrierArrestorWires · 拦阻索 x=-132</code></li><li><span class="kind">特征</span><code>CarrierArrestorWires · 拦阻索</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P08</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article></div>
</section><section class="group" id="group-sensors">
<h2>雷达与传感 <span class="muted small">1 件</span></h2>
<div class="parts"><article class="part" id="P09">
<div class="head"><h3>P09 · 相控阵雷达</h3><span class="pill">6 步</span></div>
<div class="meta"><code>CarrierRadar</code> · 记录体积 69 mm³ · 特征 Pad</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierRadar · 雷达基座截面</code></li><li><span class="kind">特征</span><code>CarrierRadar · 雷达基座</code></li><li><span class="kind">草图</span><code>CarrierRadar · 阵面草图</code></li><li><span class="kind">特征</span><code>CarrierRadar · 相控阵面</code></li><li><span class="kind">草图</span><code>CarrierRadar · 阵面支架截面</code></li><li><span class="kind">特征</span><code>CarrierRadar · 阵面支架</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P09</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article></div>
</section><section class="group" id="group-weapons">
<h2>近防武器 <span class="muted small">1 件</span></h2>
<div class="parts"><article class="part" id="P10">
<div class="head"><h3>P10 · 近防炮</h3><span class="pill">8 步</span></div>
<div class="meta"><code>CarrierCiws</code> · 记录体积 56 mm³ · 特征 Pad</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierCiws · 炮座截面</code></li><li><span class="kind">特征</span><code>CarrierCiws · 炮座</code></li><li><span class="kind">草图</span><code>CarrierCiws · 炮塔壳体</code></li><li><span class="kind">特征</span><code>CarrierCiws · 炮塔壳体</code></li><li><span class="kind">草图</span><code>CarrierCiws · 炮管截面 y=-0.7</code></li><li><span class="kind">特征</span><code>CarrierCiws · 炮管</code></li><li><span class="kind">草图</span><code>CarrierCiws · 炮管截面 y=0.7</code></li><li><span class="kind">特征</span><code>CarrierCiws · 炮管</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P10</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article></div>
</section><section class="group" id="group-air-fighter">
<h2>舰载战斗机 <span class="muted small">6 件</span></h2>
<div class="parts"><article class="part" id="P11">
<div class="head"><h3>P11 · 舰载战斗机 A</h3><span class="pill">13 步</span></div>
<div class="meta"><code>CarrierFighterA</code> · 记录体积 83 mm³ · 特征 Revolution、Pad、Mirrored</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierFighterA · 机身半剖</code></li><li><span class="kind">特征</span><code>CarrierFighterA · 机身回转</code></li><li><span class="kind">草图</span><code>CarrierFighterA · 右机翼平面</code></li><li><span class="kind">特征</span><code>CarrierFighterA · 右机翼</code></li><li><span class="kind">阵列/镜像</span><code>CarrierFighterA · 左机翼镜像</code></li><li><span class="kind">草图</span><code>CarrierFighterA · 平尾平面</code></li><li><span class="kind">特征</span><code>CarrierFighterA · 平尾</code></li><li><span class="kind">阵列/镜像</span><code>CarrierFighterA · 平尾镜像</code></li><li><span class="kind">草图</span><code>CarrierFighterA · 垂尾平面</code></li><li><span class="kind">特征</span><code>CarrierFighterA · 垂尾</code></li><li><span class="kind">图元</span><code>CarrierFighterA · 座舱盖</code></li><li><span class="kind">草图</span><code>CarrierFighterA · 尾喷口截面</code></li><li><span class="kind">特征</span><code>CarrierFighterA · 尾喷口</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P11</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article><article class="part" id="P12">
<div class="head"><h3>P12 · 舰载战斗机 B</h3><span class="pill">13 步</span></div>
<div class="meta"><code>CarrierFighterB</code> · 记录体积 88 mm³ · 特征 Revolution、Pad、Mirrored</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierFighterB · 机身半剖</code></li><li><span class="kind">特征</span><code>CarrierFighterB · 机身回转</code></li><li><span class="kind">草图</span><code>CarrierFighterB · 右机翼平面</code></li><li><span class="kind">特征</span><code>CarrierFighterB · 右机翼</code></li><li><span class="kind">阵列/镜像</span><code>CarrierFighterB · 左机翼镜像</code></li><li><span class="kind">草图</span><code>CarrierFighterB · 平尾平面</code></li><li><span class="kind">特征</span><code>CarrierFighterB · 平尾</code></li><li><span class="kind">阵列/镜像</span><code>CarrierFighterB · 平尾镜像</code></li><li><span class="kind">草图</span><code>CarrierFighterB · 垂尾平面</code></li><li><span class="kind">特征</span><code>CarrierFighterB · 垂尾</code></li><li><span class="kind">图元</span><code>CarrierFighterB · 座舱盖</code></li><li><span class="kind">草图</span><code>CarrierFighterB · 尾喷口截面</code></li><li><span class="kind">特征</span><code>CarrierFighterB · 尾喷口</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P12</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article><article class="part" id="P13">
<div class="head"><h3>P13 · 舰载战斗机 C</h3><span class="pill">13 步</span></div>
<div class="meta"><code>CarrierFighterC</code> · 记录体积 74 mm³ · 特征 Revolution、Pad、Mirrored</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierFighterC · 机身半剖</code></li><li><span class="kind">特征</span><code>CarrierFighterC · 机身回转</code></li><li><span class="kind">草图</span><code>CarrierFighterC · 右机翼平面</code></li><li><span class="kind">特征</span><code>CarrierFighterC · 右机翼</code></li><li><span class="kind">阵列/镜像</span><code>CarrierFighterC · 左机翼镜像</code></li><li><span class="kind">草图</span><code>CarrierFighterC · 平尾平面</code></li><li><span class="kind">特征</span><code>CarrierFighterC · 平尾</code></li><li><span class="kind">阵列/镜像</span><code>CarrierFighterC · 平尾镜像</code></li><li><span class="kind">草图</span><code>CarrierFighterC · 垂尾平面</code></li><li><span class="kind">特征</span><code>CarrierFighterC · 垂尾</code></li><li><span class="kind">图元</span><code>CarrierFighterC · 座舱盖</code></li><li><span class="kind">草图</span><code>CarrierFighterC · 尾喷口截面</code></li><li><span class="kind">特征</span><code>CarrierFighterC · 尾喷口</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P13</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article><article class="part" id="P14">
<div class="head"><h3>P14 · 舰载战斗机 D</h3><span class="pill">13 步</span></div>
<div class="meta"><code>CarrierFighterD</code> · 记录体积 92 mm³ · 特征 Revolution、Pad、Mirrored</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierFighterD · 机身半剖</code></li><li><span class="kind">特征</span><code>CarrierFighterD · 机身回转</code></li><li><span class="kind">草图</span><code>CarrierFighterD · 右机翼平面</code></li><li><span class="kind">特征</span><code>CarrierFighterD · 右机翼</code></li><li><span class="kind">阵列/镜像</span><code>CarrierFighterD · 左机翼镜像</code></li><li><span class="kind">草图</span><code>CarrierFighterD · 平尾平面</code></li><li><span class="kind">特征</span><code>CarrierFighterD · 平尾</code></li><li><span class="kind">阵列/镜像</span><code>CarrierFighterD · 平尾镜像</code></li><li><span class="kind">草图</span><code>CarrierFighterD · 垂尾平面</code></li><li><span class="kind">特征</span><code>CarrierFighterD · 垂尾</code></li><li><span class="kind">图元</span><code>CarrierFighterD · 座舱盖</code></li><li><span class="kind">草图</span><code>CarrierFighterD · 尾喷口截面</code></li><li><span class="kind">特征</span><code>CarrierFighterD · 尾喷口</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P14</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article><article class="part" id="P15">
<div class="head"><h3>P15 · 舰载战斗机 E</h3><span class="pill">13 步</span></div>
<div class="meta"><code>CarrierFighterE</code> · 记录体积 79 mm³ · 特征 Revolution、Pad、Mirrored</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierFighterE · 机身半剖</code></li><li><span class="kind">特征</span><code>CarrierFighterE · 机身回转</code></li><li><span class="kind">草图</span><code>CarrierFighterE · 右机翼平面</code></li><li><span class="kind">特征</span><code>CarrierFighterE · 右机翼</code></li><li><span class="kind">阵列/镜像</span><code>CarrierFighterE · 左机翼镜像</code></li><li><span class="kind">草图</span><code>CarrierFighterE · 平尾平面</code></li><li><span class="kind">特征</span><code>CarrierFighterE · 平尾</code></li><li><span class="kind">阵列/镜像</span><code>CarrierFighterE · 平尾镜像</code></li><li><span class="kind">草图</span><code>CarrierFighterE · 垂尾平面</code></li><li><span class="kind">特征</span><code>CarrierFighterE · 垂尾</code></li><li><span class="kind">图元</span><code>CarrierFighterE · 座舱盖</code></li><li><span class="kind">草图</span><code>CarrierFighterE · 尾喷口截面</code></li><li><span class="kind">特征</span><code>CarrierFighterE · 尾喷口</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P15</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article><article class="part" id="P16">
<div class="head"><h3>P16 · 舰载战斗机 F</h3><span class="pill">13 步</span></div>
<div class="meta"><code>CarrierFighterF</code> · 记录体积 85 mm³ · 特征 Revolution、Pad、Mirrored</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierFighterF · 机身半剖</code></li><li><span class="kind">特征</span><code>CarrierFighterF · 机身回转</code></li><li><span class="kind">草图</span><code>CarrierFighterF · 右机翼平面</code></li><li><span class="kind">特征</span><code>CarrierFighterF · 右机翼</code></li><li><span class="kind">阵列/镜像</span><code>CarrierFighterF · 左机翼镜像</code></li><li><span class="kind">草图</span><code>CarrierFighterF · 平尾平面</code></li><li><span class="kind">特征</span><code>CarrierFighterF · 平尾</code></li><li><span class="kind">阵列/镜像</span><code>CarrierFighterF · 平尾镜像</code></li><li><span class="kind">草图</span><code>CarrierFighterF · 垂尾平面</code></li><li><span class="kind">特征</span><code>CarrierFighterF · 垂尾</code></li><li><span class="kind">图元</span><code>CarrierFighterF · 座舱盖</code></li><li><span class="kind">草图</span><code>CarrierFighterF · 尾喷口截面</code></li><li><span class="kind">特征</span><code>CarrierFighterF · 尾喷口</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P16</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article></div>
</section><section class="group" id="group-air-awacs">
<h2>舰载预警机 <span class="muted small">1 件</span></h2>
<div class="parts"><article class="part" id="P17">
<div class="head"><h3>P17 · 舰载预警机</h3><span class="pill">21 步</span></div>
<div class="meta"><code>CarrierAwacs</code> · 记录体积 255 mm³ · 特征 Revolution、Pad、Mirrored</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierAwacs · 机身半剖</code></li><li><span class="kind">特征</span><code>CarrierAwacs · 机身回转</code></li><li><span class="kind">草图</span><code>CarrierAwacs · 右机翼平面</code></li><li><span class="kind">特征</span><code>CarrierAwacs · 右机翼</code></li><li><span class="kind">阵列/镜像</span><code>CarrierAwacs · 左机翼镜像</code></li><li><span class="kind">草图</span><code>CarrierAwacs · 桨舱截面 y=4.2</code></li><li><span class="kind">特征</span><code>CarrierAwacs · 桨舱</code></li><li><span class="kind">草图</span><code>CarrierAwacs · 桨舱截面 y=8.6</code></li><li><span class="kind">特征</span><code>CarrierAwacs · 桨舱</code></li><li><span class="kind">阵列/镜像</span><code>CarrierAwacs · 桨舱镜像</code></li><li><span class="kind">草图</span><code>CarrierAwacs · 平尾平面</code></li><li><span class="kind">特征</span><code>CarrierAwacs · 平尾</code></li><li><span class="kind">阵列/镜像</span><code>CarrierAwacs · 平尾镜像</code></li><li><span class="kind">草图</span><code>CarrierAwacs · 垂尾平面</code></li><li><span class="kind">特征</span><code>CarrierAwacs · 垂尾</code></li><li><span class="kind">草图</span><code>CarrierAwacs · 旋罩支柱截面 x=-2.4</code></li><li><span class="kind">特征</span><code>CarrierAwacs · 旋罩支柱</code></li><li><span class="kind">草图</span><code>CarrierAwacs · 旋罩支柱截面 x=2.4</code></li><li><span class="kind">特征</span><code>CarrierAwacs · 旋罩支柱</code></li><li><span class="kind">草图</span><code>CarrierAwacs · 旋罩截面</code></li><li><span class="kind">特征</span><code>CarrierAwacs · 雷达旋罩</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P17</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article></div>
</section><section class="group" id="group-air-rotor">
<h2>舰载直升机 <span class="muted small">2 件</span></h2>
<div class="parts"><article class="part" id="P18">
<div class="head"><h3>P18 · 舰载直升机 A</h3><span class="pill">13 步</span></div>
<div class="meta"><code>CarrierHelicopterA</code> · 记录体积 48 mm³ · 特征 Revolution、Pad、PolarPattern</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierHelicopterA · 机身半剖</code></li><li><span class="kind">特征</span><code>CarrierHelicopterA · 机身回转</code></li><li><span class="kind">草图</span><code>CarrierHelicopterA · 尾梁截面</code></li><li><span class="kind">特征</span><code>CarrierHelicopterA · 尾梁</code></li><li><span class="kind">草图</span><code>CarrierHelicopterA · 尾鳍平面</code></li><li><span class="kind">特征</span><code>CarrierHelicopterA · 尾鳍</code></li><li><span class="kind">草图</span><code>CarrierHelicopterA · 尾桨截面</code></li><li><span class="kind">特征</span><code>CarrierHelicopterA · 尾桨</code></li><li><span class="kind">草图</span><code>CarrierHelicopterA · 旋翼轴截面</code></li><li><span class="kind">特征</span><code>CarrierHelicopterA · 旋翼轴</code></li><li><span class="kind">草图</span><code>CarrierHelicopterA · 主旋翼叶片</code></li><li><span class="kind">特征</span><code>CarrierHelicopterA · 主旋翼叶片</code></li><li><span class="kind">阵列/镜像</span><code>CarrierHelicopterA · 四叶旋翼</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P18</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article><article class="part" id="P19">
<div class="head"><h3>P19 · 舰载直升机 B</h3><span class="pill">13 步</span></div>
<div class="meta"><code>CarrierHelicopterB</code> · 记录体积 48 mm³ · 特征 Revolution、Pad、PolarPattern</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierHelicopterB · 机身半剖</code></li><li><span class="kind">特征</span><code>CarrierHelicopterB · 机身回转</code></li><li><span class="kind">草图</span><code>CarrierHelicopterB · 尾梁截面</code></li><li><span class="kind">特征</span><code>CarrierHelicopterB · 尾梁</code></li><li><span class="kind">草图</span><code>CarrierHelicopterB · 尾鳍平面</code></li><li><span class="kind">特征</span><code>CarrierHelicopterB · 尾鳍</code></li><li><span class="kind">草图</span><code>CarrierHelicopterB · 尾桨截面</code></li><li><span class="kind">特征</span><code>CarrierHelicopterB · 尾桨</code></li><li><span class="kind">草图</span><code>CarrierHelicopterB · 旋翼轴截面</code></li><li><span class="kind">特征</span><code>CarrierHelicopterB · 旋翼轴</code></li><li><span class="kind">草图</span><code>CarrierHelicopterB · 主旋翼叶片</code></li><li><span class="kind">特征</span><code>CarrierHelicopterB · 主旋翼叶片</code></li><li><span class="kind">阵列/镜像</span><code>CarrierHelicopterB · 四叶旋翼</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P19</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article></div>
</section><section class="group" id="group-markings">
<h2>甲板标线 <span class="muted small">1 件</span></h2>
<div class="parts"><article class="part" id="P20">
<div class="head"><h3>P20 · 甲板标线</h3><span class="pill">6 步</span></div>
<div class="meta"><code>CarrierMarkings</code> · 记录体积 26 mm³ · 特征 Pad</div>
<ol class="steps"><li><span class="kind">草图</span><code>CarrierMarkings · 甲板中心线</code></li><li><span class="kind">特征</span><code>CarrierMarkings · 中心线</code></li><li><span class="kind">草图</span><code>CarrierMarkings · 降落区边框</code></li><li><span class="kind">特征</span><code>CarrierMarkings · 降落区边框</code></li><li><span class="kind">草图</span><code>CarrierMarkings · 甲板边缘线</code></li><li><span class="kind">特征</span><code>CarrierMarkings · 甲板边缘线</code></li></ol>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-part.mjs P20</pre>
<div class="links">
<a href="console.html">在教学控制台运行</a>
<a href="cases/carrier.html">旧版案例(Part 工作台对照)</a>
</div>
</article></div>
</section>
<section class="group" id="assembly">
<h2>装配 <span class="muted small">1 艘</span></h2>
<article class="part">
<div class="head"><h3>CarrierAssembly · 20 件合成整舰</h3><span class="pill">20 插入 / 19 关节</span></div>
<div class="meta">新建装配文档「航空母舰」,逐个装载并插入 20 个零件链接,接地舰体,其余 19 件各建一个固定关节,最后求解并列出 BOM。</div>
<pre class="cmd">cd "/media/mes123456/Elements SE/WebFreeCAD/FreeCADWasmDev/working/FreeCAD" &amp;&amp; DISPLAY=:1 node tools/carrier/create-assembly.mjs</pre>
<div class="links"><a href="console.html">在教学控制台运行</a><a href="cases/carrier.html">旧版案例(Part 工作台 20 件)</a></div>
</article>
</section>
<section class="group" id="tools">
<h2>这套工具本身</h2>
<table>
<thead><tr><th>命令</th><th>作用</th></tr></thead>
<tbody>
<tr><td><code>node tools/carrier/list.mjs</code></td><td>列出 20 个零件、系统分组、步数与记录体积</td></tr>
<tr><td><code>node tools/carrier/create-part.mjs P02</code></td><td>有头重建一个零件(P 编号或 Document 名都行)</td></tr>
<tr><td><code>node tools/carrier/create-part.mjs P02 --dry</code></td><td>只做前置检查,不启动浏览器</td></tr>
<tr><td><code>node tools/carrier/create-part.mjs P02 --slow</code></td><td>放慢点击,适合边看边学</td></tr>
<tr><td><code>node tools/carrier/create-all.mjs --group air-fighter</code></td><td>按系统串行重建</td></tr>
<tr><td><code>node tools/carrier/create-all.mjs --all --keep-going</code></td><td>全部 20 件,出错继续</td></tr>
<tr><td><code>node tools/carrier/create-assembly.mjs --dry</code></td><td>装配前置检查(清单、回放、源文档、引擎)</td></tr>
<tr><td><code>node tools/carrier/create-assembly.mjs</code></td><td>真实界面装配整舰</td></tr>
<tr><td><code>node tools/carrier/self-test.mjs</code></td><td>无浏览器自测(目录、分组、参数校验、前置)</td></tr>
</tbody>
</table>
<p class="small muted">工具只做编排与前置检查;每一步的点击由共享引擎 <code>web/tools/cad-ui-rebuild/</code> 执行,构建记录来自 <code>web/teaching/cases/carrier-partdesign/out/replay/</code>,界面步骤来自 <code>web/tools/carrier-partdesign-course/out/ui-steps/</code>,装配清单来自 <code>assembly-spec.json</code>。文档一律写 OPFS,只有显式「下载」才落到本地。</p>
</section>
<section class="group" id="troubleshooting">
<h2>常见问题</h2>
<table>
<thead><tr><th>现象</th><th>原因与处理</th></tr></thead>
<tbody>
<tr><td>退出码 2,日志里有「前置缺失」</td><td>dist、内核产物、Chrome、DISPLAY 或步骤文件缺失。照提示修,或用 <code>--dry</code> 看全部检查项。</td></tr>
<tr><td>退出码 1,体积不一致</td><td>界面建出的几何与构建记录不同,是产品回归;报告里给出两边体积与相对误差。</td></tr>
<tr><td>某一步停住不动</td><td>重型特征(甲板倒角、舰体放样)计算可达数十秒,状态栏显示「计算中…」。工具会等树里出现新对象再继续,不要手动刷新。</td></tr>
<tr><td>看不到浏览器窗口</td><td>有头需要可用的 X 显示;在带图形界面的会话里用 <code>DISPLAY=:1</code> 启动。</td></tr>
<tr><td>页面打开是空白/旧版本</td><td>先 <code>cd web &amp;&amp; npx vite build</code>,工具会自动为构建好的 dist 起临时服务。</td></tr>
<tr><td>装配插入失败,提示源文档缺失</td><td>先跑完对应零件(<code>create-part</code>),把 <code>out/FCStd/&lt;Document&gt;.FCStd</code> 准备好;<code>create-assembly --dry</code> 会列出缺哪几份。</td></tr>
</tbody>
</table>
</section>
<p class="small muted" style="margin:26px 0 40px">本页由 <code>web/tools/teaching-console/build-carrier-page.mjs</code> 生成,请勿手改。</p>
</main>
</body>
</html>

View File

@@ -0,0 +1,425 @@
{
"schema": "freecad-web/carrier-toolkit/assembly-spec/v1",
"document": "CarrierAssembly",
"label": "航空母舰",
"groundDocument": "CarrierHull",
"note": "零件在各自文档里已按舰体坐标建模,插入用单位位姿;每个非接地零件用一个固定关节锚到父件(20 件 − 1 接地 = 19 个关节),避免出现悬空组件。",
"inserts": [
{
"sourceDocument": "CarrierHull",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierDeck",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierAngledDeck",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierIsland",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierHangar",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierElevators",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierCatapults",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierArrestorWires",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierRadar",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierCiws",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierFighterA",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierFighterB",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierFighterC",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierFighterD",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierFighterE",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierFighterF",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierAwacs",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierHelicopterA",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierHelicopterB",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
},
{
"sourceDocument": "CarrierMarkings",
"sourceObject": "Body",
"position": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
]
}
],
"joints": [
{
"type": "Fixed",
"label": "飞行甲板 / 舰体",
"a": "CarrierDeck",
"b": "CarrierHull"
},
{
"type": "Fixed",
"label": "斜角甲板 / 飞行甲板",
"a": "CarrierAngledDeck",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "舰岛 / 飞行甲板",
"a": "CarrierIsland",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "机库 / 舰体",
"a": "CarrierHangar",
"b": "CarrierHull"
},
{
"type": "Fixed",
"label": "升降机 / 飞行甲板",
"a": "CarrierElevators",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "弹射器 / 飞行甲板",
"a": "CarrierCatapults",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "拦阻索 / 飞行甲板",
"a": "CarrierArrestorWires",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "相控阵雷达 / 舰岛",
"a": "CarrierRadar",
"b": "CarrierIsland"
},
{
"type": "Fixed",
"label": "近防炮 / 飞行甲板",
"a": "CarrierCiws",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "舰载战斗机 A / 飞行甲板",
"a": "CarrierFighterA",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "舰载战斗机 B / 飞行甲板",
"a": "CarrierFighterB",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "舰载战斗机 C / 飞行甲板",
"a": "CarrierFighterC",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "舰载战斗机 D / 飞行甲板",
"a": "CarrierFighterD",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "舰载战斗机 E / 飞行甲板",
"a": "CarrierFighterE",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "舰载战斗机 F / 飞行甲板",
"a": "CarrierFighterF",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "舰载预警机 / 飞行甲板",
"a": "CarrierAwacs",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "舰载直升机 A / 飞行甲板",
"a": "CarrierHelicopterA",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "舰载直升机 B / 飞行甲板",
"a": "CarrierHelicopterB",
"b": "CarrierDeck"
},
{
"type": "Fixed",
"label": "甲板标线 / 飞行甲板",
"a": "CarrierMarkings",
"b": "CarrierDeck"
}
]
}

View File

@@ -0,0 +1,110 @@
#!/usr/bin/env node
/**
* Purpose: 由 assembly-spec.json 生成装配回放 out/replay/CarrierAssembly.json。
*
* 回放只记录“界面上做了什么、按什么参数做”:创建装配、打开 20 份源文档、
* 逐个插入链接、接地、求解、每个非接地零件一个固定关节、再求解、列 BOM。
* 组装脚本 web/tools/cad-ui-rebuild/assemble.mjs 直接读这份文件执行,
* 不在这里启动浏览器。
*
* 组件名由插入顺序决定:Component、Component001 …(与 FreeCAD 一致),
* 关节的 selection / references 全部引用这些名字。
*
* Usage: node build-assembly-replay.mjs [--dry]
* Output: out/replay/<document>.json(schema freecad-web-process-replay/v1, kind assembly)
*/
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
const here = path.dirname(fileURLToPath(import.meta.url));
const specFile = path.join(here, "assembly-spec.json");
const spec = JSON.parse(fs.readFileSync(specFile, "utf8"));
const ASSEMBLY = "Assembly";
const dry = process.argv.includes("--dry");
const componentName = index => (index === 0 ? "Component" : `Component${String(index).padStart(3, "0")}`);
const componentOf = new Map(spec.inserts.map((insert, index) => [insert.sourceDocument, componentName(index)]));
const steps = [];
const push = (action, label, args, extra = {}) => steps.push({ step: steps.length + 1, label, action, seconds: 0, args, ...extra });
push("assembly.createRecompute", "create assembly", {
schema: "freecad-web-assembly/create-recompute/v1",
documentName: spec.document,
objectName: ASSEMBLY,
objectType: "Assembly::AssemblyObject",
label: spec.label,
});
push("Assembly_InsertLink", "open sources", {
documentId: spec.document, assembly: ASSEMBLY, action: "open",
files: spec.inserts.map(insert => ({ fileName: `${insert.sourceDocument}.FCStd` })),
});
for (const [index, insert] of spec.inserts.entries()) {
push("Assembly_InsertLink", `insert ${index + 1}/${spec.inserts.length} ${insert.sourceDocument}`, {
documentId: spec.document, assembly: ASSEMBLY, action: "insert",
sourceDocument: insert.sourceDocument, sourceObject: insert.sourceObject,
position: insert.position, rotation: insert.rotation, rigid: true,
}, { insert: { ...insert } });
}
push("Assembly_InsertLink", "accept insertion", {
documentId: spec.document, assembly: ASSEMBLY, action: "accept", selection: [],
});
push("Assembly_ToggleGrounded", `ground ${spec.groundDocument}`, {
documentId: spec.document, assembly: ASSEMBLY, action: "accept",
selection: [{ documentId: spec.document, object: ASSEMBLY, subelements: [componentOf.get(spec.groundDocument)] }],
});
const solve = label => ({
documentId: spec.document, assembly: ASSEMBLY, action: "accept", selection: [],
});
push("Assembly_SolveAssembly", "solve at zero pose", solve("solve at zero pose"));
for (const joint of spec.joints) {
const a = componentOf.get(joint.a);
const b = componentOf.get(joint.b);
if (!a || !b) throw new Error(`joint ${joint.label} names a part that is not inserted: ${joint.a} / ${joint.b}`);
push(`Assembly_CreateJoint${joint.type ?? "Fixed"}`, `joint ${joint.label}`, {
documentId: spec.document, assembly: ASSEMBLY, action: "accept", label: joint.label,
preservePose: true,
selection: [{ documentId: spec.document, object: a }, { documentId: spec.document, object: b }],
references: [
{ documentId: spec.document, object: ASSEMBLY, subelements: [a] },
{ documentId: spec.document, object: ASSEMBLY, subelements: [b] },
],
});
}
push("Assembly_SolveAssembly", "solve", solve("solve"));
push("Assembly_CreateBom", "list BOM", { documentId: spec.document, assembly: ASSEMBLY, action: "list" });
const replay = {
schema: "freecad-web-process-replay/v1",
kind: "assembly",
document: spec.document,
assembly: "build-assembly-replay.mjs",
generatedAt: new Date().toISOString(),
totals: { seconds: 0 },
steps,
};
if (dry) {
console.log(JSON.stringify({
document: spec.document,
inserts: spec.inserts.length,
joints: spec.joints.length,
solves: steps.filter(step => step.action === "Assembly_SolveAssembly").length,
steps: steps.length,
}, null, 2));
process.exit(0);
}
const outFile = path.join(here, "out", "replay", `${spec.document}.json`);
fs.mkdirSync(path.dirname(outFile), { recursive: true });
fs.writeFileSync(outFile, `${JSON.stringify(replay, null, 2)}\n`);
console.log(JSON.stringify({ output: path.relative(process.cwd(), outFile), steps: steps.length,
inserts: spec.inserts.length, joints: spec.joints.length }, null, 2));

View File

@@ -0,0 +1,90 @@
#!/usr/bin/env node
// 航空母舰 PartDesign 建件入口。
//
// node web/teaching/cases/carrier-partdesign/build.mjs # 全部 20 件
// node web/teaching/cases/carrier-partdesign/build.mjs P02 # 单件(id 或 Document)
// node web/teaching/cases/carrier-partdesign/build.mjs Deck --dry # 只看摘要
// node web/teaching/cases/carrier-partdesign/build.mjs --subset # P01..P10 舰体部分
//
// Each document is written to out/FCStd/<Document>.FCStd (OPFS mirror first,
// then an evidence copy) and out/traces/<Document>.json. The replay stage reads
// only the trace, so a failed builder leaves a trace you can inspect instead of
// an empty out/replay entry.
import path from "node:path";
import fs from "node:fs";
import { fileURLToPath } from "node:url";
import { parts, partFor } from "./parts/index.mjs";
import { buildDocument, caseDir, outDir, useCaseOpfs } from "./lib/build.mjs";
const argv = process.argv.slice(2);
const flags = new Set(argv.filter(arg => arg.startsWith("--")));
const selectors = argv.filter(arg => !arg.startsWith("--"));
const SHIP = ["P01", "P02", "P03", "P04", "P05", "P06", "P07", "P08", "P09", "P10"];
function selected() {
if (selectors.length === 0) return flags.has("--subset") ? parts.filter(part => SHIP.includes(part.id)) : parts;
const found = selectors.map(key => {
const part = partFor(key) ?? parts.find(item => item.document.toLowerCase() === key.toLowerCase());
if (!part) {
console.error(`未知零件 ${key};可选:${parts.map(item => `${item.id} ${item.document}`).join(", ")}`);
process.exit(2);
}
return part;
});
return found;
}
function specIndex() {
const file = path.join(caseDir, "spec.json");
if (!fs.existsSync(file)) return new Map();
const spec = JSON.parse(fs.readFileSync(file, "utf8"));
return new Map(spec.parts.map(part => [part.document, part]));
}
async function main() {
useCaseOpfs();
const queue = selected();
const spec = specIndex();
const indexFile = path.join(outDir, "index.json");
const previous = fs.existsSync(indexFile) ? JSON.parse(fs.readFileSync(indexFile, "utf8")) : { documents: {} };
const results = [];
let failed = 0;
for (const part of queue) {
const entry = spec.get(part.document) ?? {};
process.stdout.write(`▶ ${part.id} ${part.document} ${entry.title ?? ""}\n`);
try {
const summary = await buildDocument(part, { dry: flags.has("--dry") });
const volume = Number(summary.volume);
console.log(
` ✓ ${summary.steps} 步 · ${summary.seconds}s · 体积 ${Number.isFinite(volume) ? `${volume.toFixed(3)} m³` : "n/a"} · ${summary.fcstd}`,
);
results.push({ id: part.id, title: entry.title ?? null, system: entry.system ?? null, ...summary });
previous.documents[part.document] = {
id: part.id, title: entry.title ?? null, system: entry.system ?? null,
steps: summary.steps, volume: summary.volume, bounds: summary.bounds,
seconds: summary.seconds, fcstd: summary.fcstd, builtAt: new Date().toISOString(),
};
} catch (error) {
failed += 1;
console.error(` ✗ ${part.document}: ${error?.message ?? error}`);
if (!flags.has("--dry")) console.error(error?.stack ?? "");
}
}
fs.mkdirSync(outDir, { recursive: true });
fs.writeFileSync(indexFile, `${JSON.stringify({
schema: "freecad-web-carrier-partdesign-index/v1",
generatedAt: new Date().toISOString(),
documents: previous.documents,
}, null, 2)}\n`);
const built = results.length;
console.log(`\n${built}/${queue.length} 件完成${failed ? `,${failed} 件失败` : ""};索引 ${path.relative(caseDir, indexFile)}`);
if (flags.has("--dry")) console.log(JSON.stringify(results.map(item => ({ id: item.id, volume: item.volume, steps: item.steps }))));
process.exit(failed ? 1 : 0);
}
main().catch(error => {
console.error(error?.stack ?? error);
process.exit(1);
});
void fileURLToPath;

View File

@@ -0,0 +1,132 @@
// One recorded PartDesign build session for a carrier part.
//
// Every builder call goes through `part.timed()`, which is what makes the build
// replayable: the trace carries the exact kernel action, its arguments and the
// document listing after the call (tools/fcweb/kernel.mjs:188). The replay
// generator then derives one volume/mesh record per step from those listings.
//
// Object names are chosen by the builder (HullSketch1, HullLoft …) so the
// feature tree reads like a drawing, not like Sketch001. The UI renames on
// rebuild; web/tools/cad-ui-rebuild/drive.mjs maps the recorded names onto the
// names the workspace actually created.
import path from "node:path";
import fs from "node:fs";
import { fileURLToPath } from "node:url";
import { openPartDesign } from "../../../../../tools/fcweb/partdesign.mjs";
import { configureOpfs, readExportFile } from "../../../../../tools/fcweb/opfs.mjs";
const here = path.dirname(fileURLToPath(import.meta.url));
export const caseDir = path.resolve(here, "..");
export const outDir = path.join(caseDir, "out");
/** Point the shared OPFS mirror at this case's out/, per the OPFS contract. */
export function useCaseOpfs() {
return configureOpfs({ root: path.join(outDir, "opfs", "freecad-exports") });
}
export class Build {
constructor(part, { document, builder }) {
this.part = part;
this.document = document;
this.builder = builder ?? null;
this.counters = new Map();
this.steps = [];
}
/** Next name with an increasing suffix: `name("Sketch")` -> Sketch3. */
name(prefix) {
const next = (this.counters.get(prefix) ?? 0) + 1;
this.counters.set(prefix, next);
return `${prefix}${next}`;
}
record(object, label, action, args) {
const result = this.part.timed(`${this.document} · ${label}`, action, { object, body: "Body", ...args });
this.steps.push({ object, label, action, args });
return result;
}
/** Rectangle / Circle / Wire / Geometry sketch. `args` are setSketch fields. */
sketch(object, { profileType = "Rectangle", parameters, position, placementRotation, points, geometries, constraints }, label) {
this.stepsByName ??= new Map();
const args = { profileType };
if (parameters) args.parameters = parameters;
if (position) args.position = position;
if (placementRotation) args.placementRotation = placementRotation;
if (points) args.points = points;
if (geometries) args.geometries = geometries;
if (constraints) args.constraints = constraints;
return this.record(object, label ?? `草图 ${object}`, "setSketch", args);
}
/** Pad / Pocket / Revolution / Groove / Hole / Loft / Pipe (+ subtractive twins). */
feature(object, { featureType = "Pad", profile, length, angle, axis, depth, depthType, midplane, reversed, sections, ruled, closed, spine, pipeMode, transition }, label) {
const args = { featureType, profile };
for (const [key, value] of Object.entries({ length, angle, axis, depth, depthType, midplane, reversed, sections, ruled, closed, spine, pipeMode, transition })) {
if (value !== undefined) args[key] = value;
}
return this.record(object, label ?? `${featureType} ${object}`, "setFeature", args);
}
transform(object, { transformType, originals, direction, mirrorPlane, rotationAxis, length, angle, occurrences, reversed }, label) {
const args = { transformType, originals };
for (const [key, value] of Object.entries({ direction, mirrorPlane, rotationAxis, length, angle, occurrences, reversed })) {
if (value !== undefined) args[key] = value;
}
return this.record(object, label ?? `${transformType} ${object}`, "setTransform", args);
}
dressUp(object, { dressUpType, base, size, edges, useAllEdges, chamferType, size2, angle, flipDirection }, label) {
const args = { dressUpType, base };
for (const [key, value] of Object.entries({ size, edges, useAllEdges, chamferType, size2, angle, flipDirection })) {
if (value !== undefined) args[key] = value;
}
return this.record(object, label ?? `${dressUpType} ${object}`, "setDressUp", args);
}
primitive(object, { primitiveType, parameters, position }, label) {
return this.record(object, label ?? `${primitiveType} ${object}`, "setPrimitive", { primitiveType, parameters, position });
}
}
/**
* Build one document end to end and persist the three artefacts that the rest
* of the toolkit consumes: FCStd (OPFS mirror + evidence copy), trace JSON and,
* indirectly through the trace, the replay.
*/
export async function buildDocument(module, options = {}) {
const { document, builder, build } = module;
const part = await openPartDesign(document, { builder });
const session = new Build(part, { document, builder });
const started = Date.now();
try {
await build(session);
configureOpfs({ root: path.join(outDir, "opfs", "freecad-exports") });
const saved = part.saveDocument();
const bytes = readExportFile(saved.name);
const fcstdDir = path.join(outDir, "FCStd");
fs.mkdirSync(fcstdDir, { recursive: true });
fs.writeFileSync(path.join(fcstdDir, saved.name), bytes);
const traceDir = path.join(outDir, "traces");
fs.mkdirSync(traceDir, { recursive: true });
const trace = part.trace();
fs.writeFileSync(path.join(traceDir, `${document}.json`), `${JSON.stringify(trace, null, 2)}\n`);
const objects = part.snapshot().objects ?? [];
const body = objects.find(object => object.type === "PartDesign::Body");
// The kernel snapshot exposes volume/faceCount/edgeCount per object but no
// bounding box, so replay checks compare those three numbers (plus the step
// list) rather than a bbox.
const summary = {
document, builder, steps: session.steps.length,
volume: body?.volume ?? null,
faceCount: body?.faceCount ?? null,
edgeCount: body?.edgeCount ?? null,
seconds: Number(((Date.now() - started) / 1000).toFixed(2)),
fcstd: path.relative(caseDir, path.join(fcstdDir, saved.name)),
};
if (options.dry) console.log(JSON.stringify(summary));
return summary;
} finally {
part.dispose?.();
}
}

View File

@@ -0,0 +1,132 @@
// Sketch geometry helpers for the carrier PartDesign parts.
//
// The kernel's `setSketch` accepts three authored profile types: Rectangle and
// Circle carry named dimensions, and `Geometry` carries an explicit
// geometry list plus a constraint list (PartDesignDocumentWorkflow.cpp:2302).
// Only the Geometry form can describe a hull section or a wing planform, and a
// Geometry wire is closed ONLY when consecutive edges are joined by Coincident
// constraints -- the kernel runs the solver and then hands the wire to
// Pad/Loft, which rejects an open profile. So every polygon built here ends
// with an explicit coincident chain, exactly like the built-in Rectangle does
// (PartDesignDocumentWorkflow.cpp:2295).
//
// Coordinates are 2D on the sketch plane; z stays 0 and the sketch's
// placementRotation puts it where it belongs (a hull station is a YZ plane, a
// deck plan is XY).
const r9 = value => Math.round(Number(value) * 1e9) / 1e9;
const pt = (x, y) => [r9(x), r9(y), 0];
/** One line segment geometry row. */
export function line(start, end) {
return { type: "line", start: pt(start[0], start[1]), end: pt(end[0], end[1]) };
}
/** One arc geometry row; angles in radians, as the kernel reports them. */
export function arc(center, radius, startAngle, endAngle) {
return {
type: "arc", center: pt(center[0], center[1]), radius: r9(radius),
startAngle: r9(startAngle), endAngle: r9(endAngle),
};
}
/** Circle geometry (used inside a Geometry profile, e.g. a hole cut). */
export function circle(center, radius) {
return { type: "circle", center: pt(center[0], center[1]), radius: r9(radius) };
}
/**
* Turn a closed point loop into `{ geometries, constraints }`.
*
* The loop is emitted as lines and closed with a coincident chain; a tiny
* optional `radius` corner rounding is NOT applied here because two arcs and
* two lines would need tangent constraints the solver has to satisfy, and a
* hull section built from many stations does not need it (the loft smooths).
*/
export function polygon(points) {
const geometries = [];
const constraints = [];
const n = points.length;
for (let i = 0; i < n; i += 1) {
geometries.push(line(points[i], points[(i + 1) % n]));
}
for (let i = 0; i < n; i += 1) {
constraints.push({
type: "Coincident",
first: i, firstPos: "end",
second: (i + 1) % n, secondPos: "start",
});
}
return { geometries, constraints };
}
/** Rectangle loop centred on the sketch origin. */
export function rectPoints(cx, cy, width, height) {
const hw = width / 2, hh = height / 2;
return [
[cx - hw, cy - hh], [cx + hw, cy - hh],
[cx + hw, cy + hh], [cx - hw, cy + hh],
];
}
/** Rectangle profile as a Geometry sketch body. */
export function rect(cx, cy, width, height) {
return polygon(rectPoints(cx, cy, width, height));
}
/**
* A band (long thin rectangle) whose axis runs at `angleDeg` from +X, centred
* on (cx, cy). Catapult tracks, arrestor wires and deck markings are bands.
*/
export function band(cx, cy, length, width, angleDeg = 0) {
const a = (angleDeg * Math.PI) / 180;
const ux = Math.cos(a), uy = Math.sin(a);
const vx = -uy, vy = ux;
const hl = length / 2, hw = width / 2;
const corner = (l, w) => [cx + ux * l + vx * w, cy + uy * l + vy * w];
return polygon([corner(-hl, -hw), corner(hl, -hw), corner(hl, hw), corner(-hl, hw)]);
}
/**
* Merge several closed loops into one multi-wire profile.
*
* Pad/Loft accept a profile made of several closed wires; a single sketch with
* four elevator openings is one feature instead of four, which is the lesson
* the reducer gear learned the hard way (chained recompute is the cost, not
* the geometry).
*/
export function merge(...shapes) {
const geometries = [];
const constraints = [];
let offset = 0;
for (const shape of shapes) {
geometries.push(...shape.geometries);
for (const constraint of shape.constraints) {
const shifted = { ...constraint };
if (typeof shifted.first === "number") shifted.first += offset;
if (typeof shifted.second === "number") shifted.second += offset;
constraints.push(shifted);
}
offset += shape.geometries.length;
}
return { geometries, constraints };
}
/** Quaternion for a sketch plane rotated `angleDeg` about `axis` ("x"|"y"|"z"). */
export function rotation(axis, angleDeg) {
const half = (angleDeg * Math.PI) / 360;
const s = Math.sin(half), c = Math.cos(half);
if (axis === "x") return [s, 0, 0, c];
if (axis === "y") return [0, s, 0, c];
return [0, 0, s, c];
}
/**
* Convenience: a sketch plane whose local XY is the world YZ plane at `x`.
* Rotation -90 about Y maps local +X onto world +Z, so a station point is
* written (height, beam) and reads the same way in the drawing.
*/
export const stationAt = x => ({ position: [x, 0, 0], placementRotation: rotation("y", -90) });
/** Convenience: a sketch plane whose local XY is the world XZ plane at `y`. */
export const sideAt = y => ({ position: [0, y, 0], placementRotation: rotation("x", 90) });

View File

@@ -0,0 +1,207 @@
{
"schema": "freecad-web-carrier-partdesign-index/v1",
"generatedAt": "2026-11-25T09:39:12.743Z",
"documents": {
"CarrierCiws": {
"id": "P10",
"title": "近防炮",
"system": "weapons",
"steps": 8,
"volume": 55.99481508149678,
"bounds": null,
"seconds": 1.92,
"fcstd": "out/FCStd/CarrierCiws.FCStd",
"builtAt": "2026-11-25T02:42:05.877Z"
},
"CarrierDeck": {
"id": "P02",
"title": "飞行甲板",
"system": "flight-deck",
"steps": 14,
"volume": 35733.026212188044,
"seconds": 26.5,
"fcstd": "out/FCStd/CarrierDeck.FCStd",
"builtAt": "2026-11-25T03:21:46.285Z"
},
"CarrierAngledDeck": {
"id": "P03",
"title": "斜角甲板",
"system": "angled-deck",
"steps": 2,
"volume": 6912.000000095107,
"seconds": 0.57,
"fcstd": "out/FCStd/CarrierAngledDeck.FCStd",
"builtAt": "2026-11-25T02:45:28.101Z"
},
"CarrierHangar": {
"id": "P05",
"title": "机库",
"system": "hangar",
"steps": 4,
"volume": 39639.999999999985,
"seconds": 1.75,
"fcstd": "out/FCStd/CarrierHangar.FCStd",
"builtAt": "2026-11-25T09:39:12.743Z"
},
"CarrierElevators": {
"id": "P06",
"title": "升降机",
"system": "aircraft-handling",
"steps": 8,
"volume": 1007.9999999999995,
"seconds": 1.7,
"fcstd": "out/FCStd/CarrierElevators.FCStd",
"builtAt": "2026-11-25T02:45:46.125Z"
},
"CarrierCatapults": {
"id": "P07",
"title": "弹射器",
"system": "aircraft-handling",
"steps": 8,
"volume": 346.5000000205559,
"seconds": 17.61,
"fcstd": "out/FCStd/CarrierCatapults.FCStd",
"builtAt": "2026-11-25T02:46:22.809Z"
},
"CarrierArrestorWires": {
"id": "P08",
"title": "拦阻索",
"system": "aircraft-handling",
"steps": 8,
"volume": 25.199999999999346,
"seconds": 1.91,
"fcstd": "out/FCStd/CarrierArrestorWires.FCStd",
"builtAt": "2026-11-25T02:46:34.582Z"
},
"CarrierRadar": {
"id": "P09",
"title": "相控阵雷达",
"system": "sensors",
"steps": 6,
"volume": 69.33026138282548,
"seconds": 1.2,
"fcstd": "out/FCStd/CarrierRadar.FCStd",
"builtAt": "2026-11-25T02:46:37.834Z"
},
"CarrierMarkings": {
"id": "P20",
"title": "甲板标线",
"system": "markings",
"steps": 6,
"volume": 25.959599999996996,
"seconds": 4.16,
"fcstd": "out/FCStd/CarrierMarkings.FCStd",
"builtAt": "2026-11-25T02:46:42.963Z"
},
"CarrierHull": {
"id": "P01",
"title": "舰体",
"system": "hull-structure",
"steps": 10,
"volume": 260846.77920152084,
"seconds": 4.04,
"fcstd": "out/FCStd/CarrierHull.FCStd",
"builtAt": "2026-11-25T02:59:31.032Z"
},
"CarrierIsland": {
"id": "P04",
"title": "舰岛",
"system": "island",
"steps": 11,
"volume": 10658.25,
"seconds": 10.23,
"fcstd": "out/FCStd/CarrierIsland.FCStd",
"builtAt": "2026-11-25T02:59:42.332Z"
},
"CarrierFighterA": {
"id": "P11",
"title": "舰载战斗机 A",
"system": "air-fighter",
"steps": 13,
"volume": 82.94751637748307,
"seconds": 12.63,
"fcstd": "out/FCStd/CarrierFighterA.FCStd",
"builtAt": "2026-11-25T03:06:11.062Z"
},
"CarrierFighterB": {
"id": "P12",
"title": "舰载战斗机 B",
"system": "air-fighter",
"steps": 13,
"volume": 87.54004703082904,
"seconds": 13.06,
"fcstd": "out/FCStd/CarrierFighterB.FCStd",
"builtAt": "2026-11-25T03:07:17.468Z"
},
"CarrierFighterC": {
"id": "P13",
"title": "舰载战斗机 C",
"system": "air-fighter",
"steps": 13,
"volume": 74.27704220951199,
"seconds": 13.68,
"fcstd": "out/FCStd/CarrierFighterC.FCStd",
"builtAt": "2026-11-25T03:07:32.109Z"
},
"CarrierFighterD": {
"id": "P14",
"title": "舰载战斗机 D",
"system": "air-fighter",
"steps": 13,
"volume": 92.30909038541577,
"seconds": 13.55,
"fcstd": "out/FCStd/CarrierFighterD.FCStd",
"builtAt": "2026-11-25T03:07:46.614Z"
},
"CarrierFighterE": {
"id": "P15",
"title": "舰载战斗机 E",
"system": "air-fighter",
"steps": 13,
"volume": 78.52773673764473,
"seconds": 14.64,
"fcstd": "out/FCStd/CarrierFighterE.FCStd",
"builtAt": "2026-11-25T03:08:02.233Z"
},
"CarrierFighterF": {
"id": "P16",
"title": "舰载战斗机 F",
"system": "air-fighter",
"steps": 13,
"volume": 85.22195279514976,
"seconds": 12.63,
"fcstd": "out/FCStd/CarrierFighterF.FCStd",
"builtAt": "2026-11-25T03:08:15.840Z"
},
"CarrierAwacs": {
"id": "P17",
"title": "舰载预警机",
"system": "air-awacs",
"steps": 21,
"volume": 254.94042344150378,
"seconds": 34.17,
"fcstd": "out/FCStd/CarrierAwacs.FCStd",
"builtAt": "2026-11-25T03:08:50.977Z"
},
"CarrierHelicopterA": {
"id": "P18",
"title": "舰载直升机 A",
"system": "air-rotor",
"steps": 13,
"volume": 48.34826428466978,
"seconds": 8.63,
"fcstd": "out/FCStd/CarrierHelicopterA.FCStd",
"builtAt": "2026-11-25T03:09:00.538Z"
},
"CarrierHelicopterB": {
"id": "P19",
"title": "舰载直升机 B",
"system": "air-rotor",
"steps": 13,
"volume": 48.39866428466979,
"seconds": 8.87,
"fcstd": "out/FCStd/CarrierHelicopterB.FCStd",
"builtAt": "2026-11-25T03:09:10.413Z"
}
}
}

View File

@@ -0,0 +1 @@
{"schema":"freecad-web-process-replay/v1","document":"CarrierAngledDeck","source":"web/teaching/cases/carrier-partdesign/out/FCStd/CarrierAngledDeck.FCStd","meshMs":69,"steps":[{"step":1,"label":"CarrierAngledDeck · 斜角甲板平面","action":"setSketch","seconds":0.0598,"args":{"object":"AngledPlan","body":"Body","profileType":"Geometry","position":[0,0,24],"geometries":{"count":4,"sha256":"4db5d5b809389276"},"constraints":{"count":4,"sha256":"a7dc762a36ba48a3"}},"feature":"AngledPlan","volume":0,"faceCount":1,"mesh":{"positions":[77.162,4.584,24,-157.162,-52.584,24,80.502,-19.182,24,77.162,4.584,24,-160.502,-28.818,24,-157.162,-52.584,24],"normals":[0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1],"triangleCount":2,"bounds":[-160.50224546100003,-52.58398894,24,80.502245461,4.583988940000001,24]}},{"step":2,"label":"CarrierAngledDeck · 斜角甲板","action":"setFeature","seconds":0.2388,"args":{"object":"AngledPad","body":"Body","featureType":"Pad","profile":"AngledPlan","length":1.2},"feature":"AngledPad","volume":6912.000000095107,"faceCount":6,"mesh":{"positions":[-157.162,-52.584,24,80.502,-19.182,24,-157.162,-52.584,25.2,-157.162,-52.584,25.2,80.502,-19.182,24,80.502,-19.182,25.2,80.502,-19.182,24,77.162,4.584,24,80.502,-19.182,25.2,80.502,-19.182,25.2,77.162,4.584,24,77.162,4.584,25.2,77.162,4.584,24,-160.502,-28.818,24,77.162,4.584,25.2,77.162,4.584,25.2,-160.502,-28.818,24,-160.502,-28.818,25.2,-160.502,-28.818,24,-157.162,-52.584,24,-160.502,-28.818,25.2,-160.502,-28.818,25.2,-157.162,-52.584,24,-157.162,-52.584,25.2,-157.162,-52.584,24,77.162,4.584,24,80.502,-19.182,24,-160.502,-28.818,24,77.162,4.584,24,-157.162,-52.584,24,77.162,4.584,25.2,-157.162,-52.584,25.2,80.502,-19.182,25.2,77.162,4.584,25.2,-160.502,-28.818,25.2,-157.162,-52.584,25.2],"normals":[0.139,-0.99,0,0.139,-0.99,0,0.139,-0.99,0,0.139,-0.99,0,0.139,-0.99,0,0.139,-0.99,0,0.99,0.139,0,0.99,0.139,0,0.99,0.139,0,0.99,0.139,0,0.99,0.139,0,0.99,0.139,0,-0.139,0.99,0,-0.139,0.99,0,-0.139,0.99,0,-0.139,0.99,0,-0.139,0.99,0,-0.139,0.99,0,-0.99,-0.139,0,-0.99,-0.139,0,-0.99,-0.139,0,-0.99,-0.139,0,-0.99,-0.139,0,-0.99,-0.139,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1],"triangleCount":12,"bounds":[-160.50224546100003,-52.58398894,24,80.502245461,4.583988940000001,25.2]}}]}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"schema":"freecad-web-process-replay/v1","document":"CarrierHangar","source":"web/teaching/cases/carrier-partdesign/out/FCStd/CarrierHangar.FCStd","meshMs":130,"steps":[{"step":1,"label":"CarrierHangar · 机库外壳平面","action":"setSketch","seconds":0.1795,"args":{"object":"HangarShellSketch","body":"Body","profileType":"Geometry","position":[0,0,8],"geometries":{"count":4,"sha256":"33b2eb432edc596c"},"constraints":{"count":4,"sha256":"a7dc762a36ba48a3"}},"feature":"HangarShellSketch","volume":0,"faceCount":1,"mesh":{"positions":[60,17,8,-140,-17,8,60,-17,8,60,17,8,-140,17,8,-140,-17,8],"normals":[0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1],"triangleCount":2,"bounds":[-140,-17,8,60,17,8]}},{"step":2,"label":"CarrierHangar · 机库外壳","action":"setFeature","seconds":0.2389,"args":{"object":"HangarShell","body":"Body","featureType":"Pad","profile":"HangarShellSketch","length":16},"feature":"HangarShell","volume":108800.00000000003,"faceCount":6,"mesh":{"positions":[-140,-17,8,60,-17,8,-140,-17,24,-140,-17,24,60,-17,8,60,-17,24,60,-17,8,60,17,24,60,-17,24,60,-17,8,60,17,8,60,17,24,60,17,8,-140,17,8,60,17,24,60,17,24,-140,17,8,-140,17,24,-140,17,8,-140,-17,24,-140,17,24,-140,17,8,-140,-17,8,-140,-17,24,-140,-17,8,60,17,8,60,-17,8,-140,17,8,60,17,8,-140,-17,8,60,17,24,-140,-17,24,60,-17,24,60,17,24,-140,17,24,-140,-17,24],"normals":[0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1],"triangleCount":12,"bounds":[-140,-17,8,60,17,24]}},{"step":3,"label":"CarrierHangar · 机库内腔平面","action":"setSketch","seconds":0.0737,"args":{"object":"HangarCavitySketch","body":"Body","profileType":"Geometry","position":[0,0,24],"geometries":{"count":4,"sha256":"e7903266b587a746"},"constraints":{"count":4,"sha256":"a7dc762a36ba48a3"}},"feature":"HangarCavitySketch","volume":0,"faceCount":1,"mesh":{"positions":[55,14,24,-135,-14,24,55,-14,24,55,14,24,-135,14,24,-135,-14,24],"normals":[0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1],"triangleCount":2,"bounds":[-135,-14,24,55,14,24]}},{"step":4,"label":"CarrierHangar · 掏空内腔","action":"setFeature","seconds":0.3998,"args":{"object":"HangarCavity","body":"Body","featureType":"Pocket","profile":"HangarCavitySketch","length":13},"feature":"HangarCavity","volume":39639.999999999985,"faceCount":11,"mesh":{"positions":[-140,-17,8,60,-17,8,-140,-17,24,-140,-17,24,60,-17,8,60,-17,24,-140,17,8,-140,-17,24,-140,17,24,-140,17,8,-140,-17,8,-140,-17,24,60,-17,8,60,17,24,60,-17,24,60,-17,8,60,17,8,60,17,24,-140,-17,8,60,17,8,60,-17,8,-140,17,8,60,17,8,-140,-17,8,-135,14,24,-140,17,24,-140,-17,24,-135,14,24,-140,-17,24,-135,-14,24,60,-17,24,55,-14,24,-135,-14,24,60,-17,24,-135,-14,24,-140,-17,24,60,17,24,55,14,24,55,-14,24,60,17,24,55,-14,24,60,-17,24,60,17,24,-140,17,24,-135,14,24,60,17,24,-135,14,24,55,14,24,60,17,8,-140,17,8,60,17,24,60,17,24,-140,17,8,-140,17,24,-135,-14,24,55,-14,24,-135,-14,11,-135,-14,11,55,-14,24,55,-14,11,55,-14,24,55,14,11,55,-14,11,55,-14,24,55,14,24,55,14,11,55,14,24,-135,14,24,55,14,11,55,14,11,-135,14,24,-135,14,11,-135,14,24,-135,-14,11,-135,14,11,-135,14,24,-135,-14,24,-135,-14,11,55,14,11,-135,-14,11,55,-14,11,55,14,11,-135,14,11,-135,-14,11],"normals":[0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1],"triangleCount":28,"bounds":[-140,-17,8,60,17,24]}}]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,17 @@
{
"schema": "freecad-web-process-replay/v1",
"generatedAt": "2026-11-25T09:42:37.240Z",
"documents": [
{
"document": "CarrierHangar",
"kind": "part",
"events": 4,
"steps": 4,
"withMesh": 4,
"solids": 4,
"bytes": 3893,
"meshMs": 130
}
],
"failures": []
}

View File

@@ -0,0 +1,286 @@
{
"schema": "freecad-web-process-trace/v1",
"document": "CarrierAngledDeck",
"builder": "deck",
"totals": {
"seconds": 0.299,
"steps": 2,
"timings": [
{
"label": "CarrierAngledDeck · 斜角甲板平面",
"action": "setSketch",
"seconds": 0.059793516000000636
},
{
"label": "CarrierAngledDeck · 斜角甲板",
"action": "setFeature",
"seconds": 0.238780385
}
]
},
"events": [
{
"step": 1,
"label": "CarrierAngledDeck · 斜角甲板平面",
"action": "setSketch",
"args": {
"object": "AngledPlan",
"body": "Body",
"profileType": "Geometry",
"position": [
0,
0,
24
],
"geometries": {
"count": 4,
"sha256": "4db5d5b809389276"
},
"constraints": {
"count": 4,
"sha256": "a7dc762a36ba48a3"
}
},
"seconds": 0.0598,
"tips": {
"objectCount": 10,
"tip": "AngledPlan",
"objects": [
{
"name": "Body",
"label": "Body",
"type": "PartDesign::Body",
"position": [
0,
0,
0
],
"volume": null,
"faceCount": 0,
"edgeCount": null,
"vertexCount": 0
},
{
"name": "Origin",
"label": "Origin",
"type": "App::Origin",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "X_Axis",
"label": "X-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Y_Axis",
"label": "Y-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Z_Axis",
"label": "Z-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XY_Plane",
"label": "XY-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XZ_Plane",
"label": "XZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "YZ_Plane",
"label": "YZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Origin001",
"label": "Origin001",
"type": "App::Point",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "AngledPlan",
"label": "AngledPlan",
"type": "Sketcher::SketchObject",
"position": [
0,
0,
24
],
"volume": 0,
"faceCount": 0,
"edgeCount": 4,
"vertexCount": 4
}
]
}
},
{
"step": 2,
"label": "CarrierAngledDeck · 斜角甲板",
"action": "setFeature",
"args": {
"object": "AngledPad",
"body": "Body",
"featureType": "Pad",
"profile": "AngledPlan",
"length": 1.2
},
"seconds": 0.2388,
"tips": {
"objectCount": 11,
"tip": "AngledPad",
"objects": [
{
"name": "Body",
"label": "Body",
"type": "PartDesign::Body",
"position": [
0,
0,
0
],
"volume": 6912.000000095107,
"faceCount": 6,
"edgeCount": 12,
"vertexCount": 8
},
{
"name": "Origin",
"label": "Origin",
"type": "App::Origin",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "X_Axis",
"label": "X-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Y_Axis",
"label": "Y-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Z_Axis",
"label": "Z-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XY_Plane",
"label": "XY-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XZ_Plane",
"label": "XZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "YZ_Plane",
"label": "YZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Origin001",
"label": "Origin001",
"type": "App::Point",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "AngledPlan",
"label": "AngledPlan",
"type": "Sketcher::SketchObject",
"position": [
0,
0,
24
],
"volume": 0,
"faceCount": 0,
"edgeCount": 4,
"vertexCount": 4
},
{
"name": "AngledPad",
"label": "AngledPad",
"type": "PartDesign::Pad",
"position": [
0,
0,
24
],
"volume": 6912.000000095107,
"faceCount": 6,
"edgeCount": 12,
"vertexCount": 8
}
]
}
}
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,615 @@
{
"schema": "freecad-web-process-trace/v1",
"document": "CarrierHangar",
"builder": "hangar",
"totals": {
"seconds": 0.892,
"steps": 4,
"timings": [
{
"label": "CarrierHangar · 机库外壳平面",
"action": "setSketch",
"seconds": 0.179451726
},
{
"label": "CarrierHangar · 机库外壳",
"action": "setFeature",
"seconds": 0.23893987600000013
},
{
"label": "CarrierHangar · 机库内腔平面",
"action": "setSketch",
"seconds": 0.07365641499999992
},
{
"label": "CarrierHangar · 掏空内腔",
"action": "setFeature",
"seconds": 0.3998322840000001
}
]
},
"events": [
{
"step": 1,
"label": "CarrierHangar · 机库外壳平面",
"action": "setSketch",
"args": {
"object": "HangarShellSketch",
"body": "Body",
"profileType": "Geometry",
"position": [
0,
0,
8
],
"geometries": {
"count": 4,
"sha256": "33b2eb432edc596c"
},
"constraints": {
"count": 4,
"sha256": "a7dc762a36ba48a3"
}
},
"seconds": 0.1795,
"tips": {
"objectCount": 10,
"tip": "HangarShellSketch",
"objects": [
{
"name": "Body",
"label": "Body",
"type": "PartDesign::Body",
"position": [
0,
0,
0
],
"volume": null,
"faceCount": 0,
"edgeCount": null,
"vertexCount": 0
},
{
"name": "Origin",
"label": "Origin",
"type": "App::Origin",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "X_Axis",
"label": "X-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Y_Axis",
"label": "Y-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Z_Axis",
"label": "Z-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XY_Plane",
"label": "XY-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XZ_Plane",
"label": "XZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "YZ_Plane",
"label": "YZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Origin001",
"label": "Origin001",
"type": "App::Point",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "HangarShellSketch",
"label": "HangarShellSketch",
"type": "Sketcher::SketchObject",
"position": [
0,
0,
8
],
"volume": 0,
"faceCount": 0,
"edgeCount": 4,
"vertexCount": 4
}
]
}
},
{
"step": 2,
"label": "CarrierHangar · 机库外壳",
"action": "setFeature",
"args": {
"object": "HangarShell",
"body": "Body",
"featureType": "Pad",
"profile": "HangarShellSketch",
"length": 16
},
"seconds": 0.2389,
"tips": {
"objectCount": 11,
"tip": "HangarShell",
"objects": [
{
"name": "Body",
"label": "Body",
"type": "PartDesign::Body",
"position": [
0,
0,
0
],
"volume": 108800.00000000003,
"faceCount": 6,
"edgeCount": 12,
"vertexCount": 8
},
{
"name": "Origin",
"label": "Origin",
"type": "App::Origin",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "X_Axis",
"label": "X-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Y_Axis",
"label": "Y-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Z_Axis",
"label": "Z-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XY_Plane",
"label": "XY-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XZ_Plane",
"label": "XZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "YZ_Plane",
"label": "YZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Origin001",
"label": "Origin001",
"type": "App::Point",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "HangarShellSketch",
"label": "HangarShellSketch",
"type": "Sketcher::SketchObject",
"position": [
0,
0,
8
],
"volume": 0,
"faceCount": 0,
"edgeCount": 4,
"vertexCount": 4
},
{
"name": "HangarShell",
"label": "HangarShell",
"type": "PartDesign::Pad",
"position": [
0,
0,
8
],
"volume": 108800.00000000003,
"faceCount": 6,
"edgeCount": 12,
"vertexCount": 8
}
]
}
},
{
"step": 3,
"label": "CarrierHangar · 机库内腔平面",
"action": "setSketch",
"args": {
"object": "HangarCavitySketch",
"body": "Body",
"profileType": "Geometry",
"position": [
0,
0,
24
],
"geometries": {
"count": 4,
"sha256": "e7903266b587a746"
},
"constraints": {
"count": 4,
"sha256": "a7dc762a36ba48a3"
}
},
"seconds": 0.0737,
"tips": {
"objectCount": 12,
"tip": "HangarCavitySketch",
"objects": [
{
"name": "Body",
"label": "Body",
"type": "PartDesign::Body",
"position": [
0,
0,
0
],
"volume": 108800.00000000003,
"faceCount": 6,
"edgeCount": 12,
"vertexCount": 8
},
{
"name": "Origin",
"label": "Origin",
"type": "App::Origin",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "X_Axis",
"label": "X-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Y_Axis",
"label": "Y-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Z_Axis",
"label": "Z-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XY_Plane",
"label": "XY-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XZ_Plane",
"label": "XZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "YZ_Plane",
"label": "YZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Origin001",
"label": "Origin001",
"type": "App::Point",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "HangarShellSketch",
"label": "HangarShellSketch",
"type": "Sketcher::SketchObject",
"position": [
0,
0,
8
],
"volume": 0,
"faceCount": 0,
"edgeCount": 4,
"vertexCount": 4
},
{
"name": "HangarShell",
"label": "HangarShell",
"type": "PartDesign::Pad",
"position": [
0,
0,
8
],
"volume": 108800.00000000003,
"faceCount": 6,
"edgeCount": 12,
"vertexCount": 8
},
{
"name": "HangarCavitySketch",
"label": "HangarCavitySketch",
"type": "Sketcher::SketchObject",
"position": [
0,
0,
24
],
"volume": 0,
"faceCount": 0,
"edgeCount": 4,
"vertexCount": 4
}
]
}
},
{
"step": 4,
"label": "CarrierHangar · 掏空内腔",
"action": "setFeature",
"args": {
"object": "HangarCavity",
"body": "Body",
"featureType": "Pocket",
"profile": "HangarCavitySketch",
"length": 13
},
"seconds": 0.3998,
"tips": {
"objectCount": 13,
"tip": "HangarCavity",
"objects": [
{
"name": "Body",
"label": "Body",
"type": "PartDesign::Body",
"position": [
0,
0,
0
],
"volume": 39639.999999999985,
"faceCount": 11,
"edgeCount": 24,
"vertexCount": 16
},
{
"name": "Origin",
"label": "Origin",
"type": "App::Origin",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "X_Axis",
"label": "X-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Y_Axis",
"label": "Y-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Z_Axis",
"label": "Z-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XY_Plane",
"label": "XY-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XZ_Plane",
"label": "XZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "YZ_Plane",
"label": "YZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Origin001",
"label": "Origin001",
"type": "App::Point",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "HangarShellSketch",
"label": "HangarShellSketch",
"type": "Sketcher::SketchObject",
"position": [
0,
0,
8
],
"volume": 0,
"faceCount": 0,
"edgeCount": 4,
"vertexCount": 4
},
{
"name": "HangarShell",
"label": "HangarShell",
"type": "PartDesign::Pad",
"position": [
0,
0,
8
],
"volume": 108800.00000000003,
"faceCount": 6,
"edgeCount": 12,
"vertexCount": 8
},
{
"name": "HangarCavitySketch",
"label": "HangarCavitySketch",
"type": "Sketcher::SketchObject",
"position": [
0,
0,
24
],
"volume": 0,
"faceCount": 0,
"edgeCount": 4,
"vertexCount": 4
},
{
"name": "HangarCavity",
"label": "HangarCavity",
"type": "PartDesign::Pocket",
"position": [
0,
0,
8
],
"volume": 39639.999999999985,
"faceCount": 11,
"edgeCount": 24,
"vertexCount": 16
}
]
}
}
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,996 @@
{
"schema": "freecad-web-process-trace/v1",
"document": "CarrierRadar",
"builder": "sensors",
"totals": {
"seconds": 1.064,
"steps": 6,
"timings": [
{
"label": "CarrierRadar · 雷达基座截面",
"action": "setSketch",
"seconds": 0.030709644000002298
},
{
"label": "CarrierRadar · 雷达基座",
"action": "setFeature",
"seconds": 0.06350509900000179
},
{
"label": "CarrierRadar · 阵面草图",
"action": "setSketch",
"seconds": 0.05788390299999446
},
{
"label": "CarrierRadar · 相控阵面",
"action": "setFeature",
"seconds": 0.4745789090000035
},
{
"label": "CarrierRadar · 阵面支架截面",
"action": "setSketch",
"seconds": 0.08302601299999515
},
{
"label": "CarrierRadar · 阵面支架",
"action": "setFeature",
"seconds": 0.35445988500000386
}
]
},
"events": [
{
"step": 1,
"label": "CarrierRadar · 雷达基座截面",
"action": "setSketch",
"args": {
"object": "RadarPedestalSketch",
"body": "Body",
"profileType": "Circle",
"parameters": {
"Radius": 2.2
},
"position": [
4,
28,
53
]
},
"seconds": 0.0307,
"tips": {
"objectCount": 10,
"tip": "RadarPedestalSketch",
"objects": [
{
"name": "Body",
"label": "Body",
"type": "PartDesign::Body",
"position": [
0,
0,
0
],
"volume": null,
"faceCount": 0,
"edgeCount": null,
"vertexCount": 0
},
{
"name": "Origin",
"label": "Origin",
"type": "App::Origin",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "X_Axis",
"label": "X-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Y_Axis",
"label": "Y-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Z_Axis",
"label": "Z-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XY_Plane",
"label": "XY-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XZ_Plane",
"label": "XZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "YZ_Plane",
"label": "YZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Origin001",
"label": "Origin001",
"type": "App::Point",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "RadarPedestalSketch",
"label": "RadarPedestalSketch",
"type": "Sketcher::SketchObject",
"position": [
4,
28,
53
],
"volume": 0,
"faceCount": 0,
"edgeCount": 1,
"vertexCount": 1
}
]
}
},
{
"step": 2,
"label": "CarrierRadar · 雷达基座",
"action": "setFeature",
"args": {
"object": "RadarPedestal",
"body": "Body",
"featureType": "Pad",
"profile": "RadarPedestalSketch",
"length": 3
},
"seconds": 0.0635,
"tips": {
"objectCount": 11,
"tip": "RadarPedestal",
"objects": [
{
"name": "Body",
"label": "Body",
"type": "PartDesign::Body",
"position": [
0,
0,
0
],
"volume": 45.6159253301238,
"faceCount": 3,
"edgeCount": 3,
"vertexCount": 2
},
{
"name": "Origin",
"label": "Origin",
"type": "App::Origin",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "X_Axis",
"label": "X-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Y_Axis",
"label": "Y-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Z_Axis",
"label": "Z-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XY_Plane",
"label": "XY-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XZ_Plane",
"label": "XZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "YZ_Plane",
"label": "YZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Origin001",
"label": "Origin001",
"type": "App::Point",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "RadarPedestalSketch",
"label": "RadarPedestalSketch",
"type": "Sketcher::SketchObject",
"position": [
4,
28,
53
],
"volume": 0,
"faceCount": 0,
"edgeCount": 1,
"vertexCount": 1
},
{
"name": "RadarPedestal",
"label": "RadarPedestal",
"type": "PartDesign::Pad",
"position": [
4,
28,
53
],
"volume": 45.61592533012381,
"faceCount": 3,
"edgeCount": 3,
"vertexCount": 2
}
]
}
},
{
"step": 3,
"label": "CarrierRadar · 阵面草图",
"action": "setSketch",
"args": {
"object": "RadarFaceSketch",
"body": "Body",
"profileType": "Geometry",
"position": [
0,
28,
0
],
"placementRotation": [
0.7071067811865476,
0,
0,
0.7071067811865476
],
"geometries": {
"count": 4,
"sha256": "67346469493e7308"
},
"constraints": {
"count": 4,
"sha256": "a7dc762a36ba48a3"
}
},
"seconds": 0.0579,
"tips": {
"objectCount": 12,
"tip": "RadarFaceSketch",
"objects": [
{
"name": "Body",
"label": "Body",
"type": "PartDesign::Body",
"position": [
0,
0,
0
],
"volume": 45.6159253301238,
"faceCount": 3,
"edgeCount": 3,
"vertexCount": 2
},
{
"name": "Origin",
"label": "Origin",
"type": "App::Origin",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "X_Axis",
"label": "X-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Y_Axis",
"label": "Y-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Z_Axis",
"label": "Z-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XY_Plane",
"label": "XY-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XZ_Plane",
"label": "XZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "YZ_Plane",
"label": "YZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Origin001",
"label": "Origin001",
"type": "App::Point",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "RadarPedestalSketch",
"label": "RadarPedestalSketch",
"type": "Sketcher::SketchObject",
"position": [
4,
28,
53
],
"volume": 0,
"faceCount": 0,
"edgeCount": 1,
"vertexCount": 1
},
{
"name": "RadarPedestal",
"label": "RadarPedestal",
"type": "PartDesign::Pad",
"position": [
4,
28,
53
],
"volume": 45.61592533012381,
"faceCount": 3,
"edgeCount": 3,
"vertexCount": 2
},
{
"name": "RadarFaceSketch",
"label": "RadarFaceSketch",
"type": "Sketcher::SketchObject",
"position": [
0,
28,
0
],
"volume": 0,
"faceCount": 0,
"edgeCount": 4,
"vertexCount": 4
}
]
}
},
{
"step": 4,
"label": "CarrierRadar · 相控阵面",
"action": "setFeature",
"args": {
"object": "RadarFace",
"body": "Body",
"featureType": "Pad",
"profile": "RadarFaceSketch",
"length": 0.6
},
"seconds": 0.4746,
"tips": {
"objectCount": 13,
"tip": "RadarFace",
"objects": [
{
"name": "Body",
"label": "Body",
"type": "PartDesign::Body",
"position": [
0,
0,
0
],
"volume": 66.61592533012391,
"faceCount": 11,
"edgeCount": 22,
"vertexCount": 13
},
{
"name": "Origin",
"label": "Origin",
"type": "App::Origin",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "X_Axis",
"label": "X-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Y_Axis",
"label": "Y-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Z_Axis",
"label": "Z-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XY_Plane",
"label": "XY-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XZ_Plane",
"label": "XZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "YZ_Plane",
"label": "YZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Origin001",
"label": "Origin001",
"type": "App::Point",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "RadarPedestalSketch",
"label": "RadarPedestalSketch",
"type": "Sketcher::SketchObject",
"position": [
4,
28,
53
],
"volume": 0,
"faceCount": 0,
"edgeCount": 1,
"vertexCount": 1
},
{
"name": "RadarPedestal",
"label": "RadarPedestal",
"type": "PartDesign::Pad",
"position": [
4,
28,
53
],
"volume": 45.61592533012381,
"faceCount": 3,
"edgeCount": 3,
"vertexCount": 2
},
{
"name": "RadarFaceSketch",
"label": "RadarFaceSketch",
"type": "Sketcher::SketchObject",
"position": [
0,
28,
0
],
"volume": 0,
"faceCount": 0,
"edgeCount": 4,
"vertexCount": 4
},
{
"name": "RadarFace",
"label": "RadarFace",
"type": "PartDesign::Pad",
"position": [
4,
28,
53
],
"volume": 66.61592533012393,
"faceCount": 11,
"edgeCount": 22,
"vertexCount": 13
}
]
}
},
{
"step": 5,
"label": "CarrierRadar · 阵面支架截面",
"action": "setSketch",
"args": {
"object": "RadarFrameSketch",
"body": "Body",
"profileType": "Circle",
"parameters": {
"Radius": 0.6
},
"position": [
4,
28.9,
56
]
},
"seconds": 0.083,
"tips": {
"objectCount": 14,
"tip": "RadarFrameSketch",
"objects": [
{
"name": "Body",
"label": "Body",
"type": "PartDesign::Body",
"position": [
0,
0,
0
],
"volume": 66.61592533012391,
"faceCount": 11,
"edgeCount": 22,
"vertexCount": 13
},
{
"name": "Origin",
"label": "Origin",
"type": "App::Origin",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "X_Axis",
"label": "X-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Y_Axis",
"label": "Y-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Z_Axis",
"label": "Z-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XY_Plane",
"label": "XY-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XZ_Plane",
"label": "XZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "YZ_Plane",
"label": "YZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Origin001",
"label": "Origin001",
"type": "App::Point",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "RadarPedestalSketch",
"label": "RadarPedestalSketch",
"type": "Sketcher::SketchObject",
"position": [
4,
28,
53
],
"volume": 0,
"faceCount": 0,
"edgeCount": 1,
"vertexCount": 1
},
{
"name": "RadarPedestal",
"label": "RadarPedestal",
"type": "PartDesign::Pad",
"position": [
4,
28,
53
],
"volume": 45.61592533012381,
"faceCount": 3,
"edgeCount": 3,
"vertexCount": 2
},
{
"name": "RadarFaceSketch",
"label": "RadarFaceSketch",
"type": "Sketcher::SketchObject",
"position": [
0,
28,
0
],
"volume": 0,
"faceCount": 0,
"edgeCount": 4,
"vertexCount": 4
},
{
"name": "RadarFace",
"label": "RadarFace",
"type": "PartDesign::Pad",
"position": [
4,
28,
53
],
"volume": 66.61592533012393,
"faceCount": 11,
"edgeCount": 22,
"vertexCount": 13
},
{
"name": "RadarFrameSketch",
"label": "RadarFrameSketch",
"type": "Sketcher::SketchObject",
"position": [
4,
28.9,
56
],
"volume": 0,
"faceCount": 0,
"edgeCount": 1,
"vertexCount": 1
}
]
}
},
{
"step": 6,
"label": "CarrierRadar · 阵面支架",
"action": "setFeature",
"args": {
"object": "RadarFrame",
"body": "Body",
"featureType": "Pad",
"profile": "RadarFrameSketch",
"length": 2.4
},
"seconds": 0.3545,
"tips": {
"objectCount": 15,
"tip": "RadarFrame",
"objects": [
{
"name": "Body",
"label": "Body",
"type": "PartDesign::Body",
"position": [
0,
0,
0
],
"volume": 69.33026138282548,
"faceCount": 13,
"edgeCount": 25,
"vertexCount": 15
},
{
"name": "Origin",
"label": "Origin",
"type": "App::Origin",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "X_Axis",
"label": "X-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Y_Axis",
"label": "Y-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Z_Axis",
"label": "Z-axis",
"type": "App::Line",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XY_Plane",
"label": "XY-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "XZ_Plane",
"label": "XZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "YZ_Plane",
"label": "YZ-plane",
"type": "App::Plane",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "Origin001",
"label": "Origin001",
"type": "App::Point",
"volume": null,
"faceCount": null,
"edgeCount": null,
"vertexCount": null
},
{
"name": "RadarPedestalSketch",
"label": "RadarPedestalSketch",
"type": "Sketcher::SketchObject",
"position": [
4,
28,
53
],
"volume": 0,
"faceCount": 0,
"edgeCount": 1,
"vertexCount": 1
},
{
"name": "RadarPedestal",
"label": "RadarPedestal",
"type": "PartDesign::Pad",
"position": [
4,
28,
53
],
"volume": 45.61592533012381,
"faceCount": 3,
"edgeCount": 3,
"vertexCount": 2
},
{
"name": "RadarFaceSketch",
"label": "RadarFaceSketch",
"type": "Sketcher::SketchObject",
"position": [
0,
28,
0
],
"volume": 0,
"faceCount": 0,
"edgeCount": 4,
"vertexCount": 4
},
{
"name": "RadarFace",
"label": "RadarFace",
"type": "PartDesign::Pad",
"position": [
4,
28,
53
],
"volume": 66.61592533012393,
"faceCount": 11,
"edgeCount": 22,
"vertexCount": 13
},
{
"name": "RadarFrameSketch",
"label": "RadarFrameSketch",
"type": "Sketcher::SketchObject",
"position": [
4,
28.9,
56
],
"volume": 0,
"faceCount": 0,
"edgeCount": 1,
"vertexCount": 1
},
{
"name": "RadarFrame",
"label": "RadarFrame",
"type": "PartDesign::Pad",
"position": [
4,
28,
53
],
"volume": 69.3302613828255,
"faceCount": 13,
"edgeCount": 25,
"vertexCount": 15
}
]
}
}
]
}

View File

@@ -0,0 +1,230 @@
// 舰载机(P11–P19):战斗机、预警机、直升机。
//
// Every airframe is built in its own local frame -- nose along +X, the fuselage
// centreline on the X axis, wings on the XY plane -- so a Revolution about the
// body origin's X axis is the fuselage and a Mirrored about XZ makes the
// second wing. The assembly then places each airframe on the deck with a
// position and a heading.
//
// This is the part family where PartDesign earns its place: the fuselage is a
// lathed profile, the wing is a swept planform Pad, the stabiliser is its
// mirrored twin, and the canopy is a primitive dome. Six fighters share one
// parameterised builder; the AWACS adds a rotodome and four nacelles; the two
// helicopters add a PolarPattern rotor.
import { polygon, band, stationAt, sideAt, rotation } from "../lib/sketch.mjs";
const X_AXIS = "X_Axis";
const XZ_PLANE = { object: "XZ_Plane", subelements: [""] };
const Z_AXIS = { object: "Z_Axis", subelements: [""] };
/** Fighter fuselage half-profile, scaled to `length`. */
function fighterProfile(length) {
const s = length / 9.2;
return [
[9.2 * s, 0], [8.7 * s, 0.4 * s], [7.4 * s, 0.75 * s], [5 * s, 1.1 * s],
[2.5 * s, 1.25 * s], [0, 1.25 * s], [-2.8 * s, 1.15 * s], [-5.6 * s, 0.95 * s],
[-8 * s, 0.8 * s], [-9.2 * s, 0.6 * s], [-9.2 * s, 0],
];
}
function fighterWing(span) {
return [[2.6, 1.0], [-3.2, 1.0], [-4.4, span], [-1.2, span]];
}
function buildFighter(part, { length, span }) {
const s = length / 9.2;
// 1. Fuselage: half-profile revolved about the body X axis.
part.sketch("FuseSketch", {
profileType: "Geometry",
...polygon(fighterProfile(length)),
...sideAt(0),
}, "机身半剖");
part.feature("Fuselage", {
featureType: "Revolution", profile: "FuseSketch", axis: X_AXIS, angle: 360,
}, "机身回转");
// 2. Wing: swept planform, then its mirror image.
part.sketch("WingSketch", {
profileType: "Geometry",
...polygon(fighterWing(span)),
position: [0, 0, 0],
}, "右机翼平面");
part.feature("WingPad", {
featureType: "Pad", profile: "WingSketch", length: 0.32, midplane: true,
}, "右机翼");
part.transform("WingMirror", {
transformType: "Mirrored", originals: ["WingPad"], mirrorPlane: XZ_PLANE,
}, "左机翼镜像");
// 3. Horizontal stabiliser, mirrored the same way.
part.sketch("StabSketch", {
profileType: "Geometry",
...polygon([[-7.0 * s, 0.45], [-9.2 * s, 0.45], [-9.4 * s, 3.0], [-8.2 * s, 3.0]]),
position: [0, 0, 0],
}, "平尾平面");
part.feature("StabilizerPad", {
featureType: "Pad", profile: "StabSketch", length: 0.22, midplane: true,
}, "平尾");
part.transform("StabilizerMirror", {
transformType: "Mirrored", originals: ["StabilizerPad"], mirrorPlane: XZ_PLANE,
}, "平尾镜像");
// 4. Vertical tail in the XZ plane.
part.sketch("TailSketch", {
profileType: "Geometry",
...polygon([[-5.0 * s, 0.45], [-8.6 * s, 0.45], [-9.0 * s, 4.2], [-7.4 * s, 4.2]]),
...sideAt(0),
}, "垂尾平面");
part.feature("TailPad", {
featureType: "Pad", profile: "TailSketch", length: 0.2, midplane: true,
}, "垂尾");
// 5. Canopy dome and exhaust nozzle.
part.primitive("Canopy", {
primitiveType: "AdditiveSphere", parameters: { Radius: 0.8 }, position: [3.2 * s, 0, 1.15 * s],
}, "座舱盖");
part.sketch("NozzleSketch", {
profileType: "Circle", parameters: { Radius: 0.68 },
...stationAt(-9.3 * s),
}, "尾喷口截面");
part.feature("NozzlePad", {
featureType: "Pad", profile: "NozzleSketch", length: 1.4,
}, "尾喷口");
}
const FIGHTERS = [
{ id: "P11", document: "CarrierFighterA", length: 9.2, span: 6.6 },
{ id: "P12", document: "CarrierFighterB", length: 9.4, span: 6.8 },
{ id: "P13", document: "CarrierFighterC", length: 8.8, span: 6.2 },
{ id: "P14", document: "CarrierFighterD", length: 9.6, span: 7.0 },
{ id: "P15", document: "CarrierFighterE", length: 9.0, span: 6.4 },
{ id: "P16", document: "CarrierFighterF", length: 9.3, span: 6.7 },
];
export const fighters = FIGHTERS.map(cfg => ({
document: cfg.document,
builder: "aircraft",
build(part) { buildFighter(part, cfg); },
}));
// ---- 预警机 ----------------------------------------------------------------
export const awacs = {
document: "CarrierAwacs",
builder: "aircraft",
build(part) {
// 17 m fuselage, high aspect-ratio wing, four nacelles, rotodome.
part.sketch("FuseSketch", {
profileType: "Geometry",
...polygon([
[8.6, 0], [8.0, 0.5], [6.4, 1.0], [4.2, 1.5], [1.6, 1.7],
[-1.6, 1.7], [-4.6, 1.5], [-7.0, 1.2], [-8.2, 0.9], [-8.6, 0.4], [-8.6, 0],
]),
...sideAt(0),
}, "机身半剖");
part.feature("Fuselage", { featureType: "Revolution", profile: "FuseSketch", axis: X_AXIS, angle: 360 }, "机身回转");
part.sketch("WingSketch", {
profileType: "Geometry",
...polygon([[2.4, 0.8], [-1.8, 0.8], [-2.2, 11.6], [0.6, 11.6]]),
position: [0, 0, 1.4],
}, "右机翼平面");
part.feature("WingPad", { featureType: "Pad", profile: "WingSketch", length: 0.34, midplane: true }, "右机翼");
part.transform("WingMirror", { transformType: "Mirrored", originals: ["WingPad"], mirrorPlane: XZ_PLANE }, "左机翼镜像");
// Two nacelles per wing at y=4.2 and 8.6: two Pads, one mirror.
for (const y of [4.2, 8.6]) {
const sketch = part.name("NacelleSketch");
part.sketch(sketch, {
profileType: "Circle", parameters: { Radius: 0.55 },
...stationAt(-0.6), position: [-0.6, y, 1.4],
}, `桨舱截面 y=${y}`);
part.feature(part.name("NacellePad"), { featureType: "Pad", profile: sketch, length: 2.6 }, "桨舱");
}
part.transform("NacelleMirror", {
transformType: "Mirrored", originals: ["NacellePad1", "NacellePad2"], mirrorPlane: XZ_PLANE,
}, "桨舱镜像");
part.sketch("StabSketch", {
profileType: "Geometry",
...polygon([[-6.2, 0.5], [-8.4, 0.5], [-8.6, 4.2], [-7.4, 4.2]]),
position: [0, 0, 0.4],
}, "平尾平面");
part.feature("StabilizerPad", { featureType: "Pad", profile: "StabSketch", length: 0.24, midplane: true }, "平尾");
part.transform("StabilizerMirror", { transformType: "Mirrored", originals: ["StabilizerPad"], mirrorPlane: XZ_PLANE }, "平尾镜像");
part.sketch("TailSketch", {
profileType: "Geometry",
...polygon([[-5.8, 0.5], [-8.4, 0.5], [-8.6, 3.8], [-7.2, 3.8]]),
...sideAt(0),
}, "垂尾平面");
part.feature("TailPad", { featureType: "Pad", profile: "TailSketch", length: 0.22, midplane: true }, "垂尾");
// Rotodome on two struts.
for (const x of [-2.4, 2.4]) {
const sketch = part.name("StrutSketch");
part.sketch(sketch, {
profileType: "Circle", parameters: { Radius: 0.16 },
position: [x, 0, 1.2],
}, `旋罩支柱截面 x=${x}`);
part.feature(part.name("StrutPad"), { featureType: "Pad", profile: sketch, length: 3.8 }, "旋罩支柱");
}
part.sketch("RotodomeSketch", {
profileType: "Circle", parameters: { Radius: 5.8 }, position: [0, 0, 5.0],
}, "旋罩截面");
part.feature("RotodomePad", { featureType: "Pad", profile: "RotodomeSketch", length: 1.05 }, "雷达旋罩");
},
};
// ---- 直升机 ----------------------------------------------------------------
function buildHelicopter(part, { rotorSpan }) {
part.sketch("FuseSketch", {
profileType: "Geometry",
...polygon([
[3.6, 0], [3.3, 0.5], [2.4, 1.2], [0.8, 1.65], [-1.2, 1.7],
[-2.6, 1.4], [-3.4, 0.9], [-3.6, 0.2], [-3.6, 0],
]),
...sideAt(0),
}, "机身半剖");
part.feature("Fuselage", { featureType: "Revolution", profile: "FuseSketch", axis: X_AXIS, angle: 360 }, "机身回转");
// Tail boom, tail fin, tail rotor.
// Boom: drawn at the aft end and padded forward into the fuselage so the
// body stays one solid (Pad extrudes along +X from its sketch plane).
part.sketch("BoomSketch", {
profileType: "Circle", parameters: { Radius: 0.33 }, ...stationAt(-11.0),
}, "尾梁截面");
part.feature("TailBoom", { featureType: "Pad", profile: "BoomSketch", length: 7.6 }, "尾梁");
part.sketch("FinSketch", {
profileType: "Geometry", ...polygon([[-9.6, 0.1], [-11.0, 0.1], [-11.2, 2.6], [-10.2, 2.6]]),
...sideAt(0),
}, "尾鳍平面");
part.feature("TailFin", { featureType: "Pad", profile: "FinSketch", length: 0.16, midplane: true }, "尾鳍");
part.sketch("TailRotorSketch", {
profileType: "Circle", parameters: { Radius: 0.9 }, ...stationAt(-10.6), position: [-10.6, 0.5, 1.9],
}, "尾桨截面");
part.feature("TailRotorPad", { featureType: "Pad", profile: "TailRotorSketch", length: 0.1 }, "尾桨");
// Rotor mast: keeps the disc attached to the fuselage roof (one solid) and
// gives the PolarPattern a real hub to turn about.
part.sketch("MastSketch", {
profileType: "Circle", parameters: { Radius: 0.28 }, position: [0.4, 0, 1.4],
}, "旋翼轴截面");
part.feature("RotorMast", { featureType: "Pad", profile: "MastSketch", length: 0.5 }, "旋翼轴");
// Main rotor: one blade, then a four-blade PolarPattern about Z.
part.sketch("BladeSketch", {
profileType: "Geometry", ...band(0, 0, rotorSpan, 0.36, 0), position: [0.4, 0, 1.85],
}, "主旋翼叶片");
part.feature("BladePad", { featureType: "Pad", profile: "BladeSketch", length: 0.07 }, "主旋翼叶片");
part.transform("RotorPattern", {
transformType: "PolarPattern", originals: ["BladePad"],
rotationAxis: Z_AXIS, angle: 360, occurrences: 4,
}, "四叶旋翼");
void rotation;
}
export const helicopters = [
{ document: "CarrierHelicopterA", builder: "aircraft", build: part => buildHelicopter(part, { rotorSpan: 12 }) },
{ document: "CarrierHelicopterB", builder: "aircraft", build: part => buildHelicopter(part, { rotorSpan: 13 }) },
];

View File

@@ -0,0 +1,92 @@
// 飞行甲板(P02)与斜角甲板(P03)。
//
// The flight deck is a 333 m planform: parallel sides amidships, a swept bow,
// a square transom. It is a Pad from one plan sketch, then four elevator wells
// are cut as Pockets, then a row of tie-down fittings is patterned along the
// deck, then the well edges are chamfered -- Pad, Pocket, LinearPattern and
// Chamfer, the four feature kinds the legacy Part-workbench model could not
// express, and the reason the deck is the first trial part of the toolkit.
//
// The angled deck (P03) is a separate strip, like the real ship where it is a
// distinct structure cantilevered over the port side.
import { polygon, band } from "../lib/sketch.mjs";
export const document = "CarrierDeck";
export const builder = "deck";
const DECK_Z = 24;
const DECK_T = 1.5;
// Flight-deck planform, 333 m x 78 m.
const PLAN = [
[-166.5, -39], [-166.5, 39],
[-120, 39], [-60, 39], [0, 39], [60, 38],
[110, 33], [150, 22], [166.5, 8],
[166.5, -8], [150, -22], [110, -33],
[60, -38], [0, -39], [-60, -39], [-120, -39],
];
// Elevator wells: 20 m x 14 m, two rows of two aft of the island.
const WELLS = [
[-20, 26], [-20, -26], [-62, 26], [-62, -26],
];
export function build(part) {
part.sketch("DeckPlan", {
profileType: "Geometry", ...polygon(PLAN), position: [0, 0, DECK_Z],
}, "甲板平面");
part.feature("DeckPad", { featureType: "Pad", profile: "DeckPlan", length: DECK_T }, "甲板板");
const pockets = [];
for (const [x, y] of WELLS) {
const sketch = part.name("WellSketch");
// 20 m along x, 14 m along y, centred on the well.
part.sketch(sketch, {
profileType: "Geometry",
...polygon([[x - 10, y - 7], [x + 10, y - 7], [x + 10, y + 7], [x - 10, y + 7]]),
position: [0, 0, DECK_Z],
}, `升降机井口 (${x}, ${y})`);
const pocket = part.name("WellPocket");
part.feature(pocket, { featureType: "Pocket", profile: sketch, length: DECK_T }, `切除井口 ${pocket}`);
pockets.push(pocket);
}
// The chamfer must come before the fittings: setDressUp sets the body Tip to
// the dress-up feature, so anything added afterwards is chained on top of it.
// With the fittings last, the Tip is the pattern and the final body shape
// really contains all 12 padeyes.
part.dressUp("DeckEdgeChamfer", {
dressUpType: "Chamfer", base: pockets.at(-1), size: 0.25, useAllEdges: true,
}, "井口边缘倒角");
// Tie-down fittings: one 1.2 m padeye on the centre lane (y=14 keeps clear
// of the elevator wells at y=19..33), then a LinearPattern along the ship's
// X axis copies it 12 times over 220 m. The pad starts 0.1 m inside the deck
// (z=25.4, thickness 0.25) so the fuse overlaps instead of resting on a
// coplanar face.
part.sketch("FittingSketch", {
profileType: "Geometry",
...polygon([[-110.6, 13.4], [-109.4, 13.4], [-109.4, 14.6], [-110.6, 14.6]]),
position: [0, 0, DECK_Z + DECK_T - 0.1],
}, "系留桩平面");
part.feature("FittingPad", {
featureType: "Pad", profile: "FittingSketch", length: 0.25,
}, "系留桩");
part.transform("FittingPattern", {
transformType: "LinearPattern", originals: ["FittingPad"],
direction: { object: "X_Axis", subelements: [""] },
length: 220, occurrences: 12,
}, "系留桩阵列");
}
export const angledDeck = {
document: "CarrierAngledDeck",
builder: "deck",
build(part) {
// 240 m strip at 8 deg to port, 24 m wide, 1.2 m thick.
part.sketch("AngledPlan", {
profileType: "Geometry", ...band(-40, -24, 240, 24, 8), position: [0, 0, DECK_Z],
}, "斜角甲板平面");
part.feature("AngledPad", { featureType: "Pad", profile: "AngledPlan", length: 1.2 }, "斜角甲板");
},
};

View File

@@ -0,0 +1,74 @@
// 航空保障:升降机(P06)、弹射器(P07)、拦阻索(P08)。
//
// Three thin structures that only read correctly in plan: the four elevator
// platforms fill the deck wells, the four catapult tracks run bow and waist,
// and the arrestor wires cross the angled deck aft. All of them are built in
// ship coordinates, so the assembly places them at identity.
import { band } from "../lib/sketch.mjs";
const DECK_Z = 24;
const DECK_TOP = DECK_Z + 1.5;
// Elevator well centres, matching parts/deck.mjs.
const WELLS = [
[-20, 26], [-20, -26], [-62, 26], [-62, -26],
];
export const elevators = {
document: "CarrierElevators",
builder: "handling",
build(part) {
for (const [x, y] of WELLS) {
const sketch = part.name("ElevatorSketch");
part.sketch(sketch, {
profileType: "Geometry", ...band(x, y, 20, 14, 0), position: [0, 0, DECK_Z + 0.2],
}, `升降机平台 (${x}, ${y})`);
part.feature(part.name("ElevatorPad"), {
featureType: "Pad", profile: sketch, length: 0.9,
}, "升降机平台");
}
},
};
// Bow cats run fore-aft; waist cats sit at an angle to port, as on the real deck.
const CATS = [
{ x: 118, y: 14, length: 88, angle: 0 },
{ x: 118, y: -14, length: 88, angle: 0 },
{ x: 8, y: 24, length: 76, angle: 0 },
{ x: -30, y: -28, length: 78, angle: 8 },
];
export const catapults = {
document: "CarrierCatapults",
builder: "handling",
build(part) {
for (const cat of CATS) {
const sketch = part.name("CatapultSketch");
part.sketch(sketch, {
profileType: "Geometry",
...band(cat.x, cat.y, cat.length, 3, cat.angle),
position: [0, 0, DECK_TOP],
}, `弹射轨道 (${cat.x}, ${cat.y})`);
part.feature(part.name("CatapultPad"), {
featureType: "Pad", profile: sketch, length: 0.35,
}, "弹射轨道");
}
},
};
// Four wires across the angled deck, 6 m apart.
export const arrestorWires = {
document: "CarrierArrestorWires",
builder: "handling",
build(part) {
for (const x of [-150, -144, -138, -132]) {
const sketch = part.name("WireSketch");
part.sketch(sketch, {
profileType: "Geometry", ...band(x, -18, 56, 0.45, 90), position: [0, 0, DECK_TOP + 0.6],
}, `拦阻索 x=${x}`);
part.feature(part.name("WirePad"), {
featureType: "Pad", profile: sketch, length: 0.25,
}, "拦阻索");
}
},
};

View File

@@ -0,0 +1,30 @@
// 机库(P05):外壳 Pad + 内腔 Pocket。
//
// The hangar deck sits under the flight deck (z 8-24) and is the void the
// elevators open into. Shell first, cavity second. The Pocket needs no
// `reversed` flag: PartDesign::Pocket negates the sketch normal before
// extruding (FeaturePocket::getProfileNormal, App/FeaturePocket.cpp:134-138),
// so the default direction already cuts down into the solid. Reversing it
// would extrude out of the deck and remove nothing.
import { polygon, rectPoints } from "../lib/sketch.mjs";
export const document = "CarrierHangar";
export const builder = "hangar";
export function build(part) {
part.sketch("HangarShellSketch", {
profileType: "Geometry",
...polygon(rectPoints(-40, 0, 200, 34)),
position: [0, 0, 8],
}, "机库外壳平面");
part.feature("HangarShell", { featureType: "Pad", profile: "HangarShellSketch", length: 16 }, "机库外壳");
part.sketch("HangarCavitySketch", {
profileType: "Geometry",
...polygon(rectPoints(-40, 0, 190, 28)),
position: [0, 0, 24],
}, "机库内腔平面");
part.feature("HangarCavity", {
featureType: "Pocket", profile: "HangarCavitySketch", length: 13,
}, "掏空内腔");
}

View File

@@ -0,0 +1,71 @@
// 舰体(P01):9 个横剖面草图 + 放样。
//
// The hull is the one part whose realism cannot come from boxes: a carrier is a
// slender body with a fine bow and a transom stern, and the shape lives in the
// changing cross-section. Nine stations are enough for a smooth loft at this
// scale (333 m), and every station uses the same 13-point half-section mirrored
// about the centreline so OCCT never has to guess how two sections correspond.
//
// Station sketch plane: world YZ at `x` (lib/sketch.mjs stationAt), local
// (u, v) = (height, beam). Loft sections must be distinct sketches in order,
// which is exactly what the kernel validates (PartDesignDocumentWorkflow.cpp
// setFeature, Loft branch).
import { polygon, stationAt } from "../lib/sketch.mjs";
export const document = "CarrierHull";
export const builder = "hull";
// x, half-beam at deck level. Bow 1.5 m, transom 9 m: a 333 m hull.
const STATIONS = [
[-166.5, 9],
[-150, 15],
[-120, 19],
[-60, 21],
[0, 21],
[60, 20],
[110, 16],
[145, 10],
[166.5, 1.5],
];
const DECK = 24;
/** One closed half-section mirrored about y=0, in (height, beam) order. */
function section(half) {
const top = half * 0.86;
return [
[0, 0],
[0.8, half * 0.55],
[3, half * 0.85],
[8, half * 0.97],
[14, half],
[20, half * 0.98],
[DECK, top],
[DECK, -top],
[20, -half * 0.98],
[14, -half],
[8, -half * 0.97],
[3, -half * 0.85],
[0.8, -half * 0.55],
];
}
export function build(part) {
const names = [];
for (const [x, half] of STATIONS) {
const name = part.name("HullSketch");
const shape = polygon(section(half));
part.sketch(name, { profileType: "Geometry", ...shape, ...stationAt(x) }, `横剖面 x=${x}`);
names.push(name);
}
// Loft keeps the first station as its Profile and the rest as Sections
// (PartDesign::Loft is ProfileBased): the kernel rejects a section that is
// the profile itself, so pass names.slice(1).
part.feature("HullLoft", {
featureType: "Loft",
profile: names[0],
sections: names.slice(1),
ruled: false,
closed: false,
}, "舰体放样");
}

View File

@@ -0,0 +1,51 @@
// Registry: every carrier PartDesign document, in build order.
//
// The ids match spec.json and the teaching console lessons. P01-P10 are the
// ship herself (built in ship coordinates, placed at identity); P11-P19 are
// airframes in local coordinates; P20 is deck paint.
import * as hull from "./hull.mjs";
import * as deck from "./deck.mjs";
import * as island from "./island.mjs";
import * as hangar from "./hangar.mjs";
import * as handling from "./handling.mjs";
import * as sensors from "./sensors.mjs";
import { fighters, awacs, helicopters } from "./aircraft.mjs";
import * as markings from "./markings.mjs";
const fighterById = Object.fromEntries(
["P11", "P12", "P13", "P14", "P15", "P16"].map((id, index) => [id, fighters[index]]),
);
const byDocument = [
["P01", hull],
["P02", deck],
["P03", deck.angledDeck],
["P04", island],
["P05", hangar],
["P06", handling.elevators],
["P07", handling.catapults],
["P08", handling.arrestorWires],
["P09", sensors.radar],
["P10", sensors.ciws],
["P11", fighterById.P11],
["P12", fighterById.P12],
["P13", fighterById.P13],
["P14", fighterById.P14],
["P15", fighterById.P15],
["P16", fighterById.P16],
["P17", awacs],
["P18", helicopters[0]],
["P19", helicopters[1]],
["P20", markings],
];
export const parts = byDocument.map(([id, module]) => ({
id,
document: module.document,
builder: module.builder,
build: module.build,
}));
export function partFor(key) {
return parts.find(part => part.id === key || part.document === key) ?? null;
}

View File

@@ -0,0 +1,61 @@
// 舰岛(P04):塔式分层结构。
//
// A carrier island is a stack of shrinking decks -- base, tower, bridge -- with
// a funnel aft and a mast on top. Each tier is its own plan sketch on its own
// plane, which is how the real structure is drawn: no boolean of boxes, just
// four Pads anchored at rising heights. The bridge top gets a Chamfer so the
// silhouette is not a raw extrusion.
import { polygon, rectPoints, circle } from "../lib/sketch.mjs";
export const document = "CarrierIsland";
export const builder = "island";
const DECK_Z = 24;
// Starboard side, slightly aft of midships.
const CX = -4;
const CY = 28;
const TIERS = [
{ name: "IslandBase", cx: CX, cy: CY, w: 36, h: 14, z: DECK_Z, t: 12 },
{ name: "IslandTower", cx: CX + 2, cy: CY, w: 28, h: 12, z: DECK_Z + 12, t: 10 },
{ name: "IslandBridge", cx: CX + 4, cy: CY, w: 18, h: 10, z: DECK_Z + 22, t: 7 },
];
export function build(part) {
let last = null;
for (const tier of TIERS) {
const sketch = part.name("IslandSketch");
part.sketch(sketch, {
profileType: "Geometry",
...polygon(rectPoints(tier.cx, tier.cy, tier.w, tier.h)),
position: [0, 0, tier.z],
}, `${tier.name} 平面 z=${tier.z}`);
part.feature(tier.name, { featureType: "Pad", profile: sketch, length: tier.t }, `塔体 ${tier.name}`);
last = tier.name;
}
// Funnel: a 7 x 6 m uptake on the base, aft of the tower.
part.sketch("FunnelSketch", {
profileType: "Geometry",
...polygon(rectPoints(CX - 17, CY, 7, 6)),
position: [0, 0, DECK_Z],
}, "烟囱平面");
part.feature("IslandFunnel", { featureType: "Pad", profile: "FunnelSketch", length: 18 }, "烟囱");
// Mast: 1.3 m radius tube rising 14 m above the bridge.
part.sketch("MastSketch", {
profileType: "Circle",
parameters: { Radius: 1.3 },
position: [CX - 8, CY, DECK_Z + 29],
}, "桅杆截面");
part.feature("IslandMast", { featureType: "Pad", profile: "MastSketch", length: 14 }, "桅杆");
// 0.25 m survives the fused tier stack; 0.5 m makes OCCT fail the chamfer on
// the short edges where the mast meets the bridge (measured, probe run
// 2026-11-25: size=0.5 -> BRep_API command not done, 0.25/0.12 -> done).
part.dressUp("BridgeChamfer", {
dressUpType: "Chamfer", base: last, size: 0.25, useAllEdges: true,
}, "舰桥顶倒角");
void circle;
}

View File

@@ -0,0 +1,38 @@
// 甲板标线(P20):中心线、降落区框、甲板边缘线。
//
// Paint is geometry in PartDesign too: each marking is a 3 cm Pad sitting on
// the flight deck. The landing-area frame is one sketch made of four merged
// bands, so the whole frame is a single feature rather than four.
import { band, merge } from "../lib/sketch.mjs";
export const document = "CarrierMarkings";
export const builder = "markings";
const TOP = 25.5;
const PAINT = 0.03;
export function build(part) {
part.sketch("CenterlineSketch", {
profileType: "Geometry", ...band(0, 0, 320, 0.9, 0), position: [0, 0, TOP],
}, "甲板中心线");
part.feature("CenterlinePad", { featureType: "Pad", profile: "CenterlineSketch", length: PAINT }, "中心线");
// Landing area frame: 200 m long, 32 m wide, centred at x = -40.
const frame = merge(
band(-40, 16, 200, 0.6, 0),
band(-40, -16, 200, 0.6, 0),
band(-140, 0, 32.6, 0.6, 90),
band(60, 0, 32.6, 0.6, 90),
);
part.sketch("LandingFrameSketch", {
profileType: "Geometry", ...frame, position: [0, 0, TOP],
}, "降落区边框");
part.feature("LandingFramePad", { featureType: "Pad", profile: "LandingFrameSketch", length: PAINT }, "降落区边框");
// Port and starboard deck-edge lines.
const edges = merge(band(0, 37, 300, 0.5, 0), band(0, -37, 300, 0.5, 0));
part.sketch("DeckEdgeSketch", {
profileType: "Geometry", ...edges, position: [0, 0, TOP],
}, "甲板边缘线");
part.feature("DeckEdgePad", { featureType: "Pad", profile: "DeckEdgeSketch", length: PAINT }, "甲板边缘线");
}

View File

@@ -0,0 +1,68 @@
// 传感与武器:相控阵雷达(P09)与近防炮(P10)。
//
// The radar is a pedestal, a flat array face and a back frame; the CIWS is a
// local-coordinate mount (base, housing, two barrels) that the assembly drops
// onto the starboard deck edge. Both keep every dimension in metres so the
// parts can be checked against the ship drawing.
import { polygon, rectPoints, circle } from "../lib/sketch.mjs";
const ISLAND_TOP = 53;
const RADAR_Y = 28;
export const radar = {
document: "CarrierRadar",
builder: "sensors",
build(part) {
// Pedestal drum on the bridge top.
part.sketch("RadarPedestalSketch", {
profileType: "Circle", parameters: { Radius: 2.2 }, position: [4, RADAR_Y, ISLAND_TOP],
}, "雷达基座截面");
part.feature("RadarPedestal", { featureType: "Pad", profile: "RadarPedestalSketch", length: 3 }, "雷达基座");
// Array face: 7 m wide, 5 m tall, 0.6 m thick, lookng forward.
part.sketch("RadarFaceSketch", {
profileType: "Geometry",
...polygon(rectPoints(4, ISLAND_TOP + 5.5, 7, 5)),
position: [0, RADAR_Y, 0],
placementRotation: [Math.SQRT1_2, 0, 0, Math.SQRT1_2],
}, "阵面草图");
part.feature("RadarFace", { featureType: "Pad", profile: "RadarFaceSketch", length: 0.6 }, "相控阵面");
// Back frame so the array does not look like a floating card.
part.sketch("RadarFrameSketch", {
profileType: "Circle", parameters: { Radius: 0.6 }, position: [4, RADAR_Y + 0.9, ISLAND_TOP + 3],
}, "阵面支架截面");
part.feature("RadarFrame", { featureType: "Pad", profile: "RadarFrameSketch", length: 2.4 }, "阵面支架");
void circle;
},
};
export const ciws = {
document: "CarrierCiws",
builder: "sensors",
build(part) {
// Local origin at the deck contact point.
part.sketch("CiwsBaseSketch", {
profileType: "Circle", parameters: { Radius: 2.6 }, position: [0, 0, 0],
}, "炮座截面");
part.feature("CiwsBase", { featureType: "Pad", profile: "CiwsBaseSketch", length: 1.4 }, "炮座");
part.sketch("CiwsHousingSketch", {
profileType: "Geometry", ...polygon(rectPoints(0, 0, 4.4, 2.6)), position: [0, 0, 1.4],
}, "炮塔壳体");
part.feature("CiwsHousing", { featureType: "Pad", profile: "CiwsHousingSketch", length: 2.2 }, "炮塔壳体");
// Two barrels along +X, 1.4 m apart.
for (const y of [-0.7, 0.7]) {
const sketch = part.name("BarrelSketch");
part.sketch(sketch, {
profileType: "Circle", parameters: { Radius: 0.22 },
position: [2.2, y, 2.4],
placementRotation: [0, Math.SQRT1_2, 0, Math.SQRT1_2],
}, `炮管截面 y=${y}`);
part.feature(part.name("BarrelPad"), {
featureType: "Pad", profile: sketch, length: 3.6,
}, "炮管");
}
},
};

View File

@@ -0,0 +1,71 @@
{
"schema": "freecad-web-carrier-partdesign-spec/v1",
"title": "航空母舰 PartDesign 建件清单",
"units": "m",
"dimensions": { "length": 333, "beam": 78, "height": 67, "draft": 12, "displacementT": 98257 },
"systems": {
"hull-structure": "舰体结构",
"angled-deck": "斜角甲板",
"flight-deck": "飞行甲板",
"island": "舰岛上层建筑",
"hangar": "机库",
"aircraft-handling": "航空保障(升降机/弹射器/拦阻索)",
"sensors": "雷达与传感",
"weapons": "近防武器",
"air-fighter": "舰载战斗机",
"air-awacs": "舰载预警机",
"air-rotor": "舰载直升机",
"markings": "甲板标线"
},
"parts": [
{ "id": "P01", "document": "CarrierHull", "title": "舰体", "system": "hull-structure",
"module": "parts/hull.mjs", "featureTypes": ["Loft"] },
{ "id": "P02", "document": "CarrierDeck", "title": "飞行甲板", "system": "flight-deck",
"module": "parts/deck.mjs", "featureTypes": ["Pad", "Pocket", "Chamfer"] },
{ "id": "P03", "document": "CarrierAngledDeck", "title": "斜角甲板", "system": "angled-deck",
"module": "parts/deck.mjs", "featureTypes": ["Pad"] },
{ "id": "P04", "document": "CarrierIsland", "title": "舰岛", "system": "island",
"module": "parts/island.mjs", "featureTypes": ["Pad", "Chamfer"] },
{ "id": "P05", "document": "CarrierHangar", "title": "机库", "system": "hangar",
"module": "parts/hangar.mjs", "featureTypes": ["Pad", "Pocket"] },
{ "id": "P06", "document": "CarrierElevators", "title": "升降机", "system": "aircraft-handling",
"module": "parts/handling.mjs", "featureTypes": ["Pad"], "placement": { "position": [0, 0, 0], "heading": 0 } },
{ "id": "P07", "document": "CarrierCatapults", "title": "弹射器", "system": "aircraft-handling",
"module": "parts/handling.mjs", "featureTypes": ["Pad"], "placement": { "position": [0, 0, 0], "heading": 0 } },
{ "id": "P08", "document": "CarrierArrestorWires", "title": "拦阻索", "system": "aircraft-handling",
"module": "parts/handling.mjs", "featureTypes": ["Pad"], "placement": { "position": [0, 0, 0], "heading": 0 } },
{ "id": "P09", "document": "CarrierRadar", "title": "相控阵雷达", "system": "sensors",
"module": "parts/sensors.mjs", "featureTypes": ["Pad"], "placement": { "position": [0, 0, 0], "heading": 0 } },
{ "id": "P10", "document": "CarrierCiws", "title": "近防炮", "system": "weapons",
"module": "parts/sensors.mjs", "featureTypes": ["Pad"], "placement": { "position": [60, 28, 25.5], "heading": 0 } },
{ "id": "P11", "document": "CarrierFighterA", "title": "舰载战斗机 A", "system": "air-fighter",
"module": "parts/aircraft.mjs", "featureTypes": ["Revolution", "Pad", "Mirrored"],
"placement": { "position": [-60, 20, 25.5], "heading": 0 } },
{ "id": "P12", "document": "CarrierFighterB", "title": "舰载战斗机 B", "system": "air-fighter",
"module": "parts/aircraft.mjs", "featureTypes": ["Revolution", "Pad", "Mirrored"],
"placement": { "position": [-60, -20, 25.5], "heading": 0 } },
{ "id": "P13", "document": "CarrierFighterC", "title": "舰载战斗机 C", "system": "air-fighter",
"module": "parts/aircraft.mjs", "featureTypes": ["Revolution", "Pad", "Mirrored"],
"placement": { "position": [-100, 20, 25.5], "heading": 0 } },
{ "id": "P14", "document": "CarrierFighterD", "title": "舰载战斗机 D", "system": "air-fighter",
"module": "parts/aircraft.mjs", "featureTypes": ["Revolution", "Pad", "Mirrored"],
"placement": { "position": [-100, -20, 25.5], "heading": 0 } },
{ "id": "P15", "document": "CarrierFighterE", "title": "舰载战斗机 E", "system": "air-fighter",
"module": "parts/aircraft.mjs", "featureTypes": ["Revolution", "Pad", "Mirrored"],
"placement": { "position": [30, 24, 25.5], "heading": 45 } },
{ "id": "P16", "document": "CarrierFighterF", "title": "舰载战斗机 F", "system": "air-fighter",
"module": "parts/aircraft.mjs", "featureTypes": ["Revolution", "Pad", "Mirrored"],
"placement": { "position": [62, -20, 25.5], "heading": 180 } },
{ "id": "P17", "document": "CarrierAwacs", "title": "舰载预警机", "system": "air-awacs",
"module": "parts/aircraft.mjs", "featureTypes": ["Revolution", "Pad", "Mirrored"],
"placement": { "position": [105, 0, 25.5], "heading": 0 } },
{ "id": "P18", "document": "CarrierHelicopterA", "title": "舰载直升机 A", "system": "air-rotor",
"module": "parts/aircraft.mjs", "featureTypes": ["Revolution", "Pad", "PolarPattern"],
"placement": { "position": [-130, 18, 25.5], "heading": 0 } },
{ "id": "P19", "document": "CarrierHelicopterB", "title": "舰载直升机 B", "system": "air-rotor",
"module": "parts/aircraft.mjs", "featureTypes": ["Revolution", "Pad", "PolarPattern"],
"placement": { "position": [-130, -18, 25.5], "heading": 0 } },
{ "id": "P20", "document": "CarrierMarkings", "title": "甲板标线", "system": "markings",
"module": "parts/markings.mjs", "featureTypes": ["Pad"], "placement": { "position": [0, 0, 0], "heading": 0 } }
]
}

File diff suppressed because one or more lines are too long

View File

@@ -216,7 +216,7 @@
</li>
</ol>
<p><a class="cta" href="runner.html">打开可视化执行页</a><a class="cta" href="console.html">打开教学控制台(按工作台课程在线运行真实用例)</a><a class="cta secondary" href="features.html">查看 32 个模块的功能列表</a><a class="cta" href="cases/engine-block.html">案例教学:4 缸发动机缸体</a><a class="cta secondary" href="cases/t1-replica.html">案例教学:照 t1.stp 复刻零件</a><a class="cta secondary" href="cases/secondary-reducer.html">案例教学:二级齿轮减速器(界面操作)</a><a class="cta" href="cases/reducer-course.html">视频课程:二级减速器生产级建模(12 集)</a><a class="cta secondary" href="reducer-manual.html">初学者手册:二级减速器</a><a class="cta" href="cases/reducer-replay.html">过程可视化:二级减速器建模回放(24 件 + 装配)</a><a class="cta" href="cases/reducer-parts-course.html">逐零件建模过程视频(23 集 + 中文配音)</a><a class="cta secondary" href="reducer-parts-manual.html">零件设计入门:图文教案(14 章)</a><a class="cta" href="fcweb-toolkit.html">工具库:建零件与装配的通用工具(API 指南)</a><a class="cta secondary" href="reducer-toolkit.html">工具:有头创建二级减速器(按零件分步 + 初学者讲义)</a><a class="cta" href="cases/assembly-tolerance.html">案例教学:装配公差分析(初学者)</a><a class="cta" href="cases/cam-teaching.html">案例教学:三轴 CAM(初学者)</a><a class="cta" href="cases/carrier.html">案例教学:航空母舰(含培训视频)</a><a class="cta" href="cases/fem-cantilever.html">案例教学:FEM 悬臂梁(应力云图)</a><a class="cta" href="cases/production-line.html">案例教学:三维产线(有头界面 + MCP)</a><a class="cta" href="cases/abb120-line.html">案例教学:ABB IRB 120 产线(MCP)</a><a class="cta" href="cases/production-line-course.html">视频课程:27 件 GLB 产线建模(18 集)</a><a class="cta secondary" href="z-up-verification.html">Three.js Z-up 验证报告</a><a class="cta" href="http://127.0.0.1:5180/bim-workshop.html">BIM 厂房车间(30×18m)</a><a class="cta secondary" href="bim-workshop-tutorial.html">BIM 厂房教程</a><a class="cta secondary" href="bim-workshop-manual.html">BIM 厂房初学者手册(视频)</a><a class="cta secondary" href="http://127.0.0.1:5180/workbench.html?module=Inspection&amp;command=inspection.createRecompute" target="_blank" rel="noopener">直接打开这条案例</a></p>
<p><a class="cta" href="runner.html">打开可视化执行页</a><a class="cta" href="console.html">打开教学控制台(按工作台课程在线运行真实用例)</a><a class="cta secondary" href="features.html">查看 32 个模块的功能列表</a><a class="cta" href="cases/engine-block.html">案例教学:4 缸发动机缸体</a><a class="cta secondary" href="cases/t1-replica.html">案例教学:照 t1.stp 复刻零件</a><a class="cta secondary" href="cases/secondary-reducer.html">案例教学:二级齿轮减速器(界面操作)</a><a class="cta" href="cases/reducer-course.html">视频课程:二级减速器生产级建模(12 集)</a><a class="cta secondary" href="reducer-manual.html">初学者手册:二级减速器</a><a class="cta" href="cases/reducer-replay.html">过程可视化:二级减速器建模回放(24 件 + 装配)</a><a class="cta" href="cases/reducer-parts-course.html">逐零件建模过程视频(23 集 + 中文配音)</a><a class="cta secondary" href="reducer-parts-manual.html">零件设计入门:图文教案(14 章)</a><a class="cta" href="fcweb-toolkit.html">工具库:建零件与装配的通用工具(API 指南)</a><a class="cta secondary" href="reducer-toolkit.html">工具:有头创建二级减速器(按零件分步 + 初学者讲义)</a><a class="cta" href="cases/assembly-tolerance.html">案例教学:装配公差分析(初学者)</a><a class="cta" href="cases/cam-teaching.html">案例教学:三轴 CAM(初学者)</a><a class="cta" href="cases/carrier.html">案例教学:航空母舰(含培训视频)</a><a class="cta secondary" href="carrier-toolkit.html">工具:有头创建航空母舰(20 件 PartDesign + 装配)</a><a class="cta" href="cases/fem-cantilever.html">案例教学:FEM 悬臂梁(应力云图)</a><a class="cta" href="cases/production-line.html">案例教学:三维产线(有头界面 + MCP)</a><a class="cta" href="cases/abb120-line.html">案例教学:ABB IRB 120 产线(MCP)</a><a class="cta" href="cases/production-line-course.html">视频课程:27 件 GLB 产线建模(18 集)</a><a class="cta secondary" href="z-up-verification.html">Three.js Z-up 验证报告</a><a class="cta" href="http://127.0.0.1:5180/bim-workshop.html">BIM 厂房车间(30×18m)</a><a class="cta secondary" href="bim-workshop-tutorial.html">BIM 厂房教程</a><a class="cta secondary" href="bim-workshop-manual.html">BIM 厂房初学者手册(视频)</a><a class="cta secondary" href="http://127.0.0.1:5180/workbench.html?module=Inspection&amp;command=inspection.createRecompute" target="_blank" rel="noopener">直接打开这条案例</a></p>
</section>
<section id="gallery">

View File

@@ -35,6 +35,8 @@ const PROBE_ENTRY = path.join(REPO_ROOT, "tools/layout-probe.mjs");
const HOST_ENTRY = path.join(REPO_ROOT, "tools/static-host.mjs");
const REDUCER_PART = path.join(REPO_ROOT, "tools/reducer/create-part.mjs");
const REDUCER_ASSEMBLY = path.join(REPO_ROOT, "tools/reducer/create-assembly.mjs");
const CARRIER_PART = path.join(REPO_ROOT, "tools/carrier/create-part.mjs");
const CARRIER_ASSEMBLY = path.join(REPO_ROOT, "tools/carrier/create-assembly.mjs");
const LINE_LIMIT = 2000;
const BYTE_LIMIT = 512 * 1024;
@@ -47,6 +49,10 @@ const TIMEOUTS = {
// A 26-step cover part takes ~10 min headed; leave room without hanging forever.
"reducer-part": 40 * 60_000,
"reducer-assembly": 45 * 60_000,
// Carrier parts are heavier (deck chamfers and lofts compute for tens of
// seconds each); the 14-step deck measured ~9.5 min headed.
"carrier-part": 45 * 60_000,
"carrier-assembly": 60 * 60_000,
};
export class JobError extends Error {
@@ -209,6 +215,17 @@ export function buildJobArgv(lesson, params = {}, { jobDir } = {}) {
if (job.kind === "reducer-assembly") {
return { argv: [process.execPath, REDUCER_ASSEMBLY, "--out", jobDir, "--json"], dir: jobDir };
}
if (job.kind === "carrier-part") {
const partId = String(job.partId ?? "");
if (!/^P\d{2}$/.test(partId)) throw new JobError("E_PARAM", `非法零件编号:${partId.slice(0, 20)}`);
const argv = [process.execPath, CARRIER_PART, partId];
if (job.dry) argv.push("--dry");
argv.push("--out", jobDir, "--json");
return { argv, dir: jobDir };
}
if (job.kind === "carrier-assembly") {
return { argv: [process.execPath, CARRIER_ASSEMBLY, "--out", jobDir, "--json"], dir: jobDir };
}
throw new JobError("E_PARAM", `未知课程类型:${job.kind}`);
}
@@ -389,6 +406,35 @@ export function createRunner({ root = CONSOLE_ROOT } = {}) {
else if (job.timedOut) job.verdict = "timeout";
else if (!report) job.verdict = code === 2 ? "precondition_fail" : "run_fail";
else job.verdict = report.verdict;
} else if (job.kind === "carrier-part" || job.kind === "carrier-assembly") {
const report = readJson(path.join(job.dir, "report.json")).value;
const isPart = job.kind === "carrier-part";
const label = isPart ? (report?.part?.id ?? "part") : (report?.document ?? "assembly");
job.progress = {
...job.progress,
planned: 1,
completed: 1,
results: report ? [{
id: label,
title: isPart ? (report.part?.title ?? report.part?.document ?? "零件")
: (report.label ?? "装配"),
status: report.verdict === "pass" ? "passed" : report.verdict === "product_fail" ? "failed" : "blocked",
seconds: report.seconds ?? null,
// Distinguish "the geometry differs" from "nothing ran at all": the
// first is a product regression, the second a broken precondition.
error: report.verdict === "product_fail"
? (isPart && report.volumeMatches === false
? `体积 ${report.volume} ≠ 记录 ${report.expectedVolume}`
: (isPart
? `有步骤失败:${report.steps}/${report.stepsTotal} 步完成`
: `插入 ${report.inserted},关节 ${report.joints},畸形组件 ${report.malformedComponents}`))
: (report.fatal ?? null),
}] : [],
};
if (job.cancelled) job.verdict = "cancelled";
else if (job.timedOut) job.verdict = "timeout";
else if (!report) job.verdict = code === 2 ? "precondition_fail" : "run_fail";
else job.verdict = report.verdict;
} else if (job.kind === "host") {
// The host lesson succeeds once ORIGIN is printed; an explicit user
// cancel still reads as cancelled even if that already happened.
@@ -446,6 +492,7 @@ export function createRunner({ root = CONSOLE_ROOT } = {}) {
lines: [], bytes: 0, partial: { stdout: "", stderr: "" },
progress: {
planned: entry.job.kind === "reducer-part" || entry.job.kind === "reducer-assembly"
|| entry.job.kind === "carrier-part" || entry.job.kind === "carrier-assembly"
? 1
: entry.job.selectable ? (params.only?.length ?? 0) : (entry.job.only?.length ?? 0),
completed: 0, current: null, counts: null, results: [],