11 lines
332 B
OpenSCAD
11 lines
332 B
OpenSCAD
|
$fn=200;
|
||
|
L=20;
|
||
|
W=15;
|
||
|
H=5;
|
||
|
R=60;
|
||
|
difference() {
|
||
|
translate([-0.5, 0, -1]) cube(size=[L+0.5, W, H+1]);
|
||
|
// circle of radius R through 2 points (0, H) and (L, 0)
|
||
|
translate([L/2 + sqrt(R*R-L*L/4-H*H/4)*sin(atan(H/L)), -0.1, H/2 + sqrt(R*R-L*L/4-H*H/4)*cos(atan(H/L))]) scale([R, 1, R]) rotate([-90, 0, 0]) cylinder(h=W+0.2, r=1);
|
||
|
}
|