01 / 概要
坐标系的作用与适用范围
描述草图局部坐标系的空间位置与方向,使二维草图正确放置到零件坐标系中。局部草图位于该坐标系的 XY 平面。
坐标系只负责空间定位;二维图元定义在 sketch 中,图元之间的关系定义在 constraints 中。
两个数组中的每一项都必须为有限数值。
02 / 基础结构
字段结构
{
"coordinate_system": {
"Euler Angles": [0.0, 0.0, 0.0],
"Translation Vector": [0.0, 0.0, 0.0]
}
}字段类型说明
Euler Angles长度为 3 的有限数值数组内禀 XYZ 欧拉角 [x, y, z],单位为度。
Translation Vector长度为 3 的有限数值数组草图局部原点在零件坐标系中的位置 [x, y, z],单位为毫米。
03 / 样例数据
完整结构化 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"
}