bare-high/gpt-5 / tier-2-l-bracket
success tier 2
bare (gpt 5)
render
// L-bracket with counterbored holes
width = 50; // X: plate width
length = 40; // Y (horizontal depth) / Z (vertical height)
thickness = 3;
hole_d = 4.5; // through-hole diameter
cbore_d = 8; // counterbore diameter
cbore_depth = 2; // counterbore depth
edge_inset = 10; // inset from side edges along X
$fn = 64;
eps = 0.01;
module ycyl(d, h) { rotate([-90, 0, 0]) cylinder(d=d, h=h, center=false); }
module l_bracket() {
translate([-width/2, 0, 0])
difference() {
// Base geometry: inner corner at (x: any, y=0, z=0), flanges to +Y and +Z
union() {
// Horizontal flange (extends +Y)
cube([width, length, thickness], center=false);
// Vertical flange (extends +Z)
cube([width, thickness, length], center=false);
}
// Holes on horizontal flange (counterbore on top, z = thickness side)
for (sx = [-1, 1]) {
x = width/2 + sx*(width/2 - edge_inset);
y = length/2;
// Through hole
translate([x, y, -eps]) cylinder(d=hole_d, h=thickness + 2*eps);
// Counterbore (from outer/top face)
translate([x, y, thickness - cbore_depth - eps])
cylinder(d=cbore_d, h=cbore_depth + 2*eps);
}
// Holes on vertical flange (counterbore on outer side, y = thickness side)
for (sx = [-1, 1]) {
x = width/2 + sx*(width/2 - edge_inset);
z = length/2;
// Through hole along Y
translate([x, -eps, z]) ycyl(d=hole_d, h=thickness + 2*eps);
// Counterbore from outer face (y = thickness)
translate([x, thickness - cbore_depth - eps, z])
ycyl(d=cbore_d, h=cbore_depth + 2*eps);
}
}
}
l_bracket(); パラメータ (8) —
スライダを動かすと 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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。