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>
3.9 KiB
3.9 KiB
id, order, title, level
| id | order | title | level |
|---|---|---|---|
| ch14 | 14 | 综合案例:27 件 GLB 产线 | case |
第 14 章 综合案例:27 件 GLB 产线
案例成果
这是前面所有章节的综合复盘:把 working/GLTFmodel 里的 27 个 GLB 参考模型,
在 Web FreeCAD 中重建为 27 个模型 / 88 个图元部件,并配 18 集中文课程。
| 项目 | 结果 |
|---|---|
| 参考 GLB | 27 个(约 197 MB) |
| 重建模型 | 27 个 |
| 教学部件 | 88 个 Box / Cylinder |
| 课程 | 18 集(脚本、驱动、冒烟、成片) |
| 成片 | 18/18,MP4 / WebM / VTT / SRT / 海报,约 760 MB |
| 总装 | 88 条链接 |
| 审计 | 88/88 部件通过;27/27 模型 |
| 交付 | FCStd / STEP / STL / 课程页 / 参考页 / 交互页 |
14.1 完整工作流
- 参考解析:解析 GLB 的 JSON / BIN 结构,确认单位(米)、轴向(Z-up)
与根矩阵,生成
line-spec.json(模型、部件、世界包围盒、颜色)。 - 测量与零件表:用参考查看器读包围盒,在 Spreadsheet 里记录米→毫米换算。
- 逐工位建模:按柜体、上料、输送、抓取、推料、检测、机器人、地面的顺序 创建 88 个部件;每完成一集保存一个累计检查点。
- 总装:创建
LineAssembly,插入 88 条链接。 - 审计与交付:对 88 个部件做包围盒、中心、颜色断言,再导出 STEP / STL。
- 课程页:18 个视频、分步截图、参数表、检查点下载与学习进度。
顺序不能乱:先有规格表才有建模,先有部件才有总装,先有审计才谈交付。
14.2 关键经验
- 先量化再建模:参考表、部件数量、包围盒先定下来,再动手。凭感觉建 88 个件必翻车。
- 图元近似、尺寸精确:复杂铸件用 Box / Cylinder 组合,逐件断言包围盒与颜色, 而不是追求外形神似。
- 每集一个检查点:失败只重做该集,不用推倒整条线。
- 颜色要取证:FCStd 的
Document.xml里WebDisplayColor保存#rrggbb, 这是颜色是否真的落盘的唯一证据。 - 大文档视口有边界:重新打开 88 个对象的文档可能只渲染部分网格; 最终展示用 STL + three.js,不要依赖编辑器视口。
- 边界如实记录:glTF 原生导入导出不可用(第 7.4 节),参考查看走 three.js。
14.3 证据与入口
- 课程页:
web/teaching/cases/production-line-course.html - 参考页:
web/teaching/cases/production-line-reference.html - 交互页:
web/teaching/cases/production-line-assembly.html - 规格文件:
web/tools/line-course/line-spec.json - 收口状态:
web/tools/line-course/evidence/final-status.json - 媒体目录:
web/teaching/media/line-course/
自检
- 能说出 27 / 88 / 18 这三个数字分别指什么。
- 知道参考 GLB 使用 Z-up 与米制。
- 能解释“图元近似、尺寸精确”这条验收口径。
- 知道总装是 88 条链接,不是 88 份几何副本。
- 知道 glTF 原生导入属于边界。
常见错误
- 把 GLB 当成能直接导入的 CAD 实体(它只能被 three.js 查看)。
- 用单个 Box 代替整台机器,丢掉工位结构。
- 不存累计检查点,改一处就要重做全部。
- 只看截图不做包围盒与颜色断言,问题留到总装才暴露。
- 依赖编辑器视口展示 88 个对象,结果只渲染出一部分。
练习
- 任选一个工位,按
line-spec.json重建它的 2–3 个部件。 - 用
Part_CheckGeometry检查一个部件,记录面数与三角面数。 - 打开交互页,按工位筛选并截图。
- 把重建结果导出 STEP,再用第 7 章的方法导入回来,比较包围盒是否一致。

