power-test/library/EG2208.scad

17 lines
646 B
OpenSCAD

switch(10,6,5,3,3,4,2,3,0.5,2.5,1.25,0.2,2,3,2,2.5);
module switch(w,d,h,lw,lh,ll,lt,hh,hd,sl,sw,st,pr,pc,px,py) {
difference() {
translate([0,0,h/2]) cube([w,d,h],true);
translate([0,(d/2)-(hd/2),hh]) cube([lw+lt,hd,lh],true);
}
translate([lt/2,ll/2,hh]) cube([lw,ll+d,lh],true);
shield_pin(sl,sw,st,w);
mirror([1,0,0]) shield_pin(sl,sw,st,w);
for(i=[0:pc-1],j=[0:pr-1]) pin((i-(pc-1)/2)*px,(j-(pr-1)/2)*py,0.8,3);
module shield_pin(l,w,t,s) {
translate([s/2,0,-l/2]) cube([t,w,l],true);
}
module pin(x,y,r,l) {
translate([x,y,-l/2]) cube([r/sqrt(2),r/sqrt(2),l],true);
}
}