OFF=0.5; KEY=1; // spider if(0) difference() { linear_extrude(10, convexity=3) difference() { union() { for(A=[0:90:180-1]) rotate([0,0,A+45]) square([5,30],center=true); circle(d=15); } circle(d=8); /* intersection() { circle(d=0.75+(0.25*25.4)+OFF); translate([KEY,0]) square((0.75+0.25*25.4)*[1,1],center=true); }*/ } // rotate([0,-90]) translate([5,0,0]) M(5, LENGTH=30, CAP=0, OFF=0); } // nut difference() { //cylinder(d=30, h=15); linear_extrude(15) intersection() { square([30,30],center=true); rotate([0,0,45]) square([35,35],center=true); } for(Q=[ [1,1,0], [1,-1,0], [-1,1,0], [-1,-1,0]]) translate(9.5*Q+[0,0,3]) M(3,LENGTH=20,CAPOFF=5); translate([0,0,5]) linear_extrude(10+1) union() { for(A=[0:90:180-1]) rotate([0,0,A]) square([5+3,40],center=true); circle(d=20); } translate([-5,0,5]) rotate([0,0,90]) rotate([90,0]) set(5,20,NS=[1,2,1], OFF=0.5, NUT=0.195*25.4,NUTPOS=5); linear_extrude(20, center=true) key(); // cylinder(d=8, h=30, center=true); } // plate if(0) difference() { linear_extrude(3) intersection() { square([30,30],center=true); rotate([0,0,45]) square([35,35],center=true); } cylinder(d=15, h=30, center=true); for(Q=[ [0,0,0], [1,0,0], [0,1,0], [1,1,0] ]) mirror(Q) translate(9.5*[1,1,0]) rotate([0,0,15]) M(3,LENGTH=20,CAP=0, NUTOFF=10, NUT=1); } // setscrew test if(0) difference() { linear_extrude(10) square([12,10],center=true); translate([0,0,5]) rotate([90,0]) set(5,15,NS=[1,2,1], OFF=0.5, NUT=0.195*25.4,NUTPOS=5); } // assists in making cutouts for metric setscrew + nut module set(S=3, LENGTH=10, NUT=3, OFF=0.75, N=4, NS=[1,1], NUTPOS=0) { T=[ // [ cap d, allen, cap h, nut ] [ 0,0,0 ], // 0, nonsense [ 0,0,0 ], // 1, nonsense [ 0,0,0 ], // 2, who cares [ 5.5, 2.5, 3.0, 5.5 ], // m3 [ 7.0, 3.0, 4.0, 7.0 ], // m4 [ 8.5, 4.0, 5.0, 8.0 ], // m5 [ 10, 5.0, 6.0, 10 ], // m6 [ 0, 0, 0 ], // m7, nonsense [ 13, 6, 8, 13 ], // m8 [ 0, 0, 0 ], // m9, nonsense [ 16, 8, 10, 16 ], // m10 ]; if(T[S][0]) union() { rotate([0,180]) translate([0,0,-S]) cylinder(d=S+OFF, h=LENGTH); scale(NS) rotate([0,0,180/N]) cylinder($fn=N, d=(T[S][3]/cos(180/N))+OFF, h=NUT+OFF, center=true); } } module M(S=3, LENGTH=10, NUT=0, OFF=0.75, CAPOFF=0, NUTOFF=3, CAP=1) { T=[ // [ cap d, allen, cap h, nut ] [ 0,0,0 ], // 0, nonsense [ 0,0,0 ], // 1, nonsense [ 0,0,0 ], // 2, who cares [ 5.5, 2.5, 3.0, 5.5 ], // m3 [ 7.0, 3.0, 4.0, 7.0 ], // m4 [ 8.5, 4.0, 5.0, 8.0 ], // m5 [ 10, 5.0, 6.0, 10 ], // m6 [ 0, 0, 0 ], // m7, nonsense [ 13, 6, 8, 13 ], // m8 [ 0, 0, 0 ], // m9, nonsense [ 16, 8, 10, 16 ], // m10 ]; if(T[S][0]) union() { translate([0,0,-1]) cylinder(d=S+OFF, h=LENGTH+1); if(CAP) rotate([180,0]) cylinder(d=T[S][0]+OFF, h=T[S][2]+CAPOFF); if(NUT) translate([0,0,NUT]) cylinder($fn=6, d=(T[S][3]/cos(30))+OFF, h=NUTOFF); } } module key() { intersection() { circle(d=0.75+(0.25*25.4)+OFF); translate([KEY,0]) square((0.75+0.25*25.4)*[1,1],center=true); } }