Files
FreeCADWasmDev/web/manual/content/ch02-part.md

4.2 KiB
Raw Permalink Blame History

id, order, title, level
id order title level
ch02 2 Part 图元与布尔 core

第 2 章 Part 图元与布尔

学习目标

  • 从 Part 菜单创建 Box、Cylinder 等参数化图元。
  • 在属性面板修改尺寸与 Placement,而不是反复重建对象。
  • 用 Cut 做通孔,理解 Base/Tool 与布尔结果。
  • 用 CheckGeometry 检查实体有效性,并看懂体积、面数、三角面数。

2.1 Part 菜单与工作流

Part 工作台把命令分成九组:Primitives、Solids、Boolean、Split、Compound、Copy、 Join、Feature、Inspection。初学者先掌握“图元 → 布尔 → 检查”这条主线。

Part 工作台:菜单、对象树、属性面板与视口

本例先建一个 80 × 60 × 20 的 Box(标签 PartBase),再建一个半径 15、高度 40 的 Cylinder(Cylinder1),把圆柱沿 Z 放到 -10,让它从底板下方穿到上方。

2.2 创建与修改图元

  1. 打开 Part → Primitives → Box,任务面板填 Length/Width/Height。
  2. 点“应用尺寸并重算”,把标签改为 PartBase。
  3. 打开 Part → Primitives → Cylinder。圆柱会立即以默认参数创建。
  4. 选中 Cylinder1,在属性面板的 Data 区把 Radius 改为 15、Height 改为 40。
  5. 用 Placement 把 Position 设为 (40, 30, -10)。

图元创建后,尺寸与位置都在属性面板里改;重新打开命令只会再建一个新对象。

2.3 布尔 Cut

选中底板和圆柱后,打开 Part → Boolean → Cut。Part 会用当前选择(或前两个对象) 自动建立 Cut1,属性面板显示 Operation=Cut、Base=PartBase、Tool=Cylinder1。

Cut 结果:通孔、体积 81862.8 mm³、7 个面、124 个三角面

检查结果:

指标 值
体积 81862.83 mm³(= 96000 − 圆柱穿过部分)
Faces 7
Triangles 124
包围盒 80 × 60 × 20 mm

如果体积仍等于 96000,说明圆柱没有与底板相交:检查圆柱的高度与 Z 位置。

2.4 检查几何

选中 Cut1,打开 Part → Inspection → Check Geometry,勾选对象后点 “Check shapes”。 任务面板会列出 BOP 检查结果;有效实体应没有错误。

CheckGeometry 任务:选择 Cut1 并执行检查

检查后的结果视图

2.5 其他 Part 工具速查

组 命令 用途
Boolean Part_Fuse / Part_Common 并集 / 交集
Split Part_Slice / Part_SliceApart / Part_XOR 切片、拆开、异或
Join Part_JoinConnect / Part_JoinEmbed / Part_JoinCutout 连接、嵌入、挖槽
Compound Part_Compound / Part_ExplodeCompound 合成/炸开复合体
Copy Part_SimpleCopy / Part_TransformedCopy / Part_RefineShape 复制与清理
Feature Part_Extrude / Part_Revolve / Part_Loft / Part_Sweep 拉伸、旋转、放样、扫掠
Dress-up Part_Fillet / Part_Chamfer 圆角 / 倒角
Offset Part_Offset / Part_Offset2D / Part_Thickness 3D/2D 偏移、抽壳
Inspection Part_CheckGeometry / Part_Defeaturing 几何检查、去特征
显示 Part_ColorPerFace / Part_SectionCut 逐面上色、剖切

完整命令与状态见附录“命令索引”。

自检

  • 对象树有 PartBase、Cylinder1、Cut1 三个对象。
  • Cylinder 的 Radius=15、Height=40,Position Z=-10。
  • Cut1 体积约 81862.83 mm³,不是 96000。
  • Cut1 的 Faces=7,Triangles=124。
  • CheckGeometry 没有错误。

常见错误

  1. 圆柱高度仍为默认 10、且位于底板下方,Cut 体积不变。
  2. 只选中一个对象就执行 Cut,得到 “select two objects”。
  3. 修改图元后没有重算,布尔仍用旧形状。
  4. 把 Cut 的 Base/Tool 选反,得到相反的孔形。

练习

  1. 把圆柱半径改为 10,观察体积变化,再恢复 15。
  2. 用 Part_Fuse 把 PartBase 与 Cylinder1 合并,比较与 Cut 的差别。
  3. 复制 Cut1(Part_SimpleCopy),再用 Part_CheckGeometry 检查副本。