vibe-openscad

iter-png-1/claude-haiku-4-5 / tier-3-butt-hinge

success tier 3

bare (claude haiku 4.5)

render
bare render of tier-3-butt-hinge
loading STL…
success 9.6s · 2494/1251t · $0.0087
SCAD (97 lines)
// 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])
                leaf(leaf_width, leaf_length, leaf_thickness);
            
            // Knuckles at Y = 0, 12, 24 mm (left leaf: outer 2 + center 1)
            for (y_pos = [0, 12, 24]) {
                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)
            leaf(leaf_width, leaf_length, leaf_thickness);
            
            // Knuckles at Y = 6, 18 mm (right leaf: intermediate 2)
            for (y_pos = [6, 18]) {
                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() {
    cylinder(d=pin_diameter, h=pin_length, center=false, $fn=32);
}

// Assembly - 180° open state
// Pin shaft centered at X=0, running along Y axis from Y=0 to Y=32
translate([0, 0, leaf_thickness])
    pin_shaft();

// Left leaf: plate extends in negative X, centered at origin
translate([0, 0, 0])
    left_leaf_assembly();

// Right leaf: plate extends in positive X, centered at origin, at same Z height
translate([0, 0, 0])
    right_leaf_assembly();
パラメータ (8)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIditer-png-1_claude-haiku-4-5-38ad9bfdc14d-2026-04-28T17-30-00-047Z
matrixIditer-png-1/claude-haiku-4-5
signature38ad9bfdc14df149…
provideranthropic
modelclaude-haiku-4-5-20251001
harnessbare
statussuccess
duration9.60s (wallclock: load + prompt eval + generation + network)
tokens2494 in / 1251 out
wallclock tok/s130.4 tok/s (end-to-end)
cost$0.0087
createdAt2026-04-28T17:30:00.047Z
gitCommitbe87c9f2adaf
openscadOpenSCAD version 2026.04.27

iteration chain

各 iteration step は独立した benchmark run です。parentRunId で前段にリンクします。

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 ... ``` のフェンスで囲んで出力してください。
コードのみで、追加の説明は不要です。