vibe-openscad

bare-think-off/claude-opus-4-8 / tier-2-l-bracket

success tier 2

bare (claude opus 4.8)

render
bare render of tier-2-l-bracket
loading STL…
success 11.0s · 381/865t · $0.0235
SCAD (56 lines)
// L-bracket with countersunk holes
// 内側コーナーが原点

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

hole_dia   = 4.5;  // 貫通穴 Φ
cs_dia     = 8;    // 皿座面 Φ
cs_depth   = 2;    // 皿座面 深さ
edge_off   = 10;   // 縁からのオフセット
x_off      = 12.5; // 中心線からの左右オフセット

eps = 0.01;

// 皿穴 (Z軸方向に貫通、皿座面は上(+Z)側)
// h: 板厚, 座面は z = h 側(外側)に開く
module countersink(h) {
    // 貫通穴
    translate([0, 0, -eps])
        cylinder(h = h + 2*eps, d = hole_dia, $fn = 48);
    // 皿座面(外側 = +Z 側)
    translate([0, 0, h - cs_depth])
        cylinder(h = cs_depth + eps, d = cs_dia, $fn = 48);
}

difference() {
    union() {
        // 水平面 (+Y 方向に伸びる、厚みは -Z 側)
        translate([0, 0, -thickness])
            cube([width, depth, thickness]);
        // 垂直面 (+Z 方向に伸びる、厚みは -Y 側)
        translate([0, -thickness, 0])
            cube([width, thickness, height]);
    }

    // --- 水平面の穴 (外側 = 下面 -Z) ---
    // 水平面の板は z: -thickness .. 0
    // 座面を下側(-Z, 外側)に向けるため反転して配置
    for (dx = [-x_off, x_off]) {
        translate([width/2 + dx, depth - edge_off, 0])
            rotate([180, 0, 0])
                countersink(thickness);
    }

    // --- 垂直面の穴 (外側 = -Y 面) ---
    // 垂直面の板は y: -thickness .. 0
    // 座面を -Y(外側)に向けるため X軸まわりに回転して配置
    for (dx = [-x_off, x_off]) {
        translate([width/2 + dx, 0, height - edge_off])
            rotate([90, 0, 0])
                countersink(thickness);
    }
}
パラメータ (10)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare-think-off_claude-opus-4-8-f9cf214b60a1-2026-06-09T17-40-15-474Z
matrixIdbare-think-off/claude-opus-4-8
signaturef9cf214b60a1f560…
provideranthropic
modelclaude-opus-4-8
harnessbare
statussuccess
duration10.96s (wallclock: load + prompt eval + generation + network)
tokens381 in / 865 out
wallclock tok/s78.9 tok/s (end-to-end)
cost$0.0235
createdAt2026-06-09T17:40:15.474Z
gitCommitc8a77106d384
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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。