vibe-openscad

iter-png-2/gpt-5.4-mini / tier-3-butt-hinge

success tier 3

bare (gpt 5.4 mini)

render
bare render of tier-3-butt-hinge
loading STL…
success 6.3s · 2014/979t · $0.0037
SCAD (110 lines)
$fn = 96;

// Dimensions
leaf_len = 30;          // Y direction
leaf_w   = 25;          // X direction
leaf_th  = 2;           // Z thickness

pin_d    = 4;
pin_len  = 32;

knuckle_od = 8;
knuckle_id = 4.6;
knuckle_len = 6;

m3_through_d = 3.2;
m3_csk_top_d  = 6;
m3_csk_depth  = 1;

// Geometry positions
// Open 180°: both leaves lie in the same plane, with leaves extending
// to opposite sides of the hinge axis along X.
left_leaf_x  = -(pin_len/2 + leaf_w/2);
right_leaf_x =  (pin_len/2 + leaf_w/2);

// Knuckles distributed over 30mm in 5 sections of 6mm each.
// Each knuckle is centered in its section.
// Left leaf: outer 2 + center 1 => sections 1,3,5 => y = -12, 0, 12
// Right leaf: middle 2 => sections 2,4 => y = -6, 6
left_knuckle_y  = [-12, 0, 12];
right_knuckle_y = [-6, 6];

// M3 holes: 3 per leaf, along Y at 8mm pitch, placed on the side
// away from the knuckles.
hole_y = [-8, 0, 8];

module leaf_plate(side=1) {
    // side: -1 left, +1 right
    translate([side * (pin_len/2 + leaf_w/2), 0, 0])
        cube([leaf_w, leaf_len, leaf_th], center=true);
}

module knuckle_segment(yc) {
    translate([0, yc, 0])
    difference() {
        cylinder(d=knuckle_od, h=knuckle_len, center=true);
        cylinder(d=knuckle_id, h=knuckle_len + 2, center=true);
    }
}

module pin_axis() {
    // Pin axis is centered on X=0, Z=0 and runs along Y
    rotate([90,0,0])
        cylinder(d=pin_d, h=pin_len, center=true);
}

module countersunk_hole_at(x, y) {
    // Through-hole
    translate([x, y, 0])
        cylinder(d=m3_through_d, h=leaf_th + 0.4, center=true);

    // Countersink from the outer face of the leaf
    // Left leaf outer face is x = left_leaf_x - leaf_w/2
    // Right leaf outer face is x = right_leaf_x + leaf_w/2
}

module leaf_with_knuckles(side=1) {
    // side: -1 left leaf, +1 right leaf
    holes_x = side < 0 ? (left_leaf_x - leaf_w/2 + 0.8) : (right_leaf_x + leaf_w/2 - 0.8);
    csk_dir = side < 0 ? -1 : 1;

    difference() {
        union() {
            // Leaf plate
            translate([side * (pin_len/2 + leaf_w/2), 0, 0])
                cube([leaf_w, leaf_len, leaf_th], center=true);

            // Knuckles
            if (side < 0) {
                for (yy = left_knuckle_y)
                    knuckle_segment(yy);
            } else {
                for (yy = right_knuckle_y)
                    knuckle_segment(yy);
            }
        }

        // M3 through holes + countersinks
        for (yy = hole_y) {
            translate([holes_x, yy, 0]) {
                // through
                cube([0,0,0]); // no-op to keep scope simple

                // Drill through along X
                rotate([0,90,0])
                    cylinder(d=m3_through_d, h=leaf_w + 2, center=true);

                // Countersink from outer face
                translate([csk_dir * (leaf_w/2 - 0.01), 0, 0])
                    rotate([0,90,0])
                        cylinder(d1=m3_csk_top_d, d2=m3_through_d, h=m3_csk_depth, center=false);
            }
        }
    }
}

union() {
    leaf_with_knuckles(-1);
    leaf_with_knuckles(+1);
    pin_axis();
}
パラメータ (11)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIditer-png-2_gpt-5.4-mini-1d28a01d4ac2-2026-04-28T17-31-24-512Z
matrixIditer-png-2/gpt-5.4-mini
signature1d28a01d4ac2758e…
provideropenai
modelgpt-5.4-mini-2026-03-17
harnessbare
statussuccess
duration6.26s (wallclock: load + prompt eval + generation + network)
tokens2014 in / 979 out
wallclock tok/s156.3 tok/s (end-to-end)
cost$0.0037
createdAt2026-04-28T17:31:24.512Z
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 ... ``` のフェンスで囲んで出力してください。
コードのみで、追加の説明は不要です。