Files
FreeCADWasmDev/web/manual/content/ch00-start.md
wangdequan 7d9cf3a5ea Rewrite the beginner manual against measured Web behaviour
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>
2026-11-15 16:47:14 +08:00

4.9 KiB
Raw Blame History

id, order, title, level
id order title level
ch00 0 导读、启动与 OPFS core

第 0 章 导读、启动与 OPFS

学习目标

  1. 能打开 Web FreeCAD,知道项目页、PartDesign 页与工作台页各自负责什么。
  2. 理解 OPFS 是默认存储位置,“下载”必须由你显式点击才会发生。
  3. 知道本手册的两层结构,能找到命令索引与边界说明。
  4. 能独立完成一次“新建 → 保存 → 刷新 → 重新打开”的闭环。

0.1 启动与入口

Web FreeCAD 没有安装程序,它在浏览器里运行。常用入口:

入口 地址 用途
应用首页 http://127.0.0.1:5181/ 启动面板与总导航
项目页 /project.html 主建模界面:对象树、属性、任务、三维视口
PartDesign 页 /partdesign.html Body / Sketch / Pad / Pocket
工作台页 /workbench.html?module=<模块> 各模块命令与参数面板
教学服务 http://127.0.0.1:5190/ 本手册与教学案例的静态宿主

打开后点左上角 Start 弹出启动面板:新建文档、打开 OPFS 里的文档、打开最近文件。

Start 启动面板

必须用 HTTP 打开,不要用 file:// 直接双击 HTML。Worker、WASM 与 跨源隔离头都需要服务端支持,用 file:// 会加载失败。

0.2 文档与工作台

不同页面持有不同的文档所有者,这决定了你该用哪个页面做哪件事:

页面 文档所有者 适合做
project.html Part / DocumentProbe Part、Sketcher、Spreadsheet、Assembly
partdesign.html PartDesign Body、Sketch、Pad/Pocket
workbench.html 各模块 Worker 单模块命令与参数任务
project.html?workbench=Assembly Assembly 装配

项目页里的 Part 文档不能直接切到 PartDesign,会弹出所有权移交提示。 学 PartDesign 请直接开 partdesign.html,不要试图在项目页里切过去。

0.3 OPFS 文件生命周期

OPFS(Origin Private File System)是浏览器提供的私有文件系统。规则很简单:

  1. 新建与编辑都发生在内存里,此时刷新页面就丢了。
  2. 点“保存 FCStd 到 OPFS”才会写入浏览器私有文件系统。
  3. 状态栏提示 Saved <name>.FCStd to OPFS 表示成功。
  4. 需要真实文件时点“下载到本地”,这是唯一会触发浏览器下载的动作。
  5. 导入与导出的交换格式文件也默认落在 freecad-exports 目录。

文件工具:导入、导出、OPFS 保存/打开与下载

找不到导出结果时,先看 OPFS 列表,不要去系统下载目录找。Web 版不会自动下载。

OPFS 是按浏览器分区的:换浏览器、用无痕窗口、清站点数据,文件都会消失。 要长期保留请下载到本地。

0.4 怎么用这本手册

本手册分两层:

  • 第一部分 入门主线(第 0–7 章):按顺序跟练。从界面认识一路做到导入导出, 每章都有真实截图与可复现的数值。
  • 第二部分 全模块速查(第 8–13 章):专业工作台。每章先看能力概览与边界, 再挑 1–2 个工作流练手。第 14 章是综合案例,附录是命令索引。

每节固定结构:学习目标 → 分步操作 → 参数与数值 → 截图 → 自检 → 常见错误 → 练习。

命令索引(附录)可按模块与状态筛选。状态含义:

状态 含义
已验证 有官方案例证据支撑
精讲 本章有完整分步说明
覆盖 命令存在于矩阵,本章只做概述
边界 当前 Web 端受限,不要当可用功能

口径提醒:Web 端有 31 个模块、302 条注册路由、其中约 96 条有真实参数界面。 不要把注册路由数当成“功能数”对外宣称——详见附录。

自检

  • 能打开 Start 面板并新建一个文档。
  • 能找到“保存 FCStd 到 OPFS”与“下载到本地”两个按钮。
  • 能说出 project / partdesign / workbench 三个入口的区别。
  • 能在附录命令索引里搜到一个命令并读出它的状态。
  • 知道为什么不能用 file:// 打开。

常见错误

  1. 把“保存到 OPFS”当成已下载到本地,关掉浏览器后发现文件没了。
  2. 在 project 页强行切 PartDesign,遇到所有权移交提示就卡住。
  3. 用 file:// 打开页面,Worker 与 WASM 加载失败。
  4. 忽略状态栏的保存与导入结果,误以为操作成功。
  5. 换浏览器后找不到之前保存的文档——OPFS 不跨浏览器。

练习

  1. 新建文档,保存到 OPFS,刷新页面,再从 Start 面板重新打开。
  2. 在附录搜索 PartDesign_Pad,记录它属于哪一章、状态是什么。
  3. 新建文档但不保存,刷新页面,确认内容丢失——理解内存与 OPFS 的差别。