1 //measures are in millimeters
23 //ascfront=FLZ/sqrt(pow(FLZ,2)-pow(H,2));
24 //asctop=(H-EZ)/sqrt(pow(BLX,2)-pow((H-EZ),2));
27 //translate([14,4,0]) cube([1,1,H]);
29 alpha=asin((H-EZ)/BLX);
31 gamma=90-asin((0.5*(AY-BY))/EZ);
34 scale([AX/(AX+2*CORNER_RADIUS),AY/(AY+2*CORNER_RADIUS),1])
35 translate([CORNER_RADIUS,CORNER_RADIUS,0.01])
39 rotate(a=gamma,v=[1,0,0]) cube([100,100,100]);
40 translate([0,AY,0]) rotate(a=90-gamma,v=[1,0,0]) cube([100,100,100]);
41 translate([0,0,EZ]) rotate(a=-alpha,v=[0,1,0]) translate([-50,0,0]) cube([100,100,100]);
42 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=2);
43 translate([AX,0,0]) rotate(a=beta-90,v=[0,1,0]) cube([100,100,100]);
45 cylinder(h=0.01,r=CORNER_RADIUS,$fs=0.6);
46 //rotate(a=90,v=[1,0,0]) cylinder(h=0.01,r=1,$fs=0.3);
52 cube([AX,INNER_AY,H]);
53 rotate(a=gamma,v=[1,0,0]) cube([100,100,100]);
54 translate([0,INNER_AY,0]) rotate(a=90-gamma,v=[1,0,0]) cube([100,100,100]);
55 translate([0,0,EZ]) rotate(a=-alpha,v=[0,1,0]) translate([-50,0,0]) cube([100,100,100]);
56 translate([0,INNER_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=2);
57 translate([AX,0,0]) rotate(a=beta-90,v=[0,1,0]) cube([100,100,100]);
63 cube([CLIP_X,CLIP_Y,CLIP_H]);
64 translate([0,CLIP_Y,0]) rotate(a=asin(CLIP_Y/CLIP_H),v=[1,0,0]) cube([100,100,100]);
68 //clip distance control rod
69 //translate([(AX-CLIP_X)/2,(AY-CLIP_DISTANCE)/2,0]) cube([1,CLIP_DISTANCE,1]);
70 translate([(AX-CLIP_X)/2,(AY-CLIP_DISTANCE)/2,0]) clip();
71 translate([(AX-CLIP_X)/2,(AY+CLIP_DISTANCE)/2,0]) mirror([0,1,0]) clip();
76 translate([WallThickness, WallThickness, 0]) scale(v=[1-2*WallThickness/AX, 1-2*WallThickness/AY, 1-WallThickness/H]) keycap();
77 translate([0,(AY-INNER_AY)/2,0]) difference(){
79 translate([WallThickness, WallThickness, 0]) scale(v=[1-2*WallThickness/AX, 1-2*WallThickness/INNER_AY, 1-WallThickness/H]) struts();
81 //translate([0,(AY-CLIP_DISTANCE)/2-WallThickness,0]) cube([100,WallThickness, 100]);
82 //translate([0,(AY+CLIP_DISTANCE)/2,0]) cube([100,WallThickness, 100]);