vibe-openscad

tier-2-l-bracket / gpt-6-luna

6 run / 累計 235.1s / 累計 $0.0127

openai gpt 6 luna bare

bare (provider default effort)

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

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

hole_diameter = 4.5;
countersink_diameter = 8;
countersink_depth = 2;

module bracket() {
    union() {
        // Horizontal flange: extends in +Y; inside face is at Z=0.
        translate([-width/2, 0, -thickness])
            cube([width, depth, thickness]);

        // Vertical flange: extends in +Z; inside face is at Y=0.
        translate([-width/2, -thickness, 0])
            cube([width, thickness, height]);

        // Material at the outside corner joins the two flanges.
        translate([-width/2, -thickness, -thickness])
            cube([width, thickness, thickness]);
    }
}

difference() {
    bracket();

    // Horizontal flange holes, countersinks facing outward (-Z).
    for (y = [10, depth - 10]) {
        translate([0, y, -thickness - 0.1])
            cylinder(h = thickness + 0.2, d = hole_diameter);

        translate([0, y, -thickness])
            cylinder(
                h = countersink_depth,
                d1 = countersink_diameter,
                d2 = hole_diameter
            );
    }

    // Vertical flange holes, countersinks facing outward (-Y).
    for (z = [10, height - 10]) {
        translate([0, -thickness - 0.1, z])
            rotate([-90, 0, 0])
                cylinder(h = thickness + 0.2, d = hole_diameter);

        translate([0, -thickness, z])
            rotate([-90, 0, 0])
                cylinder(
                    h = countersink_depth,
                    d1 = countersink_diameter,
                    d2 = hole_diameter
                );
    }
}
パラメータ (7) —
スライダを動かすと 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
12.4s · 294/1355t · $0.0007
SCAD (64 lines)
$fn = 64;

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

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

module horizontal_hole(y) {
    // Through-hole
    translate([0, y, -thickness])
        cylinder(d = through_diameter, h = thickness);

    // Countersink on the outside face (z = -thickness)
    translate([0, y, -thickness])
        cylinder(
            h = countersink_depth,
            d1 = countersink_diameter,
            d2 = through_diameter
        );
}

module vertical_hole(z) {
    // Through-hole, along the Y axis
    translate([0, -thickness, z])
        rotate([-90, 0, 0])
            cylinder(d = through_diameter, h = thickness);

    // Countersink on the outside face (y = -thickness)
    translate([0, -thickness, z])
        rotate([-90, 0, 0])
            cylinder(
                h = countersink_depth,
                d1 = countersink_diameter,
                d2 = through_diameter
            );
}

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

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

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

    // Horizontal flange holes, 10 mm from each end
    horizontal_hole(10);
    horizontal_hole(depth - 10);

    // Vertical flange holes, 10 mm from each end
    vertical_hole(10);
    vertical_hole(height - 10);
}
medium (default) success →
medium
20.9s · 294/2088t · $0.0011
SCAD (58 lines)
$fn = 64;

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

hole_diameter = 4.5;
countersink_diameter = 8;
countersink_depth = 2;

module bracket() {
    union() {
        // Horizontal flange: extends in +Y; inside face is at Z=0.
        translate([-width/2, 0, -thickness])
            cube([width, depth, thickness]);

        // Vertical flange: extends in +Z; inside face is at Y=0.
        translate([-width/2, -thickness, 0])
            cube([width, thickness, height]);

        // Material at the outside corner joins the two flanges.
        translate([-width/2, -thickness, -thickness])
            cube([width, thickness, thickness]);
    }
}

difference() {
    bracket();

    // Horizontal flange holes, countersinks facing outward (-Z).
    for (y = [10, depth - 10]) {
        translate([0, y, -thickness - 0.1])
            cylinder(h = thickness + 0.2, d = hole_diameter);

        translate([0, y, -thickness])
            cylinder(
                h = countersink_depth,
                d1 = countersink_diameter,
                d2 = hole_diameter
            );
    }

    // Vertical flange holes, countersinks facing outward (-Y).
    for (z = [10, height - 10]) {
        translate([0, -thickness - 0.1, z])
            rotate([-90, 0, 0])
                cylinder(h = thickness + 0.2, d = hole_diameter);

        translate([0, -thickness, z])
            rotate([-90, 0, 0])
                cylinder(
                    h = countersink_depth,
                    d1 = countersink_diameter,
                    d2 = hole_diameter
                );
    }
}
high success →
high
19.3s · 294/1995t · $0.0010
SCAD (53 lines)
$fn = 64;

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

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

hole_x = [-width / 2 + edge_offset, width / 2 - edge_offset];

