Add PartDesign chapter with Body, sketch and Pad captures
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,12 @@
|
||||
通过表单坐标创建 60×40 矩形,断言 `4 geometries`。
|
||||
- 已确认 Web 布局边界:草图编辑器嵌在属性栏内、面板窄且需滚动;
|
||||
正文已如实说明,后续可用 React 把编辑器移到主舞台修复。
|
||||
- 手册当前 3 章、13 张图、1602 条命令;桌面/移动 0 错误、0 破图、0 溢出。
|
||||
- 第 4 章 PartDesign:`content/ch04-partdesign.md` + `scenarios/ch04-partdesign.json`;
|
||||
3 张截图(Sketch1 矩形、Pad 任务、Pad 结果);在 `/partdesign.html` 完成
|
||||
新建文档 → Body → 创建草图 → 矩形 → Pad Length=10 → 创建 Pad。
|
||||
- 记录边界:项目页 Part 文档切 PartDesign 需要 ownership handoff,教程改用独立
|
||||
`partdesign.html`。
|
||||
- 手册当前 4 章、16 张图、1602 条命令;桌面/移动 0 错误、0 破图、0 溢出。
|
||||
|
||||
## 真实残余
|
||||
|
||||
@@ -47,8 +52,8 @@
|
||||
|
||||
## 下一步精确入口
|
||||
|
||||
1. 第 4 章 PartDesign:`content/ch04-partdesign.md` + `scenarios/ch04-partdesign.json`;
|
||||
覆盖 Body、Pad/Pocket、Revolution/Groove、Fillet/Chamfer、Pattern、Datum;
|
||||
1. 第 5 章 Assembly:`content/ch05-assembly.md` + `scenarios/ch05-assembly.json`;
|
||||
覆盖 Create/InsertLink、Ground、Joint、Solve、Exploded/BOM;
|
||||
再补第 0 章启动/OPFS 导读。
|
||||
2. 边界补录:`generate-features.mjs` 的 `boundaries` 增加
|
||||
Fem 原生对象、CAM 其余受限命令、Import_Gltf、Cloud、Material;
|
||||
|
||||
BIN
web/manual/assets/ch04/partdesign-body-pad/01-sketch.png
Normal file
BIN
web/manual/assets/ch04/partdesign-body-pad/01-sketch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
web/manual/assets/ch04/partdesign-body-pad/02-pad-task.png
Normal file
BIN
web/manual/assets/ch04/partdesign-body-pad/02-pad-task.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
BIN
web/manual/assets/ch04/partdesign-body-pad/03-pad-result.png
Normal file
BIN
web/manual/assets/ch04/partdesign-body-pad/03-pad-result.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
110
web/manual/content/ch04-partdesign.md
Normal file
110
web/manual/content/ch04-partdesign.md
Normal file
@@ -0,0 +1,110 @@
|
||||
---
|
||||
id: ch04
|
||||
order: 4
|
||||
title: PartDesign 实体建模
|
||||
level: core
|
||||
---
|
||||
|
||||
# 第 4 章 PartDesign 实体建模
|
||||
|
||||
## 学习目标
|
||||
|
||||
- 在 PartDesign 页面新建文档与 Body,理解 Body 是特征的容器。
|
||||
- 在 Body 内创建 Sketch,用“矩形”生成封闭轮廓。
|
||||
- 用 Pad 把草图拉伸为实体,设置长度、方向与两侧参数。
|
||||
- 认识 Pocket、Revolution、Groove、Hole、Fillet/Chamfer、Pattern 的入口与顺序。
|
||||
|
||||
## 4.1 PartDesign 页面与 Body
|
||||
|
||||
Web 版 PartDesign 有独立页面:`/partdesign.html`。它提供:
|
||||
|
||||
- 新建文档 / 新建 Body / 撤销 / 重做 / 保存。
|
||||
- 基准对象、克隆、ShapeBinder。
|
||||
- 草图工具:矩形、圆形、创建草图、贴附。
|
||||
- 基于草图的特征:Pad、Pocket、Hole、Revolution、Groove、Helix、Loft、Pipe。
|
||||
- 变换特征:Mirrored、LinearPattern、PolarPattern、Scaled、MultiTransform。
|
||||
- 修饰特征:Draft、Thickness、Fillet、Chamfer;Body 布尔运算。
|
||||
|
||||
第一步永远是“新建文档 → 新建 Body”。后续草图与特征都挂在当前 Body 下。
|
||||
|
||||
> 项目页的 Part 文档不能直接切换成 PartDesign;需要原生 ownership handoff。
|
||||
> 初学时直接用 `/partdesign.html` 的 PartDesign 页面,避免混用两种文档所有者。
|
||||
|
||||
## 4.2 创建草图与矩形
|
||||
|
||||
1. 点“新建文档”,再点“新建 Body”。
|
||||
2. 点“创建草图”,默认在 Body 的 XY 平面创建 `Sketch1`。
|
||||
3. 点“矩形”,在草图中生成一个封闭矩形轮廓。
|
||||
|
||||

