—
tier-2-l-bracket / gpt-5.2-codex
5 run / 累計 176.8s / 累計 $0.1844
openai gpt 5.2 codex bare
bare (provider default effort)
run detail → render
$fn = 64;
width = 50;
depth = 40;
height = 40;
thickness = 3;
hole_d = 4.5;
csk_d = 8;
csk_depth = 2;
difference() {
union() {
// Horizontal flange (X-Y plane, thickness in Z)
cube([width, depth, thickness]);
// Vertical flange (X-Z plane, thickness in Y)
cube([width, thickness, height]);
}
// Holes on horizontal flange (countersink on top, z=thickness)
for (y = [10, depth-10]) {
translate([width/2, y, 0])
cylinder(h = thickness, d = hole_d);
translate([width/2, y, thickness - csk_depth])
cylinder(h = csk_depth, d = csk_d);
}
// Holes on vertical flange (countersink on outer side, y=thickness)
for (z = [10, height-10]) {
translate([width/2, 0, z])
rotate([90, 0, 0])
cylinder(h = thickness, d = hole_d);
translate([width/2, thickness - csk_depth, z])
rotate([90, 0, 0])
cylinder(h = csk_depth, d = csk_d);
}
} パラメータ (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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。
variant: effort
SCAD (37 lines)
$fn = 64;
width = 50;
depth = 40;
height = 40;
thickness = 3;
hole_d = 4.5;
csk_d = 8;
csk_depth = 2;
difference() {
union() {
// Horizontal flange (X-Y plane, thickness in Z)
cube([width, depth, thickness]);
// Vertical flange (X-Z plane, thickness in Y)
cube([width, thickness, height]);
}
// Holes on horizontal flange (countersink on top, z=thickness)
for (y = [10, depth-10]) {
translate([width/2, y, 0])
cylinder(h = thickness, d = hole_d);
translate([width/2, y, thickness - csk_depth])
cylinder(h = csk_depth, d = csk_d);
}
// Holes on vertical flange (countersink on outer side, y=thickness)
for (z = [10, height-10]) {
translate([width/2, 0, z])
rotate([90, 0, 0])
cylinder(h = thickness, d = hole_d);
translate([width/2, thickness - csk_depth, z])
rotate([90, 0, 0])
cylinder(h = csk_depth, d = csk_d);
}
} —
—
—
iteration: iter-png
diff vs bare: +0/-0
$fn = 64;
width = 50;
depth = 40;
height = 40;
thickness = 3;
hole_d = 4.5;
csk_d = 8;
csk_depth = 2;
difference() {
union() {
// Horizontal flange (X-Y plane, thickness in Z)
cube([width, depth, thickness]);
// Vertical flange (X-Z plane, thickness in Y)
cube([width, thickness, height]);
}
// Holes on horizontal flange (countersink on top, z=thickness)
for (y = [10, depth-10]) {
translate([width/2, y, 0])
cylinder(h = thickness, d = hole_d);
translate([width/2, y, thickness - csk_depth])
cylinder(h = csk_depth, d = csk_d);
}
// Holes on vertical flange (countersink on outer side, y=thickness)
for (z = [10, height-10]) {
translate([width/2, 0, z])
rotate([90, 0, 0])
cylinder(h = thickness, d = hole_d);
translate([width/2, thickness - csk_depth, z])
rotate([90, 0, 0])
cylinder(h = csk_depth, d = csk_d);
}
}
SCAD (37 lines)
$fn = 64;
width = 50;
depth = 40;
height = 40;
thickness = 3;
hole_d = 4.5;
csk_d = 8;
csk_depth = 2;
difference() {
union() {
// Horizontal flange (X-Y plane, thickness in Z)
cube([width, depth, thickness]);
// Vertical flange (X-Z plane, thickness in Y)
cube([width, thickness, height]);
}
// Holes on horizontal flange (countersink on top, z=thickness)
for (y = [10, depth-10]) {
translate([width/2, y, 0])
cylinder(h = thickness, d = hole_d);
translate([width/2, y, thickness - csk_depth])
cylinder(h = csk_depth, d = csk_d);
}
// Holes on vertical flange (countersink on outer side, y=thickness)
for (z = [10, height-10]) {
translate([width/2, 0, z])
rotate([90, 0, 0])
cylinder(h = thickness, d = hole_d);
translate([width/2, thickness - csk_depth, z])
rotate([90, 0, 0])
cylinder(h = csk_depth, d = csk_d);
}
}
diff vs i1: +10/-10
$fn = 64;
width = 50;
depth = 40;
height = 40;
thickness = 3;
hole_d = 4.5;
csk_d = 8;
csk_depth = 2;
difference() {
union() {
- // Horizontal flange (X-Y plane, thickness in Z)
+ // Horizontal flange
cube([width, depth, thickness]);
- // Vertical flange (X-Z plane, thickness in Y)
+ // Vertical flange
cube([width, thickness, height]);
}
- // Holes on horizontal flange (countersink on top, z=thickness)
- for (y = [10, depth-10]) {
- translate([width/2, y, 0])
+ // Holes on horizontal flange (countersink on top)
+ for (x = [10, width-10]) {
+ translate([x, depth/2, 0])
cylinder(h = thickness, d = hole_d);
- translate([width/2, y, thickness - csk_depth])
+ translate([x, depth/2, thickness - csk_depth])
cylinder(h = csk_depth, d = csk_d);
}
- // Holes on vertical flange (countersink on outer side, y=thickness)
- for (z = [10, height-10]) {
- translate([width/2, 0, z])
+ // Holes on vertical flange (countersink on outer side)
+ for (x = [10, width-10]) {
+ translate([x, 0, height/2])
rotate([90, 0, 0])
cylinder(h = thickness, d = hole_d);
- translate([width/2, thickness - csk_depth, z])
+ translate([x, thickness - csk_depth, height/2])
rotate([90, 0, 0])
cylinder(h = csk_depth, d = csk_d);
}
}
SCAD (37 lines)
$fn = 64;
width = 50;
depth = 40;
height = 40;
thickness = 3;
hole_d = 4.5;
csk_d = 8;
csk_depth = 2;
difference() {
union() {
// Horizontal flange
cube([width, depth, thickness]);
// Vertical flange
cube([width, thickness, height]);
}
// Holes on horizontal flange (countersink on top)
for (x = [10, width-10]) {
translate([x, depth/2, 0])
cylinder(h = thickness, d = hole_d);
translate([x, depth/2, thickness - csk_depth])
cylinder(h = csk_depth, d = csk_d);
}
// Holes on vertical flange (countersink on outer side)
for (x = [10, width-10]) {
translate([x, 0, height/2])
rotate([90, 0, 0])
cylinder(h = thickness, d = hole_d);
translate([x, thickness - csk_depth, height/2])
rotate([90, 0, 0])
cylinder(h = csk_depth, d = csk_d);
}
}
diff vs i2: +2/-2
$fn = 64;
width = 50;
depth = 40;
height = 40;
thickness = 3;
hole_d = 4.5;
csk_d = 8;
csk_depth = 2;
difference() {
union() {
// Horizontal flange
cube([width, depth, thickness]);
// Vertical flange
cube([width, thickness, height]);
}
// Holes on horizontal flange (countersink on top)
for (x = [10, width-10]) {
translate([x, depth/2, 0])
cylinder(h = thickness, d = hole_d);
translate([x, depth/2, thickness - csk_depth])
- cylinder(h = csk_depth, d = csk_d);
+ cylinder(h = csk_depth, d1 = hole_d, d2 = csk_d);
}
// Holes on vertical flange (countersink on outer side)
for (x = [10, width-10]) {
translate([x, 0, height/2])
rotate([90, 0, 0])
cylinder(h = thickness, d = hole_d);
translate([x, thickness - csk_depth, height/2])
rotate([90, 0, 0])
- cylinder(h = csk_depth, d = csk_d);
+ cylinder(h = csk_depth, d1 = hole_d, d2 = csk_d);
}
}
SCAD (37 lines)
$fn = 64;
width = 50;
depth = 40;
height = 40;
thickness = 3;
hole_d = 4.5;
csk_d = 8;
csk_depth = 2;
difference() {
union() {
// Horizontal flange
cube([width, depth, thickness]);
// Vertical flange
cube([width, thickness, height]);
}
// Holes on horizontal flange (countersink on top)
for (x = [10, width-10]) {
translate([x, depth/2, 0])
cylinder(h = thickness, d = hole_d);
translate([x, depth/2, thickness - csk_depth])
cylinder(h = csk_depth, d1 = hole_d, d2 = csk_d);
}
// Holes on vertical flange (countersink on outer side)
for (x = [10, width-10]) {
translate([x, 0, height/2])
rotate([90, 0, 0])
cylinder(h = thickness, d = hole_d);
translate([x, thickness - csk_depth, height/2])
rotate([90, 0, 0])
cylinder(h = csk_depth, d1 = hole_d, d2 = csk_d);
}
}