M3hex_r_out=6.29/2; //outside radius of hexagon M3hex_r_in=5.45/2; //inside radius of hrxagon M3hex_IR=1.51; // thread radius M3hex_h=2.45; // hex nut high h1=12; //1-st screw hole shift h2=30; //2-nd screw hole shift h3=48; //3-rd screw hole shift nut_shift=8; //shift to center nut holes module nut_slot(deep=5){ /* deep argument is deep of hex hut slot to hex nut center */ union(){ cylinder(r=M3hex_r_out, h=M3hex_h, $fn=6); translate([0,-M3hex_r_in,0])cube([deep+0.1,M3hex_r_in*2,M3hex_h]); } } rotate(a=[90,0,0]) difference(){ /* main body */ union() { cube([12,60,25]); /* glass support */ translate([-10,0,15]) cube([10.1,60,3]); } translate([3,-1,10])cube([5,62,30]); /* screw holes */ translate([2.5,h1,5]) rotate(a=[0,90,0]) cylinder(r=M3hex_IR, center=false, h=37, $fn=60); translate([2.5,h2,5]) rotate(a=[0,90,0]) cylinder(r=M3hex_IR, center=false, h=37, $fn=60); translate([2.5,h3,5]) rotate(a=[0,90,0]) cylinder(r=M3hex_IR, center=false, h=37, $fn=60); /* nut slots */ translate([nut_shift,h1,5]) rotate(a=[0,-90,0]) nut_slot(); translate([nut_shift,h2,5]) rotate(a=[0,-90,0]) nut_slot(); translate([nut_shift,h3,5]) rotate(a=[0,-90,0]) nut_slot(); /* debug block */ //#translate([-0.1,-0.1,-0.1])cube([30,12,10]); }