vibe-openscad

tier-2-l-bracket / gemini-3.6-flash

2 run / 累計 7.6s / 累計 $0.0045

gemini flash 3.6 bare-think-off

bare (provider default effort)

run detail →
render
bare render of tier-2-l-bracket
loading STL…
success 3.8s · 252/551t · $0.0023
SCAD (48 lines)
// パラメータ定義
width = 50;         // 金具の幅 (X方向)
depth = 40;         // 水平面の奥行き (Y方向)
height = 40;        // 垂直面の高さ (Z方向)
thickness = 3;      // 板厚

hole_d1 = 4.5;      // 貫通穴径
hole_d2 = 8.0;      // 皿モミ最大径
hole_cd = 2.0;      // 皿モミ深さ
hole_margin = 10;   // 縁からの距離

$fn = 64;           // 円の描画精度

// 皿穴モジュール (Z=0 から -Z 方向に向かって配置する形状)
module countersunk_hole() {
    translate([0, 0, thickness + 0.1])
        cylinder(d = hole_d1, h = thickness + 0.2);
    translate([0, 0, thickness - hole_cd])
        cylinder(d1 = hole_d1, d2 = hole_d2, h = hole_cd + 0.01);
}

difference() {
    // 1. 基本となるL字形状
    union() {
        // 水平面 (+Y方向、-Z方向に板厚)
        translate([0, 0, -thickness])
            cube([width, depth, thickness]);
        
        // 垂直面 (+Z方向、-X方向に板厚)
        translate([-thickness, 0, 0])
            cube([thickness, depth, height]);
    }

    // 2. 皿穴の配置
    // 水平面の穴 (2箇所)
    translate([hole_margin, depth / 2, 0])
        rotate([0, 180, 0]) countersunk_hole();
    
    translate([width - hole_margin, depth / 2, 0])
        rotate([0, 180, 0]) countersunk_hole();

    // 垂直面の穴 (2箇所)
    translate([0, depth / 2, hole_margin])
        rotate([0, -90, 0]) countersunk_hole();
    
    translate([0, depth / 2, height - hole_margin])
        rotate([0, -90, 0]) countersunk_hole();
}
パラメータ (8) —
スライダを動かすと openscad-wasm で再レンダリング

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

variant: thinking

offnot run
—
adaptivenot run
—
dynamic (default) success →
dynamic
3.8s · 252/551t · $0.0023
SCAD (48 lines)
// パラメータ定義
width = 50;         // 金具の幅 (X方向)
depth = 40;         // 水平面の奥行き (Y方向)
height = 40;        // 垂直面の高さ (Z方向)
thickness = 3;      // 板厚

hole_d1 = 4.5;      // 貫通穴径
hole_d2 = 8.0;      // 皿モミ最大径
hole_cd = 2.0;      // 皿モミ深さ
hole_margin = 10;   // 縁からの距離

$fn = 64;           // 円の描画精度

// 皿穴モジュール (Z=0 から -Z 方向に向かって配置する形状)
module countersunk_hole() {
    translate([0, 0, thickness + 0.1])
        cylinder(d = hole_d1, h = thickness + 0.2);
    translate([0, 0, thickness - hole_cd])
        cylinder(d1 = hole_d1, d2 = hole_d2, h = hole_cd + 0.01);
}

difference() {
    // 1. 基本となるL字形状
    union() {
        // 水平面 (+Y方向、-Z方向に板厚)
        translate([0, 0, -thickness])
            cube([width, depth, thickness]);
        
        // 垂直面 (+Z方向、-X方向に板厚)
        translate([-thickness, 0, 0])
            cube([thickness, depth, height]);
    }

    // 2. 皿穴の配置
    // 水平面の穴 (2箇所)
    translate([hole_margin, depth / 2, 0])
        rotate([0, 180, 0]) countersunk_hole();
    
    translate([width - hole_margin, depth / 2, 0])
        rotate([0, 180, 0]) countersunk_hole();

    // 垂直面の穴 (2箇所)
    translate([0, depth / 2, hole_margin])
        rotate([0, -90, 0]) countersunk_hole();
    
    translate([0, depth / 2, height - hole_margin])
        rotate([0, -90, 0]) countersunk_hole();
}