3 // xxx from actual ksafe
10 lidinner_thick_allow = 20;
14 web_height = 20; // excluding wall and base thick
18 anchor_wall_space = 45;
25 // ----- calculated -----
28 gppB = gppA - [ wall_thick, 0 ];
30 gppL = [ gppB[0], -(lidinner_thick_allow + space + base_thick) ];
34 anchor_b = anchor_thick + anchor_rad;
35 appM = gppL + anchor_b * [1,1];
37 a_bevel = 2 * anchor_b * (1 + sqrt(0.5));
39 module upp_app_Vars(t_bevel){
40 $xppE = gppL + t_bevel * [0,1];
41 $xppF = gppL + t_bevel * [1,0];
43 $xppJ = $xppE + wall_thick * [ 1, tan(22.5) ];
44 $xppI = $xppF + base_thick * [ tan(22.5), 1 ];
46 // must pass a_bevel for t_bevel for these to be valid
47 $gppP = gppA + [0,-1] * lidinner_thick_allow;
48 $gppQ = $gppP + [1,-1] * web_height;
49 $gppR = $xppJ + [ 1, tan(22.5) ] * web_height;
50 $gppS = $xppI + [ tan(22.5), 1 ] * web_height;
51 $gppT = [ $gppQ[0], $xppE[1] ];
56 module upp_app_Profile(){
67 module UsualProfile(){
68 upp_app_Vars(bevel) upp_app_Profile();
71 module NearAnchorProfile(){
72 upp_app_Vars(a_bevel) upp_app_Profile();
75 module AnchorProfile(){
76 upp_app_Vars(a_bevel) {
86 translate(appM) circle(r= anchor_b);
88 translate(appM) circle(r= anchor_rad);
93 module AnchorWallProfile(){
97 for (bev = [bevel, a_bevel]) {
109 upp_app_Vars(a_bevel){
110 if ($gppR[1] <= $gppP[1]) {
125 $gppP + web_height * [1,0] ]);
134 module DemoProfiles(){
135 translate([0,0,-2]) color("yellow") AnchorWallProfile();
136 color("red") AnchorProfile();
137 translate([0,0,2]) color("black") NearAnchorProfile();
138 translate([0,0,4]) color("blue") UsualProfile();
139 translate([0,0,-4]) color("pink") WebProfile();