vibe-openscad

tier-2-l-bracket / gpt-5.6-terra

6 run / 累計 350.4s / 累計 $0.4105

openai gpt 5.6 terra bare

bare (provider default effort)

run detail →
render
bare render of tier-2-l-bracket
loading STL…
success 15.2s · 294/1415t · $0.0176
SCAD (58 lines)
$fn = 64;

// 寸法
width     = 50;
flangeLen = 40;
thickness = 3;

// 穴寸法
through_d = 4.5;
csk_d     = 8;
csk_depth = 2;

// 穴位置
hole_x = width / 2 - 10;
hole_y = flangeLen / 2;
hole_z = flangeLen / 2;

module horizontal_hole(x, y) {
    // 貫通穴
    translate([x, y, -thickness - 1])
        cylinder(h = thickness + 2, d = through_d);

    // 外側(下面)からの皿穴
    translate([x, y, -thickness])
        cylinder(h = csk_depth, d1 = csk_d, d2 = through_d);
}

module vertical_hole(x, z) {
    // 貫通穴
    translate([x, 1, z])
        rotate([90, 0, 0])
            cylinder(h = thickness + 2, d = through_d);

    // 外側(-Y側)からの皿穴
    translate([x, -1, z])
        rotate([90, 0, 0])
            cylinder(h = csk_depth, d1 = through_d, d2 = csk_d);
}

difference() {
    union() {
        // 水平フランジ:内側面 Z=0、+Y方向へ伸長
        translate([-width / 2, 0, -thickness])
            cube([width, flangeLen, thickness]);

        // 垂直フランジ:内側面 Y=0、+Z方向へ伸長
        translate([-width / 2, -thickness, 0])
            cube([width, thickness, flangeLen]);
    }

    // 水平面の穴
    horizontal_hole(-hole_x, hole_y);
    horizontal_hole( hole_x, hole_y);

    // 垂直面の穴
    vertical_hole(-hole_x, hole_z);
    vertical_hole( hole_x, hole_z);
}
パラメータ (6) —
スライダを動かすと 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: effort

low success →
low
20.2s · 294/1641t · $0.0203
SCAD (58 lines)
// L-bracket dimensions
width     = 50;
flangeLen = 40;
thickness = 3;

// Hole dimensions
hole_d     = 4.5;
csk_d      = 8;
csk_depth  = 2;

// Hole positions
hole_x = [-15, 15];
hole_y = 20;
hole_z = 20;

$fn = 64;

module horizontal_countersunk_hole(x, y) {
    // Through hole
    translate([x, y, -thickness - 0.01])
        cylinder(h = thickness + 0.02, d = hole_d);

    // Countersink from the outer bottom face
    translate([x, y, -thickness])
        cylinder(h = csk_depth, d1 = csk_d, d2 = hole_d);
}

module vertical_countersunk_hole(x, z) {
    // Through hole
    translate([x, -thickness - 0.01, z])
        rotate([90, 0, 0])
            cylinder(h = thickness + 0.02, d = hole_d);

    // Countersink from the outer rear face
    translate([x, -thickness, z])
        rotate([90, 0, 0])
            cylinder(h = csk_depth, d1 = csk_d, d2 = hole_d);
}

difference() {
    union() {
        // Horizontal flange: +Y direction
        translate([-width / 2, 0, -thickness])
            cube([width, flangeLen, thickness]);

        // Vertical flange: +Z direction
        translate([-width / 2, -thickness, 0])
            cube([width, thickness, flangeLen]);
    }

    // Horizontal flange holes
    for (x = hole_x)
        horizontal_countersunk_hole(x, hole_y);

    // Vertical flange holes
    for (x = hole_x)
        vertical_countersunk_hole(x, hole_z);
}
medium (default) success →
medium
15.2s · 294/1415t · $0.0176
SCAD (58 lines)
$fn = 64;

// 寸法
width     = 50;
flangeLen = 40;
thickness = 3;

// 穴寸法
through_d = 4.5;
csk_d     = 8;
csk_depth = 2;

// 穴位置
hole_x = width / 2 - 10;
hole_y = flangeLen / 2;
hole_z = flangeLen / 2;

module horizontal_hole(x, y) {
    // 貫通穴
    translate([x, y, -thickness - 1])
        cylinder(h = thickness + 2, d = through_d);

    // 外側(下面)からの皿穴
    translate([x, y, -thickness])
        cylinder(h = csk_depth, d1 = csk_d, d2 = through_d);
}

module vertical_hole(x, z) {
    // 貫通穴
    translate([x, 1, z])
        rotate([90, 0, 0])
            cylinder(h = thickness + 2, d = through_d);

    // 外側(-Y側)からの皿穴
    translate([x, -1, z])
        rotate([90, 0, 0])
            cylinder(h = csk_depth, d1 = through_d, d2 = csk_d);
}

difference() {
    union() {
        // 水平フランジ:内側面 Z=0、+Y方向へ伸長
        translate([-width / 2, 0, -thickness])
            cube([width, flangeLen, thickness]);

        // 垂直フランジ:内側面 Y=0、+Z方向へ伸長
        translate([-width / 2, -thickness, 0])
            cube([width, thickness, flangeLen]);
    }

    // 水平面の穴
    horizontal_hole(-hole_x, hole_y);
    horizontal_hole( hole_x, hole_y);

    // 垂直面の穴
    vertical_hole(-hole_x, hole_z);
    vertical_hole( hole_x, hole_z);
}
high success →
high
14.5s · 294/1485t · $0.0184
SCAD (65 lines)
$fn = 64;