difference() {
    union() {
        // Horizontal flange: extends in +Y, with its inner face at Z=0
        translate([-width / 2, 0, -thickness])
            cube([width, depth, thickness]);

        // Vertical flange: extends in +Z, with its inner face at Y=0
        translate([-width / 2, -thickness, 0])
            cube([width, thickness, height]);

        // Material joining the flanges at the inner corner
        translate([-width / 2, -thickness, -thickness])
            cube([width, thickness, thickness]);
    }

    // Horizontal flange holes; countersinks face outward (-Z)
    for (x = hole_x) {
        translate([x, depth / 2, -thickness - 0.1])
            cylinder(h = thickness + 0.2, d = through_diameter);

        translate([x, depth / 2, -thickness])
            cylinder(h = countersink_depth,
                     d1 = countersink_diameter,
                     d2 = through_diameter);
    }

    // Vertical flange holes; countersinks face outward (-Y)
    for (x = hole_x) {
        translate([x, -thickness - 0.1, height / 2])
            rotate([-90, 0, 0])
                cylinder(h = thickness + 0.2, d = through_diameter);

        translate([x, -thickness, height / 2])
            rotate([-90, 0, 0])
                cylinder(h = countersink_depth,
                         d1 = countersink_diameter,
                         d2 = through_diameter);
    }
}
max success →
max
122.0s · 294/13436t · $0.0067
SCAD (56 lines)
$fn = 64;

bracket_width = 50;
flange_depth = 40;
flange_height = 40;
thickness = 3;

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

edge_offset = 10;
hole_x_offset = bracket_width / 2 - edge_offset;
epsilon = 0.01;

module bracket_body() {
    // Cross-section coordinates are (Y, Z); extrusion is along X.
    rotate([90, 0, 90])
        linear_extrude(height = bracket_width, center = true)
            polygon(points = [
                [0, 0],
                [0, flange_height],
                [-thickness, flange_height],
                [-thickness, -thickness],
                [flange_depth, -thickness],
                [flange_depth, 0]
            ]);
}

difference() {
    bracket_body();

    for (x_pos = [-hole_x_offset, hole_x_offset]) {
        // Horizontal flange: countersinks face outward in -Z.
        translate([x_pos, flange_depth / 2, -thickness - epsilon])
            cylinder(h = thickness + 2 * epsilon, d = through_diameter);
        translate([x_pos, flange_depth / 2, -thickness])
            cylinder(
                h = countersink_depth,
                d1 = countersink_diameter,
                d2 = through_diameter
            );

        // Vertical flange: countersinks face outward in -Y.
        translate([x_pos, -thickness - epsilon, flange_height / 2])
            rotate([-90, 0, 0])
                cylinder(h = thickness + 2 * epsilon, d = through_diameter);
        translate([x_pos, -thickness, flange_height / 2])
            rotate([-90, 0, 0])
                cylinder(
                    h = countersink_depth,
                    d1 = countersink_diameter,
                    d2 = through_diameter
                );
    }
}
xhigh success →
xhigh
39.6s · 294/4134t · $0.0021
SCAD (50 lines)
width = 50;
depth = 40;
height = 40;
thickness = 3;

hole_d = 4.5;
countersink_d = 8;
countersink_depth = 2;
edge_inset = 10;
eps = 0.01;

hole_x = [-width / 2 + edge_inset, width / 2 - edge_inset];

difference() {
    union() {
        // 水平フランジ
        translate([-width / 2, 0, -thickness])
            cube([width, depth, thickness]);

        // 垂直フランジ
        translate([-width / 2, -thickness, 0])
            cube([width, thickness, height]);

        // コーナーの接続部
        translate([-width / 2, -thickness, -thickness])
            cube([width, thickness, thickness]);
    }

    for (x = hole_x) {
        // 水平フランジの皿穴(外側は -Z 側)
        for (y = [edge_inset, depth - edge_inset]) {
            translate([x, y, -thickness - eps])
                cylinder(h = thickness + 2 * eps, d = hole_d);

            translate([x, y, -thickness])
                cylinder(h = countersink_depth, d1 = countersink_d, d2 = hole_d);
        }

        // 垂直フランジの皿穴(外側は -Y 側)
        for (z = [edge_inset, height - edge_inset]) {
            translate([x, -thickness - eps, z])
                rotate([-90, 0, 0])
                    cylinder(h = thickness + 2 * eps, d = hole_d);

            translate([x, -thickness, z])
                rotate([-90, 0, 0])
                    cylinder(h = countersink_depth, d1 = countersink_d, d2 = hole_d);
        }
    }
}