3 // xxx from actual ksafe
5 bolthole_height = 4.24;
7 bolthole_width = 16.62;
9 cnr_rad = 13.5; // approx
10 lidinner_thick_allow = 20.78;
14 web_height = 20; // excluding wall and base thick
18 anchor_wall_space = 45;
25 // ----- calculated -----
30 gppB = gppA - [ wall_thick, 0 ];
32 gppL = [ gppB[0], -(lidinner_thick_allow + space + base_thick) ];
36 anchor_b = anchor_thick + anchor_rad;
37 appM = gppL + anchor_b * [1,1];
39 a_bevel = 2 * anchor_b * (1 + sqrt(0.5));
41 module upp_app_Vars(t_bevel){
42 $xppE = gppL + t_bevel * [0,1];
43 $xppF = gppL + t_bevel * [1,0];
45 $xppJ = $xppE + wall_thick * [ 1, tan(22.5) ];
46 $xppI = $xppF + base_thick * [ tan(22.5), 1 ];
48 // must pass a_bevel for t_bevel for these to be valid
49 $gppP = gppA + [0,-1] * lidinner_thick_allow;
50 $gppQ = $gppP + [1,-1] * web_height;
51 $gppR = $xppJ + [ 1, tan(22.5) ] * web_height;
52 $gppS = $xppI + [ tan(22.5), 1 ] * web_height;
53 $gppT = [ $gppQ[0], $xppE[1] ];
58 module upp_app_Profile(){
70 module UsualProfile(){
71 upp_app_Vars(bevel) upp_app_Profile();
74 module NearAnchorProfile(){
75 upp_app_Vars(a_bevel) upp_app_Profile();
78 module AnchorProfile(){
79 upp_app_Vars(a_bevel) {
90 translate(appM) circle(r= anchor_b);
92 translate(appM) circle(r= anchor_rad);
97 module AnchorWallProfile(){
101 for (bev = [bevel, a_bevel]) {
114 upp_app_Vars(a_bevel){
115 if ($gppR[1] <= $gppP[1]) {
131 $gppP + web_height * [1,0] ],
143 for (xm=[0,1]) for (ym=[0,1]) {
144 mirror([xm,0]) mirror([0,ym])
145 translate((hsz - cnr_rad) * [1,1])
147 rotate_extrude(convexity=10)
148 translate([-cnr_rad,0])
150 translate([0,0,-250])
156 module DemoProfiles(){
157 translate([0,0,-2]) color("yellow") AnchorWallProfile();
158 color("red") AnchorProfile();
159 translate([0,0,2]) color("black") NearAnchorProfile();
160 translate([0,0,4]) color("blue") UsualProfile();
161 translate([0,0,-4]) color("pink") WebProfile();