|
||||
|
||||
草图必须在 Body 内、且轮廓封闭;否则 Pad/Pocket 会提示没有可用 Profile。
|
||||
|
||||
## 4.3 Pad:把草图拉成实体
|
||||
|
||||
点“Pad”打开基于草图的特征面板:
|
||||
|
||||
| 参数 | 本例 |
|
||||
|---|---|
|
||||
| Profile | `Sketch1` |
|
||||
| Length | 10 mm |
|
||||
| Sides | One side |
|
||||
| Mode | Length |
|
||||
| Offset | 0 |
|
||||
| Taper angle | 0 |
|
||||
| Side 2 | 不使用 |
|
||||
| Reverse | 不勾选 |
|
||||
|
||||

|
||||
|
||||
点“创建 Pad”,Body 内出现 `Pad1`,视口显示拉伸后的实体。
|
||||
|
||||

|
||||
|
||||
## 4.4 后续特征的工作顺序
|
||||
|
||||
PartDesign 的特征按 Body 内顺序堆叠:
|
||||
|
||||
1. **Pad / Revolution / AdditivePipe / AdditiveLoft / AdditiveHelix**:加料。
|
||||
2. **Pocket / Groove / SubtractivePipe / SubtractiveLoft / SubtractiveHelix**:减料。
|
||||
3. **Hole**:标准孔,需选择放置面与孔参数。
|
||||
4. **Fillet / Chamfer / Draft / Thickness**:修饰已有实体。
|
||||
5. **Mirrored / LinearPattern / PolarPattern / MultiTransform**:复制与阵列。
|
||||
6. **Boolean**:Body 之间的 Fuse/Cut/Common。
|
||||
|
||||
典型练习:在 Pad1 的顶面新建草图 → 画圆 → Pocket 贯穿 → 得到带孔实体。
|
||||
|
||||
## 4.5 命令速查
|
||||
|
||||
| 组 | 命令 |
|
||||
|---|---|
|
||||
| Body/草图 | `PartDesign_Body`、`PartDesign_NewSketch`、`PartDesign_CompSketches` |
|
||||
| 加料 | `PartDesign_Pad`、`PartDesign_Revolution`、`PartDesign_AdditivePipe`、`AdditiveLoft`、`AdditiveHelix` |
|
||||
| 减料 | `PartDesign_Pocket`、`PartDesign_Groove`、`SubtractivePipe`、`SubtractiveLoft`、`SubtractiveHelix` |
|
||||
| 孔/修饰 | `PartDesign_Hole`、`PartDesign_Fillet`、`PartDesign_Chamfer`、`PartDesign_Draft`、`PartDesign_Thickness` |
|
||||
| 变换 | `PartDesign_Mirrored`、`LinearPattern`、`PolarPattern`、`MultiTransform`、`Scaled` |
|
||||
| 基准/引用 | `PartDesign_CompDatums`、`PartDesign_ShapeBinder`、`PartDesign_Clone`、`PartDesign_Boolean` |
|
||||
|
||||
完整状态见附录命令索引(模块 PartDesign)。
|
||||
|
||||
## 自检
|
||||
|
||||
- [ ] 文档内有 `Body1`,其下出现 `Sketch1` 与 `Pad1`。
|
||||
- [ ] Pad 的 Profile 为 `Sketch1`,Length=10。
|
||||
- [ ] 视口显示一个封闭实体,而不是线框草图。
|
||||
- [ ] 能重新打开 Pad 面板并修改 Length 后重算。
|
||||
- [ ] 知道 Pocket 需要新的草图与 Profile。
|
||||
|
||||
## 常见错误
|
||||
|
||||
1. 未新建 Body 就创建草图,特征没有容器。
|
||||
2. 草图轮廓不封闭,Pad 找不到 Profile。
|
||||
3. Pad 方向反了,实体伸到草图另一侧;勾选 Reverse 或改 Side。
|
||||
4. 在同一 Body 里跳过顺序插入特征,导致父特征被覆盖。
|
||||
5. 用项目页的 Part 文档直接切 PartDesign,出现 ownership handoff 提示。
|
||||
|
||||
## 练习
|
||||
|
||||
1. 把 Pad 的 Length 从 10 改为 20,观察体积与包围盒变化。
|
||||
2. 在 Pad1 顶面新建草图,画一个圆,用 Pocket 做通孔。
|
||||
3. 对 Pad1 的一条边做 Fillet,半径 3 mm,再改回 1 mm 比较。
|
||||
110
web/manual/data/capture/ch04-partdesign-body-pad.json
Normal file
110
web/manual/data/capture/ch04-partdesign-body-pad.json
Normal file
@@ -0,0 +1,110 @@
|
||||
{
|
||||
"schema": "freecad-web-manual/capture/v1",
|
||||
"generatedAt": "2026-11-13T03:57:41.699Z",
|
||||
"chapter": "ch04",
|
||||
"workflow": "partdesign-body-pad",
|
||||
"scenario": "manual/scenarios/ch04-partdesign.json",
|
||||
"origin": "http://127.0.0.1:5181",
|
||||
"ok": true,
|
||||
"trace": [
|
||||
{
|
||||
"at": "2026-11-13T03:57:27.407Z",
|
||||
"action": "goto",
|
||||
"url": "/partdesign.html"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-13T03:57:29.238Z",
|
||||
"action": "click",
|
||||
"selector": "新建文档"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-13T03:57:31.470Z",
|
||||
"action": "click",
|
||||
"selector": "新建 Body"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-13T03:57:33.712Z",
|
||||
"action": "click",
|
||||
"selector": "创建草图"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-13T03:57:35.150Z",
|
||||
"action": "click",
|
||||
"selector": "矩形"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-13T03:57:37.221Z",
|
||||
"action": "shot",
|
||||
"name": "01-sketch",
|
||||
"bytes": 16000
|
||||
},
|
||||
{
|
||||
"at": "2026-11-13T03:57:37.335Z",
|
||||
"action": "click",
|
||||
"selector": "Pad"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-13T03:57:38.252Z",
|
||||
"action": "select",
|
||||
"selector": "select[aria-label=\"Feature Profile\"]",
|
||||
"label": "Sketch1"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-13T03:57:38.273Z",
|
||||
"action": "fill",
|
||||
"selector": "input[aria-label=\"Feature Length\"]",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"at": "2026-11-13T03:57:38.439Z",
|
||||
"action": "shot",
|
||||
"name": "02-pad-task",
|
||||
"bytes": 30838
|
||||
},
|
||||
{
|
||||
"at": "2026-11-13T03:57:38.505Z",
|
||||
"action": "click",
|
||||
"selector": "创建 Pad"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-13T03:57:41.687Z",
|
||||
"action": "shot",
|
||||
"name": "03-pad-result",
|
||||
"bytes": 21494
|
||||
},
|
||||
{
|
||||
"at": "2026-11-13T03:57:41.699Z",
|
||||
"action": "assertAnyText",
|
||||
"selector": "body",
|
||||
"contains": "Pad"
|
||||
}
|
||||
],
|
||||
"shots": [
|
||||
{
|
||||
"id": "ch04/partdesign-body-pad/01-sketch",
|
||||
"file": "manual/assets/ch04/partdesign-body-pad/01-sketch.png",
|
||||
"bytes": 16000,
|
||||
"sha256": "a7c2884a4889b0ad4f39076070ec0010f696564616ca5955391ddb5b71c774d6",
|
||||
"fullPage": false,
|
||||
"selector": "canvas"
|
||||
},
|
||||
{
|
||||
"id": "ch04/partdesign-body-pad/02-pad-task",
|
||||
"file": "manual/assets/ch04/partdesign-body-pad/02-pad-task.png",
|
||||
"bytes": 30838,
|
||||
"sha256": "451b86211060842d25e54de9015a091312af3d870c63b6726f0e9254b52f2796",
|
||||
"fullPage": false,
|
||||
"selector": "fieldset:has-text(\"创建 Pad\")"
|
||||
},
|
||||
{
|
||||
"id": "ch04/partdesign-body-pad/03-pad-result",
|
||||
"file": "manual/assets/ch04/partdesign-body-pad/03-pad-result.png",
|
||||
"bytes": 21494,
|
||||
"sha256": "ebbc2c41a1ee346f0d72f57ecee5eca7a695df9f2307438be45c5d441d7a9329",
|
||||
"fullPage": false,
|
||||
"selector": "canvas"
|
||||
}
|
||||
],
|
||||
"pageErrors": [],
|
||||
"consoleErrors": []
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schema": "freecad-web-manual/page-check/v1",
|
||||
"generatedAt": "2026-11-13T03:49:30.571Z",
|
||||
"generatedAt": "2026-11-13T03:58:34.623Z",
|
||||
"url": "http://127.0.0.1:5190/manual.html",
|
||||
"viewports": [
|
||||
{
|
||||
@@ -12,13 +12,13 @@
|
||||
"errors": [],
|
||||
"failed": [],
|
||||
"searchHits": 4,
|
||||
"chapters": 3,
|
||||
"sections": 29,
|
||||
"images": 13,
|
||||
"chapters": 4,
|
||||
"sections": 38,
|
||||
"images": 16,
|
||||
"brokenImages": [],
|
||||
"commandRows": 1602,
|
||||
"overflow": 0,
|
||||
"searchSize": 1634
|
||||
"searchSize": 1644
|
||||
},
|
||||
{
|
||||
"viewport": {
|
||||
@@ -29,13 +29,13 @@
|
||||
"errors": [],
|
||||
"failed": [],
|
||||
"searchHits": 4,
|
||||
"chapters": 3,
|
||||
"sections": 29,
|
||||
"images": 13,
|
||||
"chapters": 4,
|
||||
"sections": 38,
|
||||
"images": 16,
|
||||
"brokenImages": [],
|
||||
"commandRows": 1602,
|
||||
"overflow": 0,
|
||||
"searchSize": 1634
|
||||
"searchSize": 1644
|
||||
}
|
||||
],
|
||||
"ok": true
|
||||
|
||||
106
web/manual/scenarios/ch04-partdesign.json
Normal file
106
web/manual/scenarios/ch04-partdesign.json
Normal file
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"schema": "freecad-web-manual/scenario/v1",
|
||||
"chapter": "ch04",
|
||||
"workflow": "partdesign-body-pad",
|
||||
"title": "PartDesign Body、草图与 Pad",
|
||||
"actions": [
|
||||
{
|
||||
"type": "goto",
|
||||
"url": "/partdesign.html"
|
||||
},
|
||||
{
|
||||
"type": "wait",
|
||||
"ms": 1200
|
||||
},
|
||||
{
|
||||
"type": "click",
|
||||
"role": "button",
|
||||
"name": "新建文档",
|
||||
"exact": true
|
||||
},
|
||||
{
|
||||
"type": "wait",
|
||||
"ms": 2200
|
||||
},
|
||||
{
|
||||
"type": "click",
|
||||
"role": "button",
|
||||
"name": "新建 Body",
|
||||
"exact": true
|
||||
},
|
||||
{
|
||||
"type": "wait",
|
||||
"ms": 2200
|
||||
},
|
||||
{
|
||||
"type": "click",
|
||||
"role": "button",
|
||||
"name": "创建草图",
|
||||
"exact": true
|
||||
},
|
||||
{
|
||||
"type": "wait",
|
||||
"ms": 1400
|
||||
},
|
||||
{
|
||||
"type": "click",
|
||||
"role": "button",
|
||||
"name": "矩形",
|
||||
"exact": true
|
||||
},
|
||||
{
|
||||
"type": "wait",
|
||||
"ms": 1500
|
||||
},
|
||||
{
|
||||
"type": "shot",
|
||||
"name": "01-sketch",
|
||||
"selector": "canvas"
|
||||
},
|
||||
{
|
||||
"type": "click",
|
||||
"role": "button",
|
||||
"name": "Pad",
|
||||
"exact": true
|
||||
},
|
||||
{
|
||||
"type": "wait",
|
||||
"ms": 900
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"selector": "select[aria-label=\"Feature Profile\"]",
|
||||
"label": "Sketch1"
|
||||
},
|
||||
{
|
||||
"type": "fill",
|
||||
"selector": "input[aria-label=\"Feature Length\"]",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"type": "shot",
|
||||
"name": "02-pad-task",
|
||||
"selector": "fieldset:has-text(\"创建 Pad\")"
|
||||
},
|
||||
{
|
||||
"type": "click",
|
||||
"role": "button",
|
||||
"name": "创建 Pad",
|
||||
"exact": true
|
||||
},
|
||||
{
|
||||
"type": "wait",
|
||||
"ms": 2800
|
||||
},
|
||||
{
|
||||
"type": "shot",
|
||||
"name": "03-pad-result",
|
||||
"selector": "canvas"
|
||||
},
|
||||
{
|
||||
"type": "assertAnyText",
|
||||
"selector": "body",
|
||||
"contains": "Pad"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user