vibe-openscad

bare-think-off/gemma-4-31b-it / tier-2-l-bracket

success tier 2

bare (gemma 4 31b)

render
bare render of tier-2-l-bracket
loading STL…
success 14.7s · 252/496t · $0
SCAD (57 lines)
// Parameters
width = 50;
depth = 40;
height = 40;
thickness = 3;

hole_dia = 4.5;
countersink_dia = 8;
countersink_depth = 2;
hole_margin = 10;

// L-Bracket Body
union() {
    // Horizontal flange (XY plane, extending +Y)
    cube([width, depth, thickness]);
    
    // Vertical flange (XZ plane, extending +Z)
    cube([width, thickness, height]);
}

// Module for a countersunk hole
module countersunk_hole() {
    union() {
        // Through hole
        cylinder(d = hole_dia, h = thickness + 2, center = false);
        // Countersink (cone)
        translate([0, 0, thickness])
            cylinder(d1 = hole_dia, d2 = countersink_dia, h = countersink_depth);
    }
}

// Subtract holes
difference() {
    // The body is already defined above, but for difference we need to group it
    union() {
        cube([width, depth, thickness]);
        cube([width, thickness, height]);
    }

    // Holes on Horizontal surface (Top side, looking down -Z)
    // Since the body is 0 to thickness, the countersink must be at the top.
    // To flip the countersink to the top, we rotate the hole module.
    for (x = [hole_margin, width - hole_margin]) {
        translate([x, depth / 2, thickness])
            rotate([180, 0, 0])
                countersunk_hole();
    }

    // Holes on Vertical surface (Front side, looking -Y)
    // The vertical face is at Y=0 to thickness. 
    // The countersink must be at Y=0 (outer side).
    for (x = [hole_margin, width - hole_margin]) {
        translate([x, 0, height / 2])
            rotate([0, -90, 0])
                countersunk_hole();
    }
}
パラメータ (8) —
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare-think-off_gemma-4-31b-it-49badf9682e6-2026-10-06T19-38-24-436Z
matrixIdbare-think-off/gemma-4-31b-it
signature49badf9682e6bbca…
providergoogle
modelgemma-4-31b-it
harnessbare
statussuccess
duration14.73s (wallclock: load + prompt eval + generation + network)
tokens252 in / 496 out
wallclock tok/s33.7 tok/s (end-to-end)
cost$0
createdAt2026-10-06T19:38:24.436Z
gitCommitf9f85ea20c03
openscadOpenSCAD version 2026.09.23

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