bare-low/gpt-6-luna / tier-2-l-bracket
success tier 2
bare (gpt 6 luna)
render
$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);
} パラメータ (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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。