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;
26 thumbslot_depth = 5.0;
27 thumbslot_width = 15.0;
28 thumbslot_between = 10;
30 // ----- calculated -----
35 gppB = gppA - [ wall_thick, 0 ];
37 gppL = [ gppB[0], -(lidinner_thick_allow + space + base_thick) ];
40 yw2 = yw1 - bolthole_rhs;
41 yw3 = yw2 - anchor_thick;
42 yw4 = yw3 - anchor_wall_space;
43 yw5 = yw4 - wall_thick;
44 yw6 = -(hsz - cnr_rad + 0.1);
47 yw11 = yw2 + anchor_wall_space;
48 yw12 = yw11 + wall_thick;
53 anchor_b = anchor_thick + anchor_rad;
54 appM = gppL + anchor_b * [1,1];
56 a_bevel = 2 * anchor_b * (1 + sqrt(0.5));
58 module upp_app_Vars(t_bevel){
59 $xppE = gppL + t_bevel * [0,1];
60 $xppF = gppL + t_bevel * [1,0];
62 $xppJ = $xppE + wall_thick * [ 1, tan(22.5) ];
63 $xppI = $xppF + base_thick * [ tan(22.5), 1 ];
65 // must pass a_bevel for t_bevel for these to be valid
66 $gppP = gppA + [0,-1] * lidinner_thick_allow;
67 $gppQ = $gppP + [1,-1] * web_height;
68 $gppR = $xppJ + [ 1, tan(22.5) ] * web_height;
69 $gppS = $xppI + [ tan(22.5), 1 ] * web_height;
70 $gppT = [ $gppQ[0], $xppE[1] ];
75 module upp_app_Profile(){
87 module UsualProfile(){
88 upp_app_Vars(bevel) upp_app_Profile();
91 module NearAnchorProfile(){
92 upp_app_Vars(a_bevel) upp_app_Profile();
95 module AnchorProfile(){
96 upp_app_Vars(a_bevel) {
107 translate(appM) circle(r= anchor_b);
109 translate(appM) circle(r= anchor_rad);
114 module AnchorWallProfile(){
118 for (bev = [bevel, a_bevel]) {
131 upp_app_Vars(a_bevel){
132 if ($gppR[1] <= $gppP[1]) {
148 $gppP + web_height * [1,0] ],
159 module SomeBaseProfile(I, F){
166 module BaseProfile(){
167 SomeBaseProfile($xppI, $xppF);
170 module SWalls(ymin, ymax, t_bevel) {
171 upp_app_Vars(t_bevel) {
172 translate([0,ymin,0])
175 linear_extrude(height= ymax-ymin, convexity=10)
183 module AtTwoCorners(){
186 translate((hsz - cnr_rad) * [1,1])
188 rotate_extrude(convexity=10)
189 translate([-cnr_rad,0])
191 translate([0,0,-250])
198 /// corners, and front and back of base
199 for (ym=[0,1]) mirror([0,ym,0]) {
203 hull() AtTwoCorners(){
214 // side walls and base
215 SWalls(yw6 , yw4 , bevel ) { UsualProfile(); BaseProfile(); }
216 SWalls(yw5 , yw4 , a_bevel) { AnchorWallProfile(); BaseProfile(); }
217 SWalls(yw5 , yw12, a_bevel) { NearAnchorProfile(); BaseProfile(); }
218 SWalls(yw3 , yw2 , a_bevel) { AnchorProfile(); BaseProfile(); }
219 SWalls(yw11, yw12, a_bevel) { AnchorWallProfile(); BaseProfile(); }
220 SWalls(yw11, yw13, bevel ) { UsualProfile(); BaseProfile(); }
221 SWalls(yw1, yw10, a_bevel) { WebProfile(); SomeBaseProfile($gppS, $xppF); }
223 // front and rear walls
224 rotate([0,0,90]) SWalls(yw6, yw13, bevel) UsualProfile();
227 module KsafeBase(){ ////toplevel
234 translate([0,0, -bolt_above -0.5 * bolthole_height])
235 cube(center=true, [ cut, bolthole_width, bolthole_height ]);
239 -(bolthole_width/2 + bolthole_rhs),
241 mirror([0,1,0]) mirror([0,0,1])
244 lidinner_thick_allow + string_depth + 1 ]);
247 for (mx=[0,1]) mirror([mx,0,0]) {
248 translate([ thumbslot_between/2,
251 cube([ thumbslot_width,
253 thumbslot_depth+1 ]);
258 module DemoProfiles(){
259 translate([0,0,-2]) color("yellow") AnchorWallProfile();
260 color("red") AnchorProfile();
261 translate([0,0,2]) color("black") NearAnchorProfile();
262 translate([0,0,4]) color("blue") UsualProfile();
263 translate([0,0,-4]) color("pink") WebProfile();
266 module RimTest(){ ////toplevel
269 cube(center=true, [ main_sz*2, main_sz*2,
274 module BoltTest(){ ////toplevel
275 dy = 0.5 * (bolthole_width+4);
278 translate([ 0, -dy, -(bolt_above + bolthole_height + 1) ])
279 cube([ main_sz, dy*2, 50 ]);