vibe-openscad

bare/gemini-3.7-flash / tier-2-l-bracket

success tier 2

bare (gemini 3.7 flash)

render
bare render of tier-2-l-bracket
loading STL…
success 8.5s · 252/586t · $0.0024
SCAD (55 lines)
$fn = 64;

// 寸法パラメータ
width = 50;        // 幅 (X)
length_y = 40;     // 水平面奥行き (Y)
height_z = 40;     // 垂直面高さ (Z)
thickness = 3;     // 板厚

// 皿穴パラメータ
d_through = 4.5;   // 貫通穴径
d_cs = 8.0;        // 皿頭最大径
depth_cs = 2.0;    // 皿座面深さ
margin_x = 10;     // 左右端からの距離

// 皿穴モジュール (+Z方向へ向かってボルトが貫通)
module countersunk_hole() {
    union() {
        // 貫通穴
        translate([0, 0, -1])
            cylinder(d = d_through, h = thickness + 2);
        // 皿座面 (外側から内側に向けて縮径)
        translate([0, 0, -0.01])
            cylinder(d1 = d_cs, d2 = d_through, h = depth_cs + 0.01);
    }
}

difference() {
    // L字金具本体 (内側コーナーが [X, 0, 0])
    union() {
        // 水平面 (+Y方向, Zは -thickness 〜 0)
        translate([0, 0, -thickness])
            cube([width, length_y, thickness]);

        // 垂直面 (+Z方向, Yは -thickness 〜 0)
        translate([0, -thickness, 0])
            cube([width, thickness, height_z]);

        // コーナー結合部
        translate([0, -thickness, -thickness])
            cube([width, thickness, thickness]);
    }

    // 水平面の皿穴 (外側の面 Z = -thickness から +Z 方向へ)
    for (x_pos = [margin_x, width - margin_x]) {
        translate([x_pos, length_y / 2, -thickness])
            countersunk_hole();
    }

    // 垂直面の皿穴 (外側の面 Y = -thickness から +Y 方向へ)
    for (x_pos = [margin_x, width - margin_x]) {
        translate([x_pos, -thickness, height_z / 2])
            rotate([-90, 0, 0])
                countersunk_hole();
    }
}
パラメータ (8) —
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare_gemini-3.7-flash-2ef8917f683e-2026-09-05T10-25-50-338Z
matrixIdbare/gemini-3.7-flash
signature2ef8917f683ea971…
providergoogle
modelgemini-3.7-flash
harnessbare
statussuccess
duration8.47s (wallclock: load + prompt eval + generation + network)
tokens252 in / 586 out
wallclock tok/s69.2 tok/s (end-to-end)
cost$0.0024
createdAt2026-09-05T10:25:50.338Z
gitCommitc3c9301f89b1
openscadOpenSCAD version 2026.04.27

prompt

OpenSCAD で、L 字に折れた金具(L-bracket)を作ってください。

形状:
- 水平面と垂直面の 2 つのフランジが直角に繋がっている
- 水平面は 50mm × 40mm(幅 × 奥行き)
- 垂直面は 50mm × 40mm(幅 × 高さ)
- 板厚はどちらも 3mm
- 内側コーナーが原点になるように配置(水平面は +Y 方向、垂直面は +Z 方向に伸びる)

皿穴(countersunk holes):
- 各面に 2 個ずつ、合計 4 個
- M4 ねじ用(貫通穴 Φ4.5mm + 皿座面 Φ8mm × 深さ 2mm)
- 各面の中心線上で、面の縁から 10mm 内側、左右対称に 2 個並べる
- 皿座面は外側(ボルト頭が当たる側)に向ける

完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。