iter-png-2/claude-haiku-4-5 / tier-3-butt-hinge
success tier 3
bare (claude haiku 4.5)
render
// Butt Hinge Assembly - 180° Open State
// Parameters
leaf_length = 30; // Y direction (along hinge axis)
leaf_width = 25; // X direction (opening direction)
leaf_thickness = 2;
pin_diameter = 4;
pin_length = 32;
knuckle_outer_dia = 8;
knuckle_inner_dia = 4.6;
knuckle_width = 6;
// Module: Single leaf (flat plate)
module leaf(width, length, thickness) {
cube([width, length, thickness], center=false);
}
// Module: Knuckle (cylindrical hinge element)
module knuckle() {
difference() {
cylinder(d=knuckle_outer_dia, h=knuckle_width, center=false, $fn=32);
cylinder(d=knuckle_inner_dia, h=knuckle_width, center=false, $fn=32);
}
}
// Module: Countersunk hole (M3)
module countersunk_hole() {
union() {
// Countersink: 6mm dia, 1mm deep
cylinder(d=6, h=1, center=false, $fn=16);
// Through hole: 3.2mm dia
cylinder(d=3.2, h=leaf_thickness+2, center=false, $fn=16);
}
}
// Module: Left leaf with knuckles and countersunk holes
module left_leaf_assembly() {
difference() {
union() {
// Base plate (extends in negative X direction)
translate([-(leaf_width), 0, 0])
cube([leaf_width, leaf_length, leaf_thickness]);
// Knuckles at Y = 0, 12, 24 mm (left leaf: positions 0, 2, 4)
for (i = [0, 2, 4]) {
y_pos = i * knuckle_width;
translate([-knuckle_outer_dia/2, y_pos, 0])
knuckle();
}
}
// Countersunk holes at Y = 2, 10, 18 mm (8mm spacing)
for (y_pos = [2, 10, 18]) {
translate([-(leaf_width/2), y_pos, -0.5])
countersunk_hole();
}
}
}
// Module: Right leaf with knuckles and countersunk holes
module right_leaf_assembly() {
difference() {
union() {
// Base plate (extends in positive X direction)
cube([leaf_width, leaf_length, leaf_thickness]);
// Knuckles at Y = 6, 18 mm (right leaf: positions 1, 3)
for (i = [1, 3]) {
y_pos = i * knuckle_width;
translate([knuckle_outer_dia/2, y_pos, 0])
knuckle();
}
}
// Countersunk holes at Y = 2, 10, 18 mm (8mm spacing)
for (y_pos = [2, 10, 18]) {
translate([leaf_width/2, y_pos, -0.5])
countersunk_hole();
}
}
}
// Module: Pin shaft
module pin_shaft() {
// Pin runs along Z axis from -1mm to 31mm (protrudes 1mm on each end)
cylinder(d=pin_diameter, h=pin_length, center=false, $fn=32);
}
// Assembly - 180° open state
// Coordinate system:
// - Y axis: hinge axis direction (0-30mm along leaves)
// - X axis: opening direction (left leaf negative, right leaf positive)
// - Z axis: pin shaft axis
// Pin shaft: centered at X=0, Y direction from 0-30mm, Z from -1 to 31mm
translate([0, 0, -1])
pin_shaft();
// Left leaf: extends in negative X, base at Z=0
translate([0, 0, 0])
left_leaf_assembly();
// Right leaf: extends in positive X, base at Z=0 (180° open, same plane)
translate([0, 0, 0])
right_leaf_assembly(); パラメータ (8) —
スライダを動かすと openscad-wasm で再レンダリング
iteration chain
各 iteration step は独立した benchmark run です。parentRunId で前段にリンクします。
← parent
iter-png-1/claude-haiku-4-5 success → children (1)
prompt
OpenSCAD で、家具用の小型バット蝶番(butt hinge)を作ってください。 3 つのパーツ(左板、右板、ピン軸)が組み合わさって動作する完成品を、 「開いた状態(180°)」で 1 つの SCAD ファイルに配置して出力します。 寸法と配置: - 板(leaf)2 枚: 30mm × 25mm × 厚さ 2mm の鉄板形状 - 縦 30mm の辺がピン軸に沿う(ヒンジ軸方向) - 横 25mm の辺が回転で開く方向に伸びる - ピン軸: 直径 4mm の円柱、長さ 32mm(両端 1mm ずつ knuckle から飛び出す) - knuckle(筒部): 縦 30mm を 5 等分(各 6mm)に区切り、左板に 3 個・右板に 2 個を 互い違いに配置(左板は外側 2 個 + 中央 1 個、右板は中間 2 個) - knuckle 外径 8mm、内径はピン軸 + 0.3mm クリアランス(= 4.6mm 穴) - 左板と右板はピン軸を共有して回転可能。180° 開いた状態で、両板の 平らな面が同一平面に来るように配置する - 各板の knuckle から離れた側に、M3 用の皿穴を 3 個ずつ (穴ピッチは板の縦方向に 8mm 間隔、皿穴は表面から見て直径 6mm × 深さ 1mm のテーパ + 直径 3.2mm の貫通穴) 座標系: - ピン軸の中心線を Y 軸に重ねる(ピン軸は +Y 方向) - 板の平らな面は Z 軸に直交し、左板が x<0 側、右板が x>0 側に伸びる(180° 開) - knuckle は X=0 を中心とし、Y 方向に 6mm ずつ並ぶ 完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。 コードのみで、追加の説明は不要です。