// 寸法
width          = 50;
flange_length  = 40;
thickness      = 3;

hole_diameter  = 4.5;
cs_diameter    = 8;
cs_depth       = 2;

edge_offset    = 10;
hole_x         = width / 2 - edge_offset;

// 水平面の穴(外側: -Z 側)
module horizontal_hole(x, y) {
    // 貫通穴
    translate([x, y, -thickness - 0.1])
        cylinder(h = thickness + 0.2, d = hole_diameter);

    // 皿穴
    translate([x, y, -thickness - 0.1])
        cylinder(
            h  = cs_depth + 0.1,
            d1 = cs_diameter,
            d2 = hole_diameter
        );
}

// 垂直面の穴(外側: -Y 側)
module vertical_hole(x, z) {
    // 貫通穴
    translate([x, -thickness - 0.1, z])
        rotate([-90, 0, 0])
            cylinder(h = thickness + 0.2, d = hole_diameter);

    // 皿穴
    translate([x, -thickness - 0.1, z])
        rotate([-90, 0, 0])
            cylinder(
                h  = cs_depth + 0.1,
                d1 = cs_diameter,
                d2 = hole_diameter
            );
}

difference() {
    union() {
        // 水平フランジ:+Y 方向へ伸びる
        translate([-width / 2, 0, -thickness])
            cube([width, flange_length, thickness]);

        // 垂直フランジ:+Z 方向へ伸びる
        translate([-width / 2, -thickness, 0])
            cube([width, thickness, flange_length]);
    }

    // 水平面の穴
    horizontal_hole(-hole_x, flange_length / 2);
    horizontal_hole( hole_x, flange_length / 2);

    // 垂直面の穴
    vertical_hole(-hole_x, flange_length / 2);
    vertical_hole( hole_x, flange_length / 2);
}
max success →
max
261.1s · 294/25443t · $0.3059
SCAD (63 lines)
$fn = 64;

width = 50;
depth = 40;
vertical_height = 40;
thickness = 3;

through_diameter = 4.5;
countersink_diameter = 8;
countersink_depth = 2;

edge_inset = 10;
eps = 0.01;

module bracket_body() {
    union() {
        translate([-width / 2, 0, -thickness])
            cube([width, depth, thickness]);

        translate([-width / 2, -thickness, 0])
            cube([width, thickness, vertical_height]);

        translate([-width / 2, -thickness, -thickness])
            cube([width, thickness, thickness]);
    }
}

module horizontal_countersunk_hole(px, py) {
    translate([px, py, -thickness - eps])
        cylinder(h = thickness + 2 * eps, d = through_diameter);

    translate([px, py, -thickness])
        cylinder(
            h = countersink_depth,
            d1 = countersink_diameter,
            d2 = through_diameter
        );
}

module vertical_countersunk_hole(px, pz) {
    translate([px, -thickness - eps, pz])
        rotate([-90, 0, 0])
            cylinder(h = thickness + 2 * eps, d = through_diameter);

    translate([px, -thickness, pz])
        rotate([-90, 0, 0])
            cylinder(
                h = countersink_depth,
                d1 = countersink_diameter,
                d2 = through_diameter
            );
}

hole_x = width / 2 - edge_inset;

difference() {
    bracket_body();

    for (x = [-hole_x, hole_x]) {
        horizontal_countersunk_hole(x, depth / 2);
        vertical_countersunk_hole(x, vertical_height / 2);
    }
}
xhigh success →
xhigh
24.1s · 294/2514t · $0.0308
SCAD (55 lines)
// L-bracket dimensions
width  = 50;
depth  = 40;
height = 40;
thick  = 3;

// Hole dimensions
hole_d       = 4.5;
csk_d        = 8;
csk_depth    = 2;
edge_offset  = 10;
hole_x       = width / 2 - edge_offset;

$fn = 64;

// Horizontal flange hole: countersink faces downward (-Z)
module horizontal_hole(x, y) {
    translate([x, y, -thick - 0.1])
        cylinder(h = thick + 0.2, d = hole_d);

    translate([x, y, -thick])
        cylinder(h = csk_depth + 0.01, d1 = csk_d, d2 = hole_d);
}

// Vertical flange hole: countersink faces outward (-Y)
module vertical_hole(x, z) {
    translate([x, -thick - 0.1, z])
        rotate([-90, 0, 0])
            cylinder(h = thick + 0.2, d = hole_d);

    translate([x, -thick, z])
        rotate([-90, 0, 0])
            cylinder(h = csk_depth + 0.01, d1 = csk_d, d2 = hole_d);
}

difference() {
    union() {
        // Horizontal flange: extends in +Y direction
        translate([-width / 2, 0, -thick])
            cube([width, depth, thick]);

        // Vertical flange: extends in +Z direction
        translate([-width / 2, -thick, 0])
            cube([width, thick, height]);

        // Solid corner connection
        translate([-width / 2, -thick, -thick])
            cube([width, thick, thick]);
    }

    for (x = [-hole_x, hole_x]) {
        horizontal_hole(x, depth / 2);
        vertical_hole(x, height / 2);
    }
}