01 / 概要
拉伸的作用与适用范围
沿草图法线和反法线生成实体。特征类别由 towards 与 opposite 字段判别,不另设 type 字段。
towards 与 opposite 不能同时为 0。
operation 表示创建实体或与已有实体之间的布尔更新语义。
02 / 基础结构
字段结构
ExtrudeStep
├─ coordinate_system: CoordinateSystem
├─ sketch: Sketch
├─ constraints: Constraints
├─ towards: number
├─ opposite: number
└─ operation: "NewBody" | "Join" | "Cut" | "Intersect"字段类型说明
coordinate_system对象草图局部坐标系。
sketch非空对象必须能恢复为闭合轮廓的草图。
constraints对象当前草图的显式约束;无约束时写 {}。
towards非负有限数值沿草图法线的拉伸距离。
opposite非负有限数值沿草图反法线的拉伸距离。
operation字符串NewBody、Join、Cut 或 Intersect。
03 / 详细分析
operation 的取值
字段必选说明
NewBody可选值创建新实体。
Join可选值合并到现有实体。
Cut可选值从现有实体中切割。
Intersect可选值取交集。
04 / 样例数据
完整结构化 JSON 样例
{
"coordinate_system": {
"Euler Angles": [0.0, 0.0, 0.0],
"Translation Vector": [0.0, 0.0, 0.0]
},
"sketch": {
"circle_1": {"center": [0.0, 0.0], "radius": 20.0}
},
"constraints": {
"Diameter": [["circle_1", 40.0]]
},
"towards": 20.0,
"opposite": 0.0,
"operation": "NewBody"
}