vibe-openscad

bare-max/gpt-5.6-luna / tier-3-butt-hinge

success tier 3

bare (gpt 5.6 luna)

render
bare render of tier-3-butt-hinge
loading STL…
success 312.1s · 592/31160t · $0.0375
SCAD (123 lines)
$fn = 96;

leaf_length    = 30;
leaf_width     = 25;
leaf_thickness = 2;

knuckle_count  = 5;
knuckle_length = leaf_length / knuckle_count;
knuckle_outer_d = 8;
knuckle_inner_d = 4.6;

pin_diameter   = 4;
pin_overhang   = 1;
pin_length     = leaf_length + 2 * pin_overhang;

through_hole_diameter = 3.2;
countersink_diameter  = 6;
countersink_depth     = 1;
hole_pitch            = 8;
hole_edge_inset       = 5;

leaf_root_x = knuckle_outer_d / 2;
hole_x      = leaf_root_x + leaf_width - hole_edge_inset;
hole_y      = [
    leaf_length / 2 - hole_pitch,
    leaf_length / 2,
    leaf_length / 2 + hole_pitch
];

cutter_eps = 0.01;

left_knuckle_starts  = [0, 2 * knuckle_length, 4 * knuckle_length];
right_knuckle_starts = [knuckle_length, 3 * knuckle_length];

module cylinder_y(h, d) {
    rotate([-90, 0, 0])
        cylinder(h = h, d = d, center = false);
}

module leaf_plate(side) {
    x_start = (side > 0)
        ? leaf_root_x
        : (-leaf_root_x - leaf_width);

    difference() {
        translate([x_start, 0, -leaf_thickness / 2])
            cube([leaf_width, leaf_length, leaf_thickness]);

        for (yy = hole_y) {
            translate([
                side * hole_x,
                yy,
                -leaf_thickness / 2 - cutter_eps
            ])
                cylinder(
                    h = leaf_thickness + 2 * cutter_eps,
                    d = through_hole_diameter,
                    center = false
                );

            translate([
                side * hole_x,
                yy,
                leaf_thickness / 2 - countersink_depth
            ])
                cylinder(
                    h = countersink_depth,
                    d1 = through_hole_diameter,
                    d2 = countersink_diameter,
                    center = false
                );
        }
    }
}

module knuckle(y_start) {
    translate([0, y_start, 0])
        difference() {
            cylinder_y(knuckle_length, knuckle_outer_d);

            translate([0, -cutter_eps, 0])
                cylinder_y(
                    knuckle_length + 2 * cutter_eps,
                    knuckle_inner_d
                );
        }
}

module left_part() {
    color([0.48, 0.50, 0.54])
        union() {
            leaf_plate(-1);

            for (y_start = left_knuckle_starts) {
                knuckle(y_start);
            }
        }
}

module right_part() {
    color([0.48, 0.50, 0.54])
        union() {
            leaf_plate(1);

            for (y_start = right_knuckle_starts) {
                knuckle(y_start);
            }
        }
}

module pin_part() {
    color([0.72, 0.74, 0.78])
        translate([0, -pin_overhang, 0])
            cylinder_y(pin_length, pin_diameter);
}

module assembly() {
    left_part();
    right_part();
    pin_part();
}

assembly();
パラメータ (14) —
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare-max_gpt-5.6-luna-2ada0b14c2ee-2026-09-05T10-23-01-465Z
matrixIdbare-max/gpt-5.6-luna
signature2ada0b14c2ee92cf…
provideropenai
modelgpt-5.6-luna
harnessbare
statussuccess
duration312.12s (wallclock: load + prompt eval + generation + network)
tokens592 in / 31160 out
wallclock tok/s99.8 tok/s (end-to-end)
cost$0.0375
createdAt2026-09-05T10:23:01.466Z
gitCommitc3c9301f89b1
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 ... ``` のフェンスで囲んで出力してください。
コードのみで、追加の説明は不要です。