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

53 lines
2.4 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: ring_captured
category: sketch
description: "生成一个矩形截面圆环,环的内圈嵌进sphere_grooved开的沟槽里,能绕该轴自由转动但无法沿轴向拔出——万向节/陀螺仪的转动环用这个,不要用rib或mirror_union等其它能力拼装环形转动结构。不依赖target,独立生成一个新实体,之后要跟sphere_grooved的结果用boolean_combine(union)合并成同一个零件"
parameters:
- name: axis
type: enum
options: [X, Y, Z]
required: true
- name: ring_inner_radius
type: float
unit: mm
range: [1, 1000]
required: true
- name: ring_outer_radius
type: float
unit: mm
range: [1, 1000]
required: true
- name: axial_half_width
type: float
unit: mm
range: [0.2, 500]
required: true
preconditions:
- "ring_outer_radius 必须大于 ring_inner_radius"
- "ring_inner_radius 应该比对应sphere_grooved的(sphere_radius - groove_depth)略大(留0.3~1mm间隙),"
- "确保环能自由转动而不摩擦卡死"
- "axial_half_width 必须比对应sphere_grooved的groove_half_width略小(留间隙),否则环会被沟槽两侧的球体材料直接焊死,转不动"
- "axis 必须跟要嵌入的那条沟槽的axis一致"
- "【重要,容易被忽略】ring_outer_radius 必须明显大于对应球体的 sphere_radius(至少大20%以上,"
- "比如球半径20mm,环外径至少要到24-30mm)。如果ring_outer_radius小于或接近sphere_radius,"
- "环会完全缩在球体的凹槽里、一点都不探出球面,视觉上只会看到球上有一道细缝,看不出是个环——"
- "这不是能力坏了,是这条尺寸关系没满足。环应该像手镯一样明显套在球外面凸出来一圈。"
postconditions:
- "生成一个圆环实体,内圈半径ring_inner_radius,外圈半径ring_outer_radius,轴向厚度2*axial_half_width"
# 机器可执行的断言类型,执行器每次操作后无条件核对
postcondition_check: volume_positive
failure_modes:
- code: INVALID_RADII
condition: "ring_outer_radius <= ring_inner_radius"
message: "外径必须大于内径"
implementation: capabilities/impl/ring_captured.py
examples:
- text: "做一个绕X轴的转动环,内径12.5mm(卡进沟槽),外径19mm(露出的环带),轴向半宽1.5mm"
params: { axis: X, ring_inner_radius: 12.5, ring_outer_radius: 19, axial_half_width: 1.5 }