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.6 KiB
id, order, title, level
| id | order | title | level |
|---|---|---|---|
| ch13 | 13 | Draft、Plot、Robot 等专项工具 | specialist |
第 13 章 Draft、Plot、Robot 等专项工具
能力概览
这一章覆盖主线之外的十个专项模块。它们各自解决一类问题,但都不是建模必经路径。 先看全景表,再按需展开:
| 模块 | 能做什么 | 代表命令 | 入口 |
|---|---|---|---|
| Draft | 2D 线、圆、矩形、多边形;移动、旋转、阵列、克隆;尺寸标注 | Draft_Line、Draft_Circle、Draft_Array、Draft_Dimension |
workbench.html?module=Draft |
| Robot | 六轴机器人、关节角、工具坐标系、轨迹 | Robot_CreateRobot、Robot_AddToolShape |
workbench.html?module=Robot |
| Plot | 2D 图表:Figure / Axes / Series | Plot_Axes、plot.pythonFamilyBatch |
plot-python.html |
| Cloud | 云文档保存与恢复(需远程服务) | cloud.save、cloud.restore |
workbench.html?module=Cloud |
| JtReader | JT 格式文件读取 | JtReader_* |
workbench.html?module=JtReader |
| Sandbox | 实验性自定义工作台 | Sandbox_* |
workbench.html?module=Sandbox |
| Test | 内核自测入口 | 模块页测试命令 | test.html |
| TemplatePyMod | Python 模块模板与家族 | templatepymod.* |
templatepymod-family.html |
| Tux | 示例模块 | tux.* |
workbench.html?module=Tux |
| Show | 显示辅助 | show.* |
workbench.html?module=Show |
本手册不涉及 OpenSCAD。 Web 端已整体移除该工作台:没有源码、没有注册表条目、 没有产物、也没有测试入口。遇到
.scad/.csg文件时按不支持处理,不会回落到 外部openscad二进制。
13.1 Robot 机器人
Robot_CreateRobot 的面板是 Web 端少见的完整多分区面板,一共六组:
Robot(Refresh / use selection、Undo、Redo)、Frame-relative jog、
Joint angles (degrees)(Set Home / Move to Home / Accept / Cancel edits)、
Robot Tool frame、World tool-end placement,以及文档保存分组。
Frame-relative jog 是一整排相对当前坐标系的点动按钮:
X− / X+ / Y− / Y+ / Z− / Z+ / A− / A+ / B− / B+ / C− / C+。
它们在本页面注册为相对基座坐标系的平移与旋转增量。
打开面板时 Joint angles 分组显示 Home: Not set — use Set Home。
点 Set Home 与点动按钮都不会更新这行提示——实测点击后分组文本保持不变,
说明面板只渲染状态,没有接到可驱动机器人模型上。因此这一章不做"点按钮看姿态变化"
的演示,只把面板结构讲清楚。
Robot_InsertWaypoint 会在面板下方追加一个独立分组,里面是
Insert waypoint / Undo / Redo / Cancel / Refresh 五个按钮。
13.2 Plot 2D 图表
Plot 的顺序是固定的三层结构:Figure(画布)→ Axes(坐标系)→ Series(数据序列)。
Web 端 Plot_Axes 面板把这三层做成分组按钮:
| 分组 | 按钮 |
|---|---|
| Figure | New figure、Close figure |
| Axes | Add axes、Apply axes edit、Remove axes and its series |
| Presentation | Apply presentation、Reset presentation inputs |
| Series | Remove selected series、Add series to active axes |
| 导出 | Download SVG、Save SVG to OPFS |
点 New figure 再点 Add axes 之后:
实测边界:这两个按钮点击后页面里既不新增 <svg> 也不新增 <canvas>,
画布不会出现在任务面板旁边。所以本章不演示"画一条曲线再导出",
只列出面板提供的操作。跳层仍然会导致失败:没有 Axes 直接加 Series 会报错,
因为 Series 必须挂在一个坐标系下。
13.3 Draft 2D 绘图
Draft 在项目页的工作台下拉里可选,命名的意图是先画 2D 轮廓再转实体。
Web 端 Draft_Rectangle 的面板分两组:Draft_Rectangle(基点 XYZ、法向 XYZ、
length / height / face)与 First corner (world coordinates, mm)。
Draft_Circle 面板更简单,只有 center 与 normal 两组 XYZ。
实测边界:把矩形面板的六个数值填成基点 (0,0,0)、length 50、height 30 后,
面板底部提示仍是 Pick first corner——这类 Draft 图元要求先在三维视口里取点,
而后台壳层页面里没有 <canvas>,取不了点。Draft_Line、Draft_Wire、
Draft_Array 连面板都没有。因此 Draft 在当前 Web 端只能查看参数结构,不能落成几何。
要冻结结果请用 Part_SimpleCopy(第 2 章)。
13.4 其余模块与边界
- Cloud:Save/Restore 需要远程 S3 服务与凭据。本地 OPFS 不受影响,日常保存不需要 Cloud。
- JtReader:只读 JT 格式,命令少,按模块页实际暴露的项使用。
- Sandbox / Test / Tux / TemplatePyMod / Show:实验、自测、模板与显示辅助,不作为产品主流程。 它们存在于内核并有路由,但界面多为单命令探针页,不代表完整的桌面工作台体验。
边界与注意
- 这十个模块的 Web 界面多为单命令探针页,不是桌面级的完整工具栏。
- Robot 面板完整但未接可驱动机器人:关节角提示与点动按钮都不改变状态。
- Plot 面板完整但不在页面里渲染画布,
Download SVG之前没有任何可视化反馈。 - Draft 图元需要三维视口取点,壳层页面缺 canvas,只能看面板不能成型。
- Plot 的 Python 家族批处理走
plot-python.html,与其他模块的交互方式不同。 - Cloud 缺少远程服务时命令必然失败,这不是 Web 端缺陷。
- 本节所有命令都可在附录命令索引里按模块筛选查看状态。
自检
- 能说出 Robot、Plot、Draft 各自解决什么问题。
- 能说出 Robot 面板的六个分组名,并解释
Frame-relative jog的按钮语义。 - 能按 Figure → Axes → Series 的顺序说出三个层级,并知道 Web 端画布不渲染。
- 知道 Cloud 需要远程服务、本地 OPFS 不受影响。
- 明确知道 Web 端不提供 OpenSCAD。
常见错误
- 以为点 Robot 的点动按钮能看到姿态变化——Web 端不会,面板未接模型。
- 关节角单位混用度与弧度,在桌面版里姿态会完全不对。
- Plot 没建 Axes 就加 Series,报错。
- 未配置远程存储就点 Cloud Save,失败后误判为 Web 端缺陷。
- 以为
.scad文件能像 STEP 一样导入——Web 端不支持。
练习
- 在 Robot 面板里点
Set Home,记录Joint angles分组的文本有没有变化,把这个结果写进缺口账本。 - 在 Plot 面板里依次点
New figure与Add axes,用浏览器元素面板确认有没有新增<svg>或<canvas>。 - 在桌面 FreeCAD 里用
Draft_Rectangle+Draft_Array做 3×3 阵列,作为 Web 端的对照基线。 - 打开附录命令索引,按
Cloud筛选,确认哪些命令标为边界。





