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

39 lines
1.1 KiB
YAML

name: shell
category: feature_operation
description: "把实体抽壳成薄壁中空结构,可指定顶面/底面开口"
parameters:
- name: thickness
type: float
unit: mm
range: [0.1, 100]
required: true
- name: opening_selector
type: enum
options: [top, bottom, top_and_bottom, none]
required: true
preconditions:
- "target 必须是一个实心实体(Part)"
- "thickness 必须小于实体最短边尺寸的一半,否则内部会被完全掏空导致失败"
postconditions:
- "体积应显著减小(抽壳去除了内部材料)"
# 机器可执行的断言类型,执行器每次操作后无条件核对
postcondition_check: volume_decrease
failure_modes:
- code: NO_TARGET
condition: "target 为空"
message: "shell 需要一个实体作为输入"
- code: THICKNESS_TOO_LARGE
condition: "thickness >= min(实体X/Y/Z尺寸)/2"
message: "壁厚过大,会导致内部完全掏空或抽壳失败"
implementation: capabilities/impl/shell.py
examples:
- text: "把这个实体抽壳,壁厚2mm,顶部开口"
params: { thickness: 2, opening_selector: top }