E5-Microswiss-Spider/shroud.scad

98 lines
2.4 KiB
OpenSCAD
Raw Normal View History

2022-07-07 16:30:42 +02:00
/* shroud options */
wt = 3;
tb = 40;
bpt = 7;
/* fan size */
lf = 40;
tf = 10;
hd = 38;
lhf = 32;
rc = 4;
/* heatsink size */
lh = 30;
wh = 26;
th = 16;
ofsx = 0;
ofsy = 0;
ofsz = 3.5;
t= tb-bpt-tf;
$fn= 100;
module through(l=7, lh=3.3, lt=1, lb=1){
union(){
translate([0,0,l-lh])cylinder(h=lh+lt, d=5.6);
translate([0,0,-lb])cylinder(h=l+lh+lb, d=3.5);
}
}
module m3 (h=8, lt=1){
translate([0,0,-lt])cylinder(h, d=2.5); // tapped M3
//translate([0,0,-lt])cylinder(h, d=4); // rutex insert
}
module mount(){
translate([4,4,-12])difference(){
hull(){
translate([0,0,6])cylinder(h=6, d=8);
translate([4,-4,0])cube([0.01,8,12]);
}
translate([0,0,12])mirror([0,0,1])through(l=10,lb=1,lt=1,lh=7);
}
}
difference(){
union(){
hull(){
for(x=[rc, lf-rc]){
for(y=[rc, lf-rc]){
translate([x,y])cylinder(h=wt,r=rc);
}
}
}
if (2*wt+hd> lf){
translate([lf/2, lf/2])cylinder(h=wt, d=2*wt+hd);
}
hull(){
for(x=[lf-rc]){
for(y=[rc, lf-rc]){
translate([x,y,0])cylinder(h=t,r=rc);
}
}
}
hull(){
x=rc;
translate([x,rc])cylinder(h=t,r=rc);
translate([x,lf-rc])cylinder(h=1,r=rc);
translate([x-1*rc,lf-1,t-12])cube([2*rc,1,12]);
}
hull(){
translate([lf/2,lf/2, wt-0.1])cylinder(h=0.1,d=hd+2*wt);
translate([lf/2-wh/2-wt+ofsx,lf/2-lh/2+ofsy,t-th+ofsz])cube([wh+2*wt,lh,0.01]);
}
translate([lf/2-wh/2-wt+ofsx,lf/2-lh/2+ofsy,t-th+ofsz])cube([wh+2*wt,lh,th]);
for(x=[48]){
for(y=[7.7,28]){
translate([x,y,t])mirror([1,0,0])mount();
}
}
for(x=[-8]){
for(y=[18]){
translate([x,y,t])mount();
}
}
translate([0,48,t])rotate([0,0,-90])mount();
}
hull(){
translate([lf/2,lf/2,-0.01])cylinder(h=wt+0.01,d=hd);
translate([lf/2-wh/2+ofsx,lf/2-lh/2+ofsy-0.01,t-th+ofsz])cube([wh,lh+0.02,0.01]);
}
translate([lf/2-wh/2+ofsx,lf/2-lh/2+ofsy-0.01,t-th+ofsz])cube([wh,lh+0.02,th+0.01]);
for(x=[(lf-lhf)/2, (lf-lhf)/2+lhf]){
for(y=[(lf-lhf)/2, (lf-lhf)/2+lhf]){
translate([x,y])m3();
}
}
}