iter-png-1/gemini-2.5-pro / tier-2-l-bracket
success tier 2
bare (gemini 2.5 pro)
render
// ===============================================
// 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;
// ===============================================
// Model
// ===============================================
difference() {
// 1. Create the main body of the L-bracket
// The inner corner is at the origin [0, 0, 0]
union() {
// Horizontal flange, extending in +Y direction
cube([width, depth, thickness]);
// Vertical flange, extending in +Z direction
cube([width, thickness, height]);
}
// 2. Create and subtract the countersunk holes
// --- Holes on the horizontal flange ---
// The countersinks are on the top surface (z=thickness), facing downwards.
for (x_pos = hole_pos_x_list) {
// Position the cutter at the top surface (z=thickness) and rotate it to point inwards (-Z)
translate([x_pos, hole_pos_y, thickness])
rotate(a=[180, 0, 0]) {
// A small epsilon for clean subtraction
eps = 0.1;
// Countersink cone (frustum)
cylinder(h = cs_depth, d1 = cs_dia, d2 = hole_dia);
// Through-hole
cylinder(h = thickness + eps, d = hole_dia);
}
}
// --- Holes on the vertical flange ---
// The countersinks are on the outer surface (y=0), facing inwards.
for (x_pos = hole_pos_x_list) {
// [FIX] Position the cutter at the outer surface (y=0) and rotate it to point inwards (+Y).
// The original code placed it at the inner surface (y=thickness) and pointed it the wrong way,
// resulting in the countersink being on the inside corner as seen in the image.
translate([x_pos, 0, hole_pos_z])
rotate(a=[-90, 0, 0]) { // Rotate cutter's Z-axis to align with world's +Y axis
// A small epsilon for clean subtraction
eps = 0.1;
// Countersink cone (frustum)
cylinder(h = cs_depth, d1 = cs_dia, d2 = hole_dia);
// Through-hole
cylinder(h = thickness + eps, d = hole_dia);
}
}
} パラメータ (7) —
スライダを動かすと openscad-wasm で再レンダリング
iteration chain
各 iteration step は独立した benchmark run です。parentRunId で前段にリンクします。
← parent
bare/gemini-2.5-pro success → children (1)
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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。