vibe-openscad

bare-high/gpt-5.4 / tier-3-butt-hinge

success tier 3

bare (gpt 5.4)

render
bare render of tier-3-butt-hinge
loading STL…
success 192.9s · 592/10109t · $0.1629
SCAD (72 lines)
$fn = 96;

eps = 0.01;

leaf_len   = 30;
leaf_w     = 25;
leaf_t     = 2;

pin_d      = 4;
pin_len    = 32;

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

leaf_y0 = 1;          // leaves and knuckles span Y = 1..31
leaf_inner_x = 3;     // inner edge of flat leaf from hinge axis
hole_x = 21;          // countersunk hole center, far from knuckle
hole_ys = [8, 16, 24];

module y_cylinder(d, h) {
    rotate([90, 0, 0]) cylinder(d = d, h = h, center = true);
}

module knuckle_segment(idx) {
    yc = leaf_y0 + idx * knuckle_len + knuckle_len / 2;
    translate([0, yc, 0])
    difference() {
        y_cylinder(knuckle_od, knuckle_len);
        y_cylinder(knuckle_id, knuckle_len + 2 * eps);
    }
}

module mounting_hole() {
    union() {
        translate([0, 0, -leaf_t/2 - eps])
            cylinder(h = leaf_t + 2*eps, d = 3.2);
        translate([0, 0, -eps])
            cylinder(h = 1 + eps, d1 = 3.2, d2 = 6);
    }
}

module leaf_plate(side) {
    x0 = (side < 0) ? -(leaf_inner_x + leaf_w) : leaf_inner_x;
    translate([x0, leaf_y0, -leaf_t/2])
        cube([leaf_w, leaf_len, leaf_t]);
}

module leaf(side) {
    idxs = (side < 0) ? [0, 2, 4] : [1, 3];

    difference() {
        union() {
            leaf_plate(side);
            for (i = idxs)
                knuckle_segment(i);
        }

        for (yh = hole_ys)
            translate([side * hole_x, yh, 0])
                mounting_hole();
    }
}

module pin_axis() {
    translate([0, pin_len/2, 0])
        y_cylinder(pin_d, pin_len);
}

leaf(-1);
leaf( 1);
pin_axis();
パラメータ (12)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare-high_gpt-5.4-3b3befb066eb-2026-04-28T17-24-37-734Z
matrixIdbare-high/gpt-5.4
signature3b3befb066ebca1a…
provideropenai
modelgpt-5.4-2026-03-05
harnessbare
statussuccess
duration192.94s (wallclock: load + prompt eval + generation + network)
tokens592 in / 10109 out
wallclock tok/s52.4 tok/s (end-to-end)
cost$0.1629
createdAt2026-04-28T17:24:37.734Z
gitCommitbe87c9f2adaf
openscadOpenSCAD version 2026.04.27

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