iter-png-3/o3 / tier-2-l-bracket
success tier 2
bare (o3)
render
// L-bracket with countersunk M4 holes
//------------------------------------------------
WIDTH = 50; // common width of both flanges (X)
DEPTH = 40; // depth of horizontal flange (Y)
HEIGHT = 40; // height of vertical flange (Z)
THK = 3; // plate thickness
// Hole parameters
HOLE_D = 4.5; // through-hole diameter (M4 clearance)
CSK_D = 8; // countersink seat diameter
CSK_DEPTH = 2; // countersink depth
EDGE_OFF = 10; // distance of hole centres from left/right edges
$fn = 64; // circle quality
// Small extra length for subtraction robustness
EPS = 0.2;
//------------------------------------------------
difference() {
// ----- plates ---------------------------------------------------------
union() {
// horizontal flange (XY plane, thickness +Z)
cube([WIDTH, DEPTH, THK], center = false);
// vertical flange (XZ plane, thickness –Y)
translate([0, -THK, 0])
cube([WIDTH, THK, HEIGHT], center = false);
}
// ----- holes ----------------------------------------------------------
// horizontal flange holes (axis = Z)
for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
y = DEPTH / 2;
// through-hole
translate([x, y, -EPS])
cylinder(h = THK + 2*EPS, d = HOLE_D);
// countersink (from top surface downward)
translate([x, y, THK - CSK_DEPTH])
cylinder(h = CSK_DEPTH, d = CSK_D);
}
// vertical flange holes (axis = Y)
for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
z = HEIGHT / 2;
// through-hole
translate([x, -THK - EPS, z])
rotate([90, 0, 0])
cylinder(h = THK + 2*EPS, d = HOLE_D);
// countersink (from outer face inward)
translate([x, -THK, z])
rotate([90, 0, 0])
cylinder(h = CSK_DEPTH, d = CSK_D);
}
} パラメータ (9) —
スライダを動かすと openscad-wasm で再レンダリング
iteration chain
各 iteration step は独立した benchmark run です。parentRunId で前段にリンクします。
← parent
iter-png-2/o3 success 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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。