1 //measures are in millimeters
15 INNER_GUARD_RADIUS=6.5;
16 OUTER_GUARD_RADIUS=7.5;
23 //ascfront=FLZ/sqrt(pow(FLZ,2)-pow(H,2));
24 //asctop=(H-EZ)/sqrt(pow(BLX,2)-pow((H-EZ),2));
26 alpha=asin((H-EZ)/BLX);
28 gamma=90-asin((0.5*(AY-BY))/EZ);
31 scale([AX/(AX+2*CORNER_RADIUS),AY/(AY+2*CORNER_RADIUS),1])
32 translate([CORNER_RADIUS,CORNER_RADIUS,0.01])
36 rotate(a=gamma,v=[1,0,0]) cube([100,100,100]);
37 translate([0,AY,0]) rotate(a=90-gamma,v=[1,0,0]) cube([100,100,100]);
38 translate([0,0,EZ]) rotate(a=-alpha,v=[0,1,0]) translate([-50,0,0]) cube([100,100,100]);
39 translate([0,AY/2,EZ+CYL_OFF_Z]) rotate(a=90-alpha,v=[0,1,0]) cylinder(h=100,center=true,r=CYL_OFF_Z+CYL_DEPTH,$fa=1);
40 translate([AX,0,0]) rotate(a=beta-90,v=[0,1,0]) cube([100,100,100]);
42 cylinder(h=0.01,r=CORNER_RADIUS,$fs=0.6);
43 //rotate(a=90,v=[1,0,0]) cylinder(h=0.01,r=1,$fs=0.3);
52 translate([0,0,-9]) difference(){
54 cylinder(h=100,r=SHAFT_X/2,$fs=0.3);
55 translate([-SHAFT_X/2,-SHAFT_Y/2,0]) cube([SHAFT_X,SHAFT_Y,100]);
58 cylinder(h=100,r=SHAFT_X/2-1,$fs=0.3);
59 translate([-SHAFT_X/2+1,-SHAFT_Y/2+1,0]) cube([SHAFT_X-2,SHAFT_Y-2,100]);
67 cube([1,100,100],center=true);
68 cube([100,1,100],center=true);
69 cylinder(r=OUTER_GUARD_RADIUS,h=100);
71 cylinder(r=INNER_GUARD_RADIUS,h=100);
78 translate([WallThickness, WallThickness, 0]) scale(v=[1-2*WallThickness/AX, 1-2*WallThickness/AY, 1-WallThickness/H]) keycap();
79 translate([OUTER_GUARD_RADIUS+WallThickness,AY/2]) guard();
84 translate([WallThickness, WallThickness, 0]) scale(v=[1-2*WallThickness/AX, 1-2*WallThickness/AY, 1-WallThickness/H]) keycap();
85 translate([-50,-50,-99.9]) cube([100,100,100]);
87 translate([OUTER_GUARD_RADIUS+WallThickness,AY/2]) union(){