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;
25 // ----- calculated -----
30 gppB = gppA - [ wall_thick, 0 ];
32 gppL = [ gppB[0], -(lidinner_thick_allow + space + base_thick) ];
35 yw2 = yw1 - bolthole_rhs;
36 yw3 = yw2 - anchor_thick;
37 yw4 = yw3 - anchor_wall_space;
38 yw5 = yw4 - wall_thick;
39 yw6 = -(hsz - cnr_rad + 0.1);
42 yw11 = yw2 + anchor_wall_space;
43 yw12 = yw11 + wall_thick;
48 anchor_b = anchor_thick + anchor_rad;
49 appM = gppL + anchor_b * [1,1];
51 a_bevel = 2 * anchor_b * (1 + sqrt(0.5));
53 module upp_app_Vars(t_bevel){
54 $xppE = gppL + t_bevel * [0,1];
55 $xppF = gppL + t_bevel * [1,0];
57 $xppJ = $xppE + wall_thick * [ 1, tan(22.5) ];
58 $xppI = $xppF + base_thick * [ tan(22.5), 1 ];
60 // must pass a_bevel for t_bevel for these to be valid
61 $gppP = gppA + [0,-1] * lidinner_thick_allow;
62 $gppQ = $gppP + [1,-1] * web_height;
63 $gppR = $xppJ + [ 1, tan(22.5) ] * web_height;
64 $gppS = $xppI + [ tan(22.5), 1 ] * web_height;
65 $gppT = [ $gppQ[0], $xppE[1] ];
70 module upp_app_Profile(){
82 module UsualProfile(){
83 upp_app_Vars(bevel) upp_app_Profile();
86 module NearAnchorProfile(){
87 upp_app_Vars(a_bevel) upp_app_Profile();
90 module AnchorProfile(){
91 upp_app_Vars(a_bevel) {
102 translate(appM) circle(r= anchor_b);
104 translate(appM) circle(r= anchor_rad);
109 module AnchorWallProfile(){
113 for (bev = [bevel, a_bevel]) {
126 upp_app_Vars(a_bevel){
127 if ($gppR[1] <= $gppP[1]) {
143 $gppP + web_height * [1,0] ],
154 module SomeBaseProfile(I, F){
161 module BaseProfile(){
162 SomeBaseProfile($xppI, $xppF);
165 module SWalls(ymin, ymax, t_bevel) {
166 upp_app_Vars(t_bevel) {
167 translate([0,ymin,0])
170 linear_extrude(height= ymax-ymin, convexity=10)
178 module AtTwoCorners(){
181 translate((hsz - cnr_rad) * [1,1])
183 rotate_extrude(convexity=10)
184 translate([-cnr_rad,0])
186 translate([0,0,-250])
193 /// corners, and front and back of base
194 for (ym=[0,1]) mirror([0,ym,0]) {
198 hull() AtTwoCorners(){
209 // side walls and base
210 SWalls(yw6 , yw4 , bevel ) { UsualProfile(); BaseProfile(); }
211 SWalls(yw5 , yw4 , a_bevel) { AnchorWallProfile(); BaseProfile(); }
212 SWalls(yw5 , yw12, a_bevel) { NearAnchorProfile(); BaseProfile(); }
213 SWalls(yw3 , yw2 , a_bevel) { AnchorProfile(); BaseProfile(); }
214 SWalls(yw11, yw12, a_bevel) { AnchorWallProfile(); BaseProfile(); }
215 SWalls(yw11, yw13, bevel ) { UsualProfile(); BaseProfile(); }
216 SWalls(yw1, yw10, a_bevel) { WebProfile(); SomeBaseProfile($gppS, $xppF); }
218 // front and rear walls
219 rotate([0,0,90]) SWalls(yw6, yw13, bevel) UsualProfile();
227 translate([0,0, -bolt_above -0.5 * bolthole_height])
228 cube(center=true, [ main_sz + 20, bolthole_width, bolthole_height ]);
232 module DemoProfiles(){
233 translate([0,0,-2]) color("yellow") AnchorWallProfile();
234 color("red") AnchorProfile();
235 translate([0,0,2]) color("black") NearAnchorProfile();
236 translate([0,0,4]) color("blue") UsualProfile();
237 translate([0,0,-4]) color("pink") WebProfile();