← 返回规范概览HISTCAD JSON · V0.1

FEATURE OPERATION

拉伸

沿草图法线和反法线生成实体。特征类别由 towards 与 opposite 字段判别,不另设 type 字段。

分类
基础特征操作
序号
04
标识
ExtrudeStep

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"
}