vibe-openscad

bare-think-off/gemini-2.5-flash-lite / tier-2-l-bracket

success tier 2

bare (gemini 2.5 flash-lite)

render
bare render of tier-2-l-bracket
loading STL…
success 5.4s · 252/1331t · $0.0006
SCAD (114 lines)
// L-bracket dimensions
width = 50;
depth = 40;
height = 40;
thickness = 3;

// Hole dimensions
hole_diameter = 4.5;
countersink_diameter = 8;
countersink_depth = 2;
hole_offset_from_edge = 10;
hole_spacing_factor = 0.5; // For spacing holes symmetrically on each flange

module l_bracket() {
    // Base flange (horizontal)
    cube([width, depth, thickness]);

    // Vertical flange
    translate([0, 0, thickness])
    cube([width, thickness, height]);
}

module countersink_hole(hole_pos_x, hole_pos_y, hole_pos_z, normal_vector) {
    translate(hole_pos_x) {
        // Main hole
        cylinder(h = thickness * 2, r = hole_diameter / 2, center = true);

        // Countersink
        linear_extrude(height = countersink_depth, convexity = 10) {
            difference() {
                circle(r = countersink_diameter / 2);
                circle(r = hole_diameter / 2);
            }
        }
    }
}

module create_holes() {
    // Holes on the horizontal flange (facing +Z)
    // Position them on the center line of the width, and offset from the edges of depth
    hole_y_offset = depth / 2 - hole_offset_from_edge;
    hole_center_x = width / 2;
    hole_spacing_y = depth * hole_spacing_factor;

    // Left hole on horizontal flange
    translate([hole_center_x, hole_y_offset - hole_spacing_y/2, thickness])
    rotate([90, 0, 0]) // Rotate to face upwards
    cylinder(h = thickness * 2, r = countersink_diameter / 2, center = true);

    // Right hole on horizontal flange
    translate([hole_center_x, hole_y_offset + hole_spacing_y/2, thickness])
    rotate([90, 0, 0]) // Rotate to face upwards
    cylinder(h = thickness * 2, r = countersink_diameter / 2, center = true);

    // Holes on the vertical flange (facing +Y)
    // Position them on the center line of the width, and offset from the edges of height
    hole_z_offset = height / 2 - hole_offset_from_edge;
    hole_spacing_z = height * hole_spacing_factor;

    // Left hole on vertical flange
    translate([hole_center_x, thickness, thickness + hole_z_offset - hole_spacing_z/2])
    rotate([0, 90, 0]) // Rotate to face outwards
    cylinder(h = width * 2, r = countersink_diameter / 2, center = true);

    // Right hole on vertical flange
    translate([hole_center_x, thickness, thickness + hole_z_offset + hole_spacing_z/2])
    rotate([0, 90, 0]) // Rotate to face outwards
    cylinder(h = width * 2, r = countersink_diameter / 2, center = true);
}

module l_bracket_with_holes() {
    difference() {
        l_bracket();

        // Cut the holes
        // Horizontal flange holes
        translate([width/2, depth/2 - hole_offset_from_edge, thickness])
        rotate([90, 0, 0])
        cylinder(h = thickness + 1, r = hole_diameter/2, center = true);

        translate([width/2, depth/2 + hole_offset_from_edge, thickness])
        rotate([90, 0, 0])
        cylinder(h = thickness + 1, r = hole_diameter/2, center = true);

        // Vertical flange holes
        translate([width/2, thickness, height/2 - hole_offset_from_edge])
        rotate([0, 90, 0])
        cylinder(h = thickness + 1, r = hole_diameter/2, center = true);

        translate([width/2, thickness, height/2 + hole_offset_from_edge])
        rotate([0, 90, 0])
        cylinder(h = thickness + 1, r = hole_diameter/2, center = true);

        // Countersink cuts on the horizontal flange
        translate([width/2, depth/2 - hole_offset_from_edge, thickness])
        rotate([90, 0, 0])
        cylinder(h = countersink_depth + 0.1, r = countersink_diameter/2, center = true);

        translate([width/2, depth/2 + hole_offset_from_edge, thickness])
        rotate([90, 0, 0])
        cylinder(h = countersink_depth + 0.1, r = countersink_diameter/2, center = true);

        // Countersink cuts on the vertical flange
        translate([width/2, thickness, height/2 - hole_offset_from_edge])
        rotate([0, 90, 0])
        cylinder(h = countersink_depth + 0.1, r = countersink_diameter/2, center = true);

        translate([width/2, thickness, height/2 + hole_offset_from_edge])
        rotate([0, 90, 0])
        cylinder(h = countersink_depth + 0.1, r = countersink_diameter/2, center = true);
    }
}

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

meta

runIdbare-think-off_gemini-2.5-flash-lite-94201f076ef0-2026-04-28T18-47-26-144Z
matrixIdbare-think-off/gemini-2.5-flash-lite
signature94201f076ef02859…
providergoogle
modelgemini-2.5-flash-lite
harnessbare
statussuccess
duration5.38s (wallclock: load + prompt eval + generation + network)
tokens252 in / 1331 out
wallclock tok/s247.4 tok/s (end-to-end)
cost$0.0006
createdAt2026-04-28T18:47:26.144Z
gitCommit781e6c683dda
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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。