4 bolt_above = 8.50 - 0.50;
5 bolthole_height = 4.24 + 1.00;
7 bolthole_width = 16.62 + 2.00;
8 main_sz = 150.56 + 0.75;
9 cnr_rad = 13.5; // approx
10 lidinner_thick_allow = 20.78 + 0.50;
14 web_height = 20; // excluding wall and base thick
18 anchor_wall_space = 25;
27 // ----- calculated -----
32 gppB = gppA - [ wall_thick, 0 ];
34 gppL = [ gppB[0], -(lidinner_thick_allow + space + base_thick) ];
37 yw2 = yw1 - bolthole_rhs;
38 yw3 = yw2 - anchor_thick;
39 yw4 = yw3 - anchor_wall_space;
40 yw5 = yw4 - wall_thick;
41 yw6 = -(hsz - cnr_rad + 0.1);
44 yw11 = yw2 + anchor_wall_space;
45 yw12 = yw11 + wall_thick;
50 anchor_b = anchor_thick + anchor_rad;
51 appM = gppL + anchor_b * [1,1];
53 a_bevel = 2 * anchor_b * (1 + sqrt(0.5));
55 module upp_app_Vars(t_bevel){
56 $xppE = gppL + t_bevel * [0,1];
57 $xppF = gppL + t_bevel * [1,0];
59 $xppJ = $xppE + wall_thick * [ 1, tan(22.5) ];
60 $xppI = $xppF + base_thick * [ tan(22.5), 1 ];
62 // must pass a_bevel for t_bevel for these to be valid
63 $gppP = gppA + [0,-1] * lidinner_thick_allow;
64 $gppQ = $gppP + [1,-1] * web_height;
65 $gppR = $xppJ + [ 1, tan(22.5) ] * web_height;
66 $gppS = $xppI + [ tan(22.5), 1 ] * web_height;
67 $gppT = [ $gppQ[0], $xppE[1] ];
72 module upp_app_Profile(){
84 module UsualProfile(){
85 upp_app_Vars(bevel) upp_app_Profile();
88 module NearAnchorProfile(){
89 upp_app_Vars(a_bevel) upp_app_Profile();
92 module AnchorProfile(){
93 upp_app_Vars(a_bevel) {
104 translate(appM) circle(r= anchor_b);
106 translate(appM) circle(r= anchor_rad);
111 module AnchorWallProfile(){
115 for (bev = [bevel, a_bevel]) {
128 upp_app_Vars(a_bevel){
129 if ($gppR[1] <= $gppP[1]) {
145 $gppP + web_height * [1,0] ],
156 module SomeBaseProfile(I, F){
163 module BaseProfile(){
164 SomeBaseProfile($xppI, $xppF);
167 module SWalls(ymin, ymax, t_bevel) {
168 upp_app_Vars(t_bevel) {
169 translate([0,ymin,0])
172 linear_extrude(height= ymax-ymin, convexity=10)
180 module AtTwoCorners(){
183 translate((hsz - cnr_rad) * [1,1])
185 rotate_extrude(convexity=10)
186 translate([-cnr_rad,0])
188 translate([0,0,-250])
195 /// corners, and front and back of base
196 for (ym=[0,1]) mirror([0,ym,0]) {
200 hull() AtTwoCorners(){
211 // side walls and base
212 SWalls(yw6 , yw4 , bevel ) { UsualProfile(); BaseProfile(); }
213 SWalls(yw5 , yw4 , a_bevel) { AnchorWallProfile(); BaseProfile(); }
214 SWalls(yw5 , yw12, a_bevel) { NearAnchorProfile(); BaseProfile(); }
215 SWalls(yw3 , yw2 , a_bevel) { AnchorProfile(); BaseProfile(); }
216 SWalls(yw11, yw12, a_bevel) { AnchorWallProfile(); BaseProfile(); }
217 SWalls(yw11, yw13, bevel ) { UsualProfile(); BaseProfile(); }
218 SWalls(yw1, yw10, a_bevel) { WebProfile(); SomeBaseProfile($gppS, $xppF); }
220 // front and rear walls
221 rotate([0,0,90]) SWalls(yw6, yw13, bevel) UsualProfile();
231 translate([0,0, -bolt_above -0.5 * bolthole_height])
232 cube(center=true, [ cut, bolthole_width, bolthole_height ]);
236 -(bolthole_width/2 + bolthole_rhs),
238 mirror([0,1,0]) mirror([0,0,1])
241 lidinner_thick_allow + string_depth + 1 ]);
245 module DemoProfiles(){
246 translate([0,0,-2]) color("yellow") AnchorWallProfile();
247 color("red") AnchorProfile();
248 translate([0,0,2]) color("black") NearAnchorProfile();
249 translate([0,0,4]) color("blue") UsualProfile();
250 translate([0,0,-4]) color("pink") WebProfile();