vibe-openscad

iter-png-2/gemini-2.5-pro / tier-2-l-bracket

success tier 2

bare (gemini 2.5 pro)

render
bare render of tier-2-l-bracket
loading STL…
success 69.5s · 1385/862t · $0.0104
SCAD (88 lines)
// ===============================================
//                Parameters
// ===============================================

// --- Bracket Dimensions ---
width     = 50;  // Width on X-axis
depth     = 40;  // Horizontal flange depth on Y-axis
height    = 40;  // Vertical flange height on Z-axis
thickness = 3;   // Thickness of the flanges

// --- M4 Countersunk Hole Dimensions ---
hole_dia  = 4.5; // Through-hole diameter
cs_dia    = 8;   // Countersink top diameter
cs_depth  = 2;   // Countersink depth

// --- Hole Positioning ---
// X-coordinates for the two holes on each flange
hole_pos_x_list = [10, width - 10]; 
// Y-coordinate for holes on the horizontal flange (centerline)
hole_pos_y = depth / 2;
// Z-coordinate for holes on the vertical flange (centerline)
hole_pos_z = height / 2;

// --- Rendering Quality ---
$fn = 64;


// ===============================================
//           Cutter Module Definition
// ===============================================

// Module to create a reusable countersink cutter shape.
// The cutter is created along the Z-axis.
module countersink_cutter(length) {
    // A small epsilon to ensure clean subtraction
    eps = 0.1;
    
    // Countersink cone (frustum)
    cylinder(h = cs_depth, d1 = cs_dia, d2 = hole_dia);
    
    // Through-hole body
    // This cylinder starts at the same base as the cone (z=0)
    // to ensure they form a single solid for subtraction.
    cylinder(h = length + eps, d = hole_dia);
}


// ===============================================
//                  Model
// ===============================================

difference() {
    
    // 1. Create the main body of the L-bracket
    // The inner corner is at the origin [0, 0, 0].
    union() {
        // Horizontal flange: Extends from origin in +Y direction.
        // Occupies space: x=[0,width], y=[0,depth], z=[0,thickness]
        cube([width, depth, thickness]);
        
        // Vertical flange: Extends from origin in +Z direction.
        // Occupies space: x=[0,width], y=[0,thickness], z=[0,height]
        cube([width, thickness, height]);
    }
    
    // 2. Create and subtract the countersunk holes
    
    // --- Holes on the horizontal flange ---
    // Countersinks are on the outer (top) face, which is the plane z=thickness.
    for (x_pos = hole_pos_x_list) {
        // Move the cutter to the top surface and rotate it to point down (-Z).
        translate([x_pos, hole_pos_y, thickness])
        rotate(a=[180, 0, 0]) {
            countersink_cutter(length = thickness);
        }
    }
    
    // --- Holes on the vertical flange (FIXED) ---
    // Correction: The original model had the countersink on the inner face.
    // The countersink must be on the outer face (the plane at y=0).
    for (x_pos = hole_pos_x_list) {
        // Move the cutter to the outer face (y=0) and rotate it to point inwards (+Y).
        translate([x_pos, 0, hole_pos_z])
        rotate(a=[-90, 0, 0]) {
            countersink_cutter(length = thickness);
        }
    }
}
パラメータ (7)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIditer-png-2_gemini-2.5-pro-1c63f83caea3-2026-04-28T18-58-51-998Z
matrixIditer-png-2/gemini-2.5-pro
signature1c63f83caea3f6f9…
providergoogle
modelgemini-2.5-pro
harnessbare
statussuccess
duration69.52s (wallclock: load + prompt eval + generation + network)
tokens1385 in / 862 out
wallclock tok/s12.4 tok/s (end-to-end)
cost$0.0104
createdAt2026-04-28T18:58:51.998Z
gitCommit781e6c683dda
openscadOpenSCAD version 2026.04.27

iteration chain

各 iteration step は独立した benchmark run です。parentRunId で前段にリンクします。

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