39 lines
1014 B
YAML
39 lines
1014 B
YAML
name: linear_pattern_body
|
|
category: feature_operation
|
|
description: "把整个实体沿直线方向复制若干份并合并(不是只打孔,是复制整个特征形状),用于散热片、齿条齿形等"
|
|
|
|
parameters:
|
|
- name: count
|
|
type: int
|
|
range: [2, 500]
|
|
required: true
|
|
- name: spacing
|
|
type: float
|
|
unit: mm
|
|
range: [0.01, 5000]
|
|
required: true
|
|
- name: direction
|
|
type: enum
|
|
options: [X, Y]
|
|
required: true
|
|
|
|
preconditions:
|
|
- "target 必须是一个实体(Part)"
|
|
|
|
postconditions:
|
|
- "体积应增加为原来的count倍(如无重叠)"
|
|
|
|
# 机器可执行的断言类型,执行器每次操作后无条件核对
|
|
postcondition_check: volume_increase
|
|
|
|
failure_modes:
|
|
- code: NO_TARGET
|
|
condition: "target 为空"
|
|
message: "linear_pattern_body 需要一个实体作为输入"
|
|
|
|
implementation: capabilities/impl/linear_pattern_body.py
|
|
|
|
examples:
|
|
- text: "把这个散热片沿X方向复制10份,间距8mm"
|
|
params: { count: 10, spacing: 8, direction: X }
|