36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
name: loft
|
|
category: feature_operation
|
|
description: "在多个已生成的二维草图截面之间放样出一个渐变过渡实体(如方转圆的变截面接头);不使用target,通过profile_ids引用IR中已有的多个草图"
|
|
|
|
parameters:
|
|
- name: profile_ids
|
|
type: list_str
|
|
required: true
|
|
- name: ruled
|
|
type: bool
|
|
required: true
|
|
|
|
preconditions:
|
|
- "profile_ids 至少包含2个id,且都必须是此操作之前已生成的二维草图"
|
|
- "各截面草图通常应位于不同的Z高度,否则放样退化"
|
|
|
|
postconditions:
|
|
- "生成一个三维过渡实体(Part),体积大于0"
|
|
|
|
# 机器可执行的断言类型,执行器每次操作后无条件核对
|
|
postcondition_check: volume_positive
|
|
|
|
failure_modes:
|
|
- code: NOT_ENOUGH_PROFILES
|
|
condition: "profile_ids 少于2个"
|
|
message: "放样至少需要2个截面"
|
|
- code: UNKNOWN_ID
|
|
condition: "profile_ids 中某个id在上下文中不存在"
|
|
message: "找不到对应的截面草图,请检查id是否在此操作之前已生成"
|
|
|
|
implementation: capabilities/impl/loft.py
|
|
|
|
examples:
|
|
- text: "在底部的方形截面和顶部的圆形截面之间放样出一个方转圆接头"
|
|
params: { profile_ids: ["square_profile", "circle_profile"], ruled: false }
|