Files
2026-09-24 10:40:57 +08:00

39 lines
1.1 KiB
YAML

name: draft_faces
category: feature_operation
description: "对实体的竖直侧面添加拔模角度,常用于铸造/注塑/压铸件便于脱模"
parameters:
- name: angle
type: float
unit: deg
range: [0.1, 30]
required: true
- name: neutral_plane
type: enum
options: [top, bottom]
required: true
preconditions:
- "target 必须是一个实体(Part)"
- "只对法线近似水平(竖直侧面)的面施加拔模,顶面/底面不受影响"
postconditions:
- "体积会发生变化(拔模是倾斜侧面,增大或减小实体体积视方向而定)"
# 机器可执行的断言类型,执行器每次操作后无条件核对
postcondition_check: none
failure_modes:
- code: NO_TARGET
condition: "target 为空"
message: "draft_faces 需要一个实体作为输入"
- code: NO_SIDE_FACES
condition: "实体没有可识别的竖直侧面"
message: "找不到可以拔模的竖直侧面"
implementation: capabilities/impl/draft_faces.py
examples:
- text: "给这个零件的侧面加3度拔模角,以底面为基准面"
params: { angle: 3, neutral_plane: bottom }