vibe-openscad

bare/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 7.3s · 707/1031t · $0.0059
SCAD (105 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;
clearance = 0.3;

// Module: Single leaf (flat plate)
module leaf() {
    cube([leaf_width, leaf_length, leaf_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(depth_countersink=1, dia_countersink=6, dia_hole=3.2) {
    union() {
        cylinder(d=dia_countersink, h=depth_countersink, center=false, $fn=16);
        cylinder(d=dia_hole, h=leaf_length, center=false, $fn=16);
    }
}

// Module: Left leaf with knuckles and countersunk holes
module left_leaf_assembly() {
    difference() {
        union() {
            // Base plate
            translate([-(leaf_width), 0, 0])
                leaf();
            
            // Knuckles: positions at Y = 0, 6, 12 mm
            // Left leaf has knuckles at outer positions and center
            for (y_pos = [0, 12]) {
                translate([0, y_pos, 0])
                    knuckle();
            }
            // Center knuckle
            translate([0, 6, 0])
                knuckle();
        }
        
        // Countersunk holes at Y = 2, 10, 18 mm (8mm spacing, away from knuckles)
        for (y_pos = [2, 10, 18]) {
            translate([-(leaf_width/2), y_pos, -(leaf_thickness)])
                countersunk_hole();
        }
    }
}

// Module: Right leaf with knuckles and countersunk holes
module right_leaf_assembly() {
    difference() {
        union() {
            // Base plate (mirrored position)
            leaf();
            
            // Knuckles: positions at Y = 6, 18 mm
            // Right leaf has knuckles at intermediate positions
            for (y_pos = [6, 18]) {
                translate([0, y_pos, 0])
                    knuckle();
            }
        }
        
        // Countersunk holes at Y = 2, 10, 18 mm (same spacing)
        for (y_pos = [2, 10, 18]) {
            translate([leaf_width/2, y_pos, -(leaf_thickness)])
                countersunk_hole();
        }
    }
}

// Module: Pin shaft (cylindrical)
module pin_shaft() {
    cylinder(d=pin_diameter, h=pin_length, center=false, $fn=32);
}

// Assembly
// Pin shaft along Y axis, centered at X=0
translate([0, -1, 0])
    pin_shaft();

// Left leaf: positioned at X negative, rotated 180° to open flat
// Knuckles at X=0, leaf extends to X negative
translate([0, 0, 0])
    rotate([0, 0, 180])
        translate([0, 0, 0])
            left_leaf_assembly();

// Right leaf: positioned at X positive, at Z=0 plane
// Knuckles at X=0, leaf extends to X positive
translate([0, 0, 0])
    right_leaf_assembly();
パラメータ (9)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare_claude-haiku-4-5-7f256439dfa4-2026-04-28T17-22-32-518Z
matrixIdbare/claude-haiku-4-5
signature7f256439dfa44057…
provideranthropic
modelclaude-haiku-4-5-20251001
harnessbare
statussuccess
duration7.31s (wallclock: load + prompt eval + generation + network)
tokens707 in / 1031 out
wallclock tok/s141.1 tok/s (end-to-end)
cost$0.0059
createdAt2026-04-28T17:22:32.518Z
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 ... ``` のフェンスで囲んで出力してください。
コードのみで、追加の説明は不要です。