The manual claimed 32 modules and taught several workflows that do not run in the web port. Rewrite the chapter bodies and drive every new screenshot from a real interaction with a waitFor before each shot. Screenshots go from 33 to 63. ch06-ch13 grow from one page snapshot each to 3-7 shots taken in headed Chrome, all with empty pageErrors and consoleErrors and every PNG well above the 5 KB bar. Correct the text where the port differs from the desktop: - ch08: Mesh_FromPartShape has no task panel, so the main line becomes Mesh_BuildRegularSolid, which really returns typeId Mesh::Cube. - ch09: no BIM creation command has a panel; only Library, Setup, Material and Views are usable. - ch10: CAM_Job offers only None in its Model select and fails with cam_command_failed. - ch11: the recorded error was Document does not exist; the real one is invalid_request: Select source objects in the current document, and PageDefault cannot create a page at all. - ch12: FEM_Analysis has no panel, so the chain breaks at step one. - ch13: drop every OpenSCAD scene action and screenshot; Robot jog buttons, the Plot canvas and Draft viewport picking do not work, so the chapter documents the panels instead of pretending they run. Rebuild gives 15 chapters, 1575 command rows, 1721 search entries and 945197 bytes; check:manual passes both viewports with no errors, no broken images and no horizontal overflow. The gap ledger goes from 7 to 11 boundaries. Remove b-openscad-recompile, which should not exist while the workbench is removed, and record the five newly measured ones: BIM creation, Mesh_FromPartShape, Draft viewport picking, Robot without a model and Plot without a canvas. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
7.7 KiB
Web FreeCAD 全功能初学者教案 · 接续点
更新:2026-11-15
计划:/home/mes123456/.claude/plans/sleepy-whistling-journal.md(完全重写)
目标
单页中文 HTML 教案,两层结构:入门主线(第 0–7 章)+ 全模块速查(第 8–13 章 + 附录)。 图文并茂,内容完全对标语实测的软件功能;缺口按实测记账,不虚报。
本轮重写范围(2026-11-15)
截图:33 张 → 63 张
ch06–ch13 的场景从「一句话 + 一张页面截图」改成真操作驱动:每个新增截图前
都有 waitFor 断言 + 真实点击/填写,避免空页面截图。
| 章 | 图数 | 场景做法 |
|---|---|---|
| ch06 | 1 → 5 | project.html 新建 Document → Workbench 切 Spreadsheet → Create spreadsheet;再依次打开 MassProperties(含 Refresh 前后)、Material_Edit、SetAppearance |
| ch07 | 1 → 3 | 新建 Document → File → Open / import / export → 展开 file-tools 折叠面板;再切 Import 工作台 |
| ch08 | 1 → 5 | Mesh_BuildRegularSolid 填 40/30/20 → Preview → Create(实测返回 typeId: Mesh::Cube)→ Mesh_Evaluation → Analyze Indices → Mesh_Export |
| ch09 | 1 → 5 | BIM 模块页 → BIM_Library → BIM_Setup(Read current preferences 前后)→ BIM_Material |
| ch10 | 1 → 4 | CAM_Job / CAM_Profile / CAM_Pocket_Shape / CAM_Post 四个面板 |
| ch11 | 1 → 4 | TechDraw 页面 → View 面板(填 7 个字段)→ 提交返回错误 → SectionView 面板 |
| ch12 | 1 → 7 | MaterialSolid 空面板 → 点结构钢预设(实测填入 210000/0.3/7850)→ ConstraintFixed → MeshNetgenFromShape(含提交后)→ SolverRun → ResultShow |
| ch13 | 2 → 6 | Robot_CreateRobot 六分组 → Robot_InsertWaypoint → Draft_Rectangle → Draft_Circle → Plot 面板 → 点 New figure + Add axes 后 |
全部用 --headed 在 DISPLAY=:1 采集,每次运行 pageErrors: []、consoleErrors: [],
所有 PNG 远高于 5 KB 门槛(最小 17 908 B)。
正文:与新截图和实测结论对齐
- ch08 重排为 8.1 实测可走路径 / 8.2 桌面版标准路径。原文把
Mesh_FromPartShape当主线教,实测该命令无面板;改以Mesh_BuildRegularSolid为主线,并给出真实返回值。 - ch09 §9.1 改为「桌面版标准顺序」并前置实测边界:BIM 创建类命令一律无面板, 可用的只有 Library / Setup / Material / Views 四个非创建类命令。
- ch10 §10.1 前置实测边界:
CAM_Job的 Model 下拉只有None,提交返回cam_command_failed: The selected CAM document does not exist;§10.2 改为三个操作面板的结构参考。 - ch11 新增 §11.2「视图命令面板长什么样」:讲 7 个字段与
SectionView的 Section normal;边界改为「页面建不出来」+「视图提交拿不到文档」两条实测。 错误文本从旧的Document does not exist更正为实测的invalid_request: Select source objects in the current document。 - ch12 新增 §12.2「逐步看 Web 端的 FEM 面板」:六步逐面板;边界新增
「
FEM_Analysis无面板,链路第一步即断」。 - ch13 完全重写 §13.1–13.3:删除全部 OpenSCAD 场景动作与旧截图; Robot 改成讲面板结构并如实说明点动按钮不改变状态;Plot 说明画布不渲染; Draft 说明需要三维视口取点而壳层页面没有 canvas。
数据口径修正
旧接续点写的「32 个模块 / 1602 条命令 / 1736 搜索项」已过期。本轮实测口径:
- 31 个 Web 可路由模块(不含 OpenSCAD)
- 矩阵 1492 条:
native_handler196 /restricted1296 /not_implemented0 - 不存在
uiStatus字段;早期「96 条可交互命令」来自旧注册表,不得再引用 - 构建产物:15 章 / 1575 命令行 / 1721 搜索项 / 945 197 字节
验证结果(2026-11-15)
npm run build:manual → {"ok":true,"chapters":15,"sections":15,"commands":1575,
"searchEntries":1721,"bytes":945197}
npm run check:manual → ok:true;两个视口均 errors:[] failed:[] brokenImages:[] overflow:0
1440×900 与 390×844 各 63 images / 131 sections
图片引用自检:grep manual-assets 得到 61 条正文引用,全部存在,0 缺失。
未被引用的 7 张图是 ch01/ch03 的历史遗留(03-placement、07-summary、
02-sketch-editor、04-constraint-space、04-preview、05-closed、06-closed),
不是本轮产物,暂不处理。
OpenSCAD 自检:manual/scenarios/ 0 处;manual/content/ 4 处,
全部是「Web 端不支持 / 不提供」的否定说明;data/gap-ledger.json 0 处
(已删除 b-openscad-recompile 这条违反摘除规则的边界条目)。
缺口账本变化
manual/data/gap-ledger.json:7 → 11 条边界,全部带 measuredAt: 2026-11-15。
删除 1 条:b-openscad-recompile(OpenSCAD 整体不实现,不应留在账本里)。
更新 3 条(按本轮实测文本):
b-techdraw-worker、b-fem-native、b-cam-opencamlib。
新增 5 条:b-bim-no-creation、b-mesh-frompartshape、b-draft-needs-viewport、
b-robot-no-model、b-plot-no-canvas。
notes 由 3 条增至 6 条,新增:本轮重写范围说明、两套页面壳不可互换的结论、 「字段面板能提交但缺父对象文档属前置未满足,不记产品回归」的判定口径。
真实残余
- 两套页面壳不可互换:
project.html能新建 Document 且工作台下拉给 30 个工作台;workbench.html?module=X对多数模块绑定固定文档 idworkbench-document(src/workbench-shell.tsx:1866),既不能新建也不能打开文档。跨页跳转会丢文档。 这是 ch09–ch12 只能取证面板、不能跑完整工作流的根因。 - Sketcher 布局缺口仍在(计划第 4 步):草图编辑器嵌在属性栏,面板窄且需滚动, 可用 React 移到主舞台。本轮未动,仍记为待修。
- ch01/ch03 的 7 张历史遗留图未被正文引用,可考虑删除或补引用。
manual/data/final-status.json与docs/current/web-freecad-manual-gaps.md仍是 2026-11-13 的 32 模块口径,本轮未回写。- 本轮改动尚未提交。计划是等用户确认后单独一个提交,只提交
manual/content/、manual/scenarios/、manual/assets/下新增/替换的 PNG、manual/data/gap-ledger.json、manual/CONTINUATION.md; 不提交 1.8 GB 的web/teaching/产物。 web/continuationNotes.md的改动仍来自上一阶段,未提交。
下一步精确入口
- 用户确认后提交本轮教案改动(排除
web/teaching/)。 - 可选:用 React 把 Sketcher 编辑器移到主舞台,修 §3 布局边界, 然后重采 ch03 截图。
- 可选:回写
final-status.json与docs/current/web-freecad-manual-gaps.md到 31 模块口径。 - 复现命令(cwd 必须是
web/,playwright 装在web/node_modules):cd /home/mes123456/FreeCADWasmDev/working/FreeCAD/web DISPLAY=:1 node tools/manual/capture.mjs --scenario manual/scenarios/ch08-mesh.json \ --headed --origin http://127.0.0.1:5181 npm run build:manual && npm run check:manual
关键路径
- 应用:
http://127.0.0.1:5181/project.html(主壳)、http://127.0.0.1:5181/workbench.html?module=X&command=Y(工作台壳) - 教学服务:
http://127.0.0.1:5190/manual.html - 矩阵输入:
web/public/api/workbench-command-matrix.json、web/src/module-registry.generated.ts - 截图:
web/manual/assets/<chapter>/<workflow>/ - 证据:
web/manual/data/capture/<chapter>-<workflow>.json - 采集器 DSL:
web/tools/manual/capture.mjs(支持goto/waitFor/click/fill/select/press/clickCanvas/assertText/wait/shot/...)