32 lines
No EOL
764 B
OpenSCAD
32 lines
No EOL
764 B
OpenSCAD
include <BOSL2/std.scad>
|
|
include <BOSL2/screws.scad>
|
|
|
|
magnes = [8.2,2];
|
|
|
|
szer = 25;
|
|
wys = 12;
|
|
t = 3;
|
|
$fn=360;
|
|
|
|
ile_mag = floor(szer/magnes[0]);
|
|
echo(ile_mag);
|
|
|
|
// część ze śrubami
|
|
difference() {
|
|
cuboid([szer,wys,t], anchor=TOP+FWD);
|
|
back(wys/2 + t/2) left(szer/4) screw_hole("M2.5,3", head="flat", anchor=TOP);
|
|
back(wys/2 + t/2) right(szer/4) screw_hole("M2.5,3", head="flat", anchor=TOP);
|
|
}
|
|
// część z magnesami
|
|
difference() {
|
|
cuboid([szer,t,wys], anchor=BOTTOM+BACK);
|
|
up((wys+t)/2) left(szer/2) fwd(t) xrot(90) for(i = [0 : ile_mag-1]) {
|
|
right(magnes[0]/2 + i*(szer/ile_mag)) cyl(d=magnes[0], h=magnes[1]);
|
|
}
|
|
}
|
|
// zaokrąglenie
|
|
|
|
difference() {
|
|
cuboid([szer,t*2,t*2]);
|
|
up(t) back(t) yrot(90) cyl(h=szer+t, d=2*t);
|
|
} |