vibe-openscad

iter-png-3/gpt-5-mini / tier-3-butt-hinge

success tier 3

bare (gpt 5 mini)

render
bare render of tier-3-butt-hinge
loading STL…
success 58.0s · 2183/3135t · $0.0068
SCAD (132 lines)
// openscad
// Fixed small butt hinge (assembled, 180° open)
// Two leaves (30 x 25 x 2 mm), pin along Y, leaves lie flat in same plane (Z)
// Knuckles: 5 segments (each 6 mm long along Y) at Y = [-12, -6, 0, 6, 12]
// Left knuckles at [-12, 0, 12], right knuckles at [-6, 6]
// Knuckle outer Ø8 mm, inner bore Ø4.6 mm
// Pin Ø4 mm, length 32 mm (1 mm protruding each end)
// Countersunk M3 holes (3 per leaf) at Y = [-8, 0, 8], 5 mm from outer edge
// Countersink Ø6 mm x depth 1 mm + through Ø3.2 mm
// Coordinate system: pin centerline on Y axis, leaves extend in X (left x<0, right x>0)

$fn = 64;

// Dimensions
plate_len = 30;       // along Y
plate_w = 25;         // along X (from hinge outward)
thickness = 2;        // along Z
half_th = thickness / 2;

knuckle_seg = 6;      // each segment length along Y
knuckle_positions = [-12, -6, 0, 6, 12];
left_knuckles = [-12, 0, 12];
right_knuckles = [-6, 6];

knuckle_r_out = 4;    // outer radius (Ø8)
knuckle_r_in = 2.3;   // inner bore radius (Ø4.6)

pin_dia = 4;
pin_r = pin_dia / 2;
pin_len = 32;         // along Y

screw_hole_positions = [-8, 0, 8];
screw_countersink_diam = 6;    // top diameter
screw_countersink_depth = 1;
screw_through_dia = 3.2;       // through hole
screw_offset_from_outer_edge = 5; // mm inward from outer edge along X

// Parts (placed assembled, 180° open)
color("silver") left_leaf();
color("silver") right_leaf();
color("gray") pin();

module left_leaf() {
    difference() {
        // Plate body + left knuckles (half of knuckle cylinders)
        union() {
            // plate (X from -plate_w .. 0)
            translate([-plate_w, -plate_len/2, -half_th])
                cube([plate_w, plate_len, thickness]);

            // knuckles intersected with left plate half-space
            for (ypos = left_knuckles) {
                intersection() {
                    // full knuckle cylinder (axis along Y)
                    translate([0, ypos, 0])
                        rotate([90, 0, 0])
                            cylinder(h = knuckle_seg, r = knuckle_r_out, center = true);
                    // left plate half-space box to cut the half knuckle
                    translate([-plate_w, -plate_len/2, -100])
                        cube([plate_w, plate_len, 200]);
                }
            }
        }

        // subtract knuckle bores (through the knuckles)
        for (ypos = left_knuckles) {
            translate([0, ypos, 0])
                rotate([90, 0, 0])
                    cylinder(h = 100, r = knuckle_r_in, center = true);
        }

        // subtract screw holes + countersinks (from top surface Z = +half_th)
        for (hy = screw_hole_positions) {
            hole_x = -plate_w + screw_offset_from_outer_edge;
            // through hole
            translate([hole_x, hy, -half_th - 1])
                cylinder(h = thickness + 2, r = screw_through_dia / 2, center = false);
            // countersink (frustum) from top
            translate([hole_x, hy, half_th - screw_countersink_depth])
                cylinder(h = screw_countersink_depth, r1 = screw_through_dia / 2, r2 = screw_countersink_diam / 2, center = false);
        }
    }
}

module right_leaf() {
    difference() {
        // Plate body + right knuckles (half of knuckle cylinders)
        union() {
            // plate (X from 0 .. plate_w)
            translate([0, -plate_len/2, -half_th])
                cube([plate_w, plate_len, thickness]);

            // knuckles intersected with right plate half-space
            for (ypos = right_knuckles) {
                intersection() {
                    // full knuckle cylinder (axis along Y)
                    translate([0, ypos, 0])
                        rotate([90, 0, 0])
                            cylinder(h = knuckle_seg, r = knuckle_r_out, center = true);
                    // right plate half-space box to cut the half knuckle
                    translate([0, -plate_len/2, -100])
                        cube([plate_w, plate_len, 200]);
                }
            }
        }

        // subtract knuckle bores (through the knuckles)
        for (ypos = right_knuckles) {
            translate([0, ypos, 0])
                rotate([90, 0, 0])
                    cylinder(h = 100, r = knuckle_r_in, center = true);
        }

        // subtract screw holes + countersinks (from top surface Z = +half_th)
        for (hy = screw_hole_positions) {
            hole_x = plate_w - screw_offset_from_outer_edge;
            // through hole
            translate([hole_x, hy, -half_th - 1])
                cylinder(h = thickness + 2, r = screw_through_dia / 2, center = false);
            // countersink (frustum) from top
            translate([hole_x, hy, half_th - screw_countersink_depth])
                cylinder(h = screw_countersink_depth, r1 = screw_through_dia / 2, r2 = screw_countersink_diam / 2, center = false);
        }
    }
}

module pin() {
    // Pin axis along Y, centered at origin. Pin length extends 1 mm beyond knuckle ends.
    translate([0, 0, 0])
        rotate([90, 0, 0])
            cylinder(h = pin_len, r = pin_r, center = true);
}
パラメータ (12)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIditer-png-3_gpt-5-mini-3fbb108b7061-2026-04-28T17-35-43-451Z
matrixIditer-png-3/gpt-5-mini
signature3fbb108b7061acb1…
provideropenai
modelgpt-5-mini-2025-08-07
harnessbare
statussuccess
duration57.96s (wallclock: load + prompt eval + generation + network)
tokens2183 in / 3135 out
wallclock tok/s54.1 tok/s (end-to-end)
cost$0.0068
createdAt2026-04-28T17:35:43.451Z
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 ... ``` のフェンスで囲んで出力してください。
コードのみで、追加の説明は不要です。