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>
103 lines
5.1 KiB
Markdown
103 lines
5.1 KiB
Markdown
---
|
||
id: ch11
|
||
order: 11
|
||
title: TechDraw 工程图
|
||
level: specialist
|
||
---
|
||
|
||
# 第 11 章 TechDraw 工程图
|
||
|
||
## 能力概览
|
||
|
||
TechDraw 把三维模型投影成二维工程图:页面、视图、标注、导出四段。
|
||
工程图是有标准的交付物,与截图不是一回事。
|
||
|
||
| 类别 | 命令 |
|
||
|---|---|
|
||
| 页面 | `TechDraw_PageDefault`、`TechDraw_PageTemplate` |
|
||
| 视图 | `TechDraw_View`、`ProjectionGroup`、`SectionView`、`DetailView` |
|
||
| 标注 | `TechDraw_Dimension`、`Balloon`、`LeaderLine`、`WeldSymbol`、`SurfaceFinishSymbols` |
|
||
| 填充 | `TechDraw_Hatch`、`GeometricHatch` |
|
||
| 导出 | `TechDraw_ExportPageSVG`、`ExportPageDXF` |
|
||
| 其他 | `ArchView`、`DraftView`、`ActiveView`、`PrintAll` |
|
||
|
||

|
||
|
||
模块页左侧是 31 个 Web 模块的清单,右侧按命令分组列出页面、视图、标注与导出。
|
||
注意"命令出现"不等于"命令可执行",本章 11.2 会逐条给出实测结果。
|
||
|
||
## 11.1 出图工作流(标准顺序,桌面版)
|
||
|
||
下面这条链路是 TechDraw 的标准顺序,Web 端目前只能走到第 3 步之前,
|
||
每一步后面都标注了 Web 实测结果。
|
||
|
||
1. 先准备好实体模型(来自第 2 章 Part 或第 4 章 PartDesign)。
|
||
2. 新建页面:`TechDraw_PageDefault` 生成 A4 页,横向或纵向在属性里改。
|
||
3. 插入视图:`TechDraw_View` 选模型;需要一次出多个视图时用 `ProjectionGroup`。
|
||
4. 加剖视与局部放大:`SectionView`(剖切面 + 方向)、`DetailView`(圈选区域)。
|
||
5. 标注:`TechDraw_Dimension` 标尺寸,`Balloon` 标零件序号,
|
||
`SurfaceFinishSymbols` 标粗糙度,`WeldSymbol` 标焊缝。
|
||
6. 导出 `SVG` 或 `DXF`,或直接打印。
|
||
|
||
视图比例、投影方向、线型都由页面属性控制;改属性后要重新计算才刷新。
|
||
|
||
## 11.2 视图命令面板长什么样
|
||
|
||
`TechDraw_View` 在 Web 端有完整参数面板,字段与桌面一致:
|
||
投影页面、投影源对象、投影方向(X/Y/Z)、水平轴方向、投影比例、投影位置。
|
||
|
||

|
||
|
||
面板能填、能提交,这点与"只有灰按钮"的模块不同。真正的问题是提交之后拿不到文档,
|
||
下一节给出实测证据。
|
||
|
||

|
||
|
||
`SectionView` 的面板同样完整:剖切法向(Section normal)三个分量、页面选择
|
||
(Page / Automatic / Custom)、以及 `Use Selection` 直接从选中对象取剖切面。
|
||
|
||

|
||
|
||
## 11.3 当前 Web 边界
|
||
|
||
**这一章在 Web 端目前不能完整出图**,必须如实说明:
|
||
|
||
- **页面建不出来**:`TechDraw_PageDefault` 的面板里只有 `Image Hatch` 与
|
||
`Geometric Hatch` 两个按钮,没有"新建页面"入口。页面是出图的根对象,
|
||
没有页面,视图、标注、导出全都无从挂载。
|
||
- **视图提交拿不到文档**:在 `TechDraw_View` 里填好投影方向点"创建视图",
|
||
返回文本是 `invalid_request: Select source objects in the current document`。
|
||
面板能收到参数,但页面 Worker 里没有它要的源对象文档——**页面 Worker 与文档
|
||
Worker 之间没有桥**。
|
||
- 目前看到的 SVG 是渲染回退产物,**不是 TechDraw 的正式输出**,不能当图纸交付。
|
||
- 因此本手册把 Web 端 TechDraw 出图标为**边界**,模块页出现命令不等于命令可用。
|
||
|
||
如果需要正式工程图,现阶段请在桌面 FreeCAD 完成,再回到 Web 端继续其他工作。
|
||
|
||
## 边界与注意
|
||
|
||
- 跨 Worker 文档桥缺失是内核级边界,改界面修不好。
|
||
- 不要把视口截图或 SVG 回退当成工程图:它们没有视图投影、没有尺寸标注体系。
|
||
- 模块页的命令清单来自命令矩阵,包含尚未接通执行通道的条目。
|
||
|
||
## 自检
|
||
|
||
- [ ] 能说出页面、视图、标注、导出四类各一个命令。
|
||
- [ ] 能指出 `TechDraw_View` 面板的 7 个字段,并说出提交后返回什么错误。
|
||
- [ ] 能解释 TechDraw 跨 Worker 边界具体卡在哪里。
|
||
- [ ] 能区分 TechDraw 正式图纸与普通 SVG 截图。
|
||
- [ ] 知道桌面版与 Web 版当前的出图能力差异。
|
||
|
||
## 常见错误
|
||
|
||
1. 把 SVG 截图或视口截图当工程图交付。
|
||
2. 没有准备模型就先建页面。
|
||
3. 认为模块页出现命令就等于功能可用。
|
||
4. 忽略 `invalid_request: Select source objects in the current document`,以为重试几次就能成功。
|
||
|
||
## 练习
|
||
|
||
1. 在桌面 FreeCAD 完成一次三视图 + 尺寸标注,作为对照基线。
|
||
2. 在 Web 模块页打开 TechDraw,记录哪些命令失败、错误文本是什么。
|
||
3. 把对照结果写进 `web/manual/data/gap-ledger.json` 的边界条目。
|