vibe-openscad

iter-png-3/claude-opus-4-5 / tier-3-butt-hinge

success tier 3

bare (claude opus 4.5)

render
bare render of tier-3-butt-hinge
loading STL…
success 17.1s · 3047/1635t · $0.0561
SCAD (130 lines)
// Butt Hinge - Furniture Small Size
// Three parts: Left leaf, Right leaf, Pin

// Parameters
leaf_length = 30;      // Y direction (along hinge axis)
leaf_width = 25;       // X direction (opening direction)
leaf_thickness = 2;    // Z direction

pin_diameter = 4;
pin_length = 32;
pin_clearance = 0.3;

knuckle_outer_diameter = 8;
knuckle_inner_diameter = pin_diameter + pin_clearance;
knuckle_radius = knuckle_outer_diameter / 2;
knuckle_height = 6;    // 30mm / 5 = 6mm each
knuckle_gap = 0.1;     // Small gap between knuckles

// Countersunk hole parameters
hole_diameter = 3.2;
countersink_diameter = 6;
countersink_depth = 1;
hole_spacing = 8;

$fn = 64;

// Module for countersunk hole (drilled from top, z+ direction)
module countersunk_hole() {
    // Through hole
    translate([0, 0, -0.01])
        cylinder(h = leaf_thickness + 0.02, d = hole_diameter);
    // Countersink from top surface
    translate([0, 0, leaf_thickness - countersink_depth])
        cylinder(h = countersink_depth + 0.01, d1 = hole_diameter, d2 = countersink_diameter);
}

// Module for single knuckle cylinder (along Y axis)
module knuckle_cylinder(y_start, height) {
    translate([0, y_start, 0])
        rotate([-90, 0, 0])
            difference() {
                cylinder(h = height, d = knuckle_outer_diameter);
                translate([0, 0, -0.01])
                    cylinder(h = height + 0.02, d = knuckle_inner_diameter);
            }
}

// Module for left leaf (3 knuckles at positions 0, 2, 4)
module left_leaf() {
    // In 180° open position, left plate extends in -X direction
    // Plate flat surface is on Z=0 plane (bottom) to Z=leaf_thickness (top)
    // Knuckle center axis is at Z = knuckle_radius
    
    difference() {
        union() {
            // Main plate - extends from x = -leaf_width to x = 0
            // But knuckle takes some space, so plate edge meets knuckle
            translate([-leaf_width, 0, 0])
                cube([leaf_width, leaf_length, leaf_thickness]);
            
            // Knuckles at positions 0, 2, 4 (first, third, fifth)
            // Y positions: 0-6, 12-18, 24-30
            translate([0, 0, knuckle_radius])
            {
                knuckle_cylinder(0, knuckle_height - knuckle_gap/2);
                knuckle_cylinder(2 * knuckle_height + knuckle_gap/2, knuckle_height - knuckle_gap);
                knuckle_cylinder(4 * knuckle_height + knuckle_gap/2, knuckle_height - knuckle_gap/2);
            }
        }
        
        // Countersunk holes - 3 holes on the plate away from knuckle
        // Centered horizontally on plate, spaced 8mm vertically
        for (i = [-1, 0, 1]) {
            translate([-leaf_width/2, leaf_length/2 + i * hole_spacing, 0])
                countersunk_hole();
        }
    }
}

// Module for right leaf (2 knuckles at positions 1, 3)
module right_leaf() {
    // In 180° open position, right plate extends in +X direction
    
    difference() {
        union() {
            // Main plate - extends from x = 0 to x = leaf_width
            translate([0, 0, 0])
                cube([leaf_width, leaf_length, leaf_thickness]);
            
            // Knuckles at positions 1, 3 (second, fourth)
            // Y positions: 6-12, 18-24
            translate([0, 0, knuckle_radius])
            {
                knuckle_cylinder(knuckle_height + knuckle_gap/2, knuckle_height - knuckle_gap);
                knuckle_cylinder(3 * knuckle_height + knuckle_gap/2, knuckle_height - knuckle_gap);
            }
        }
        
        // Countersunk holes
        for (i = [-1, 0, 1]) {
            translate([leaf_width/2, leaf_length/2 + i * hole_spacing, 0])
                countersunk_hole();
        }
    }
}

// Module for pin
module pin() {
    // Pin axis along Y at X=0, Z=knuckle_radius
    // Pin extends from Y = -1 to Y = 31 (32mm total, 1mm overhang each end)
    translate([0, -1, knuckle_radius])
        rotate([-90, 0, 0])
            cylinder(h = pin_length, d = pin_diameter);
}

// Assembly - 180° open position
// Pin axis along Y at X=0, Z=knuckle_radius
// Both plates have flat surface at Z=0 to Z=leaf_thickness

// Left leaf (extends in -X direction)
color("DimGray")
    left_leaf();

// Right leaf (extends in +X direction)  
color("Gray")
    right_leaf();

// Pin
color("Silver")
    pin();
パラメータ (13)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIditer-png-3_claude-opus-4-5-fd2db8095d41-2026-04-28T17-31-22-645Z
matrixIditer-png-3/claude-opus-4-5
signaturefd2db8095d41f1e3…
provideranthropic
modelclaude-opus-4-5-20251101
harnessbare
statussuccess
duration17.07s (wallclock: load + prompt eval + generation + network)
tokens3047 in / 1635 out
wallclock tok/s95.8 tok/s (end-to-end)
cost$0.0561
createdAt2026-04-28T17:31:22.645Z
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 ... ``` のフェンスで囲んで出力してください。
コードのみで、追加の説明は不要です。