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;
13 dpp2 = [ -11.0, 7.0 ];
14 dpp1 = [ -34.0, 14.0 ];
18 web_height = 20; // excluding wall and base thick
22 anchor_wall_space = 25;
30 thumbslot_depth = 5.0;
31 thumbslot_width = 15.0;
32 thumbslot_between = 10;
33 dcover_endthick = 3.0;
34 dcover_mainthick = 5.0;
35 dcover_slop_height = 0.25;
36 dcover_slop_depth = 0.25;
37 dcover_slop_inside = 1.25;
39 // ----- calculated -----
44 gppB = gppA - [ wall_thick, 0 ];
46 gppL = [ gppB[0], -(lidinner_thick_allow + space + base_thick) ];
49 yw2 = yw1 - bolthole_rhs;
50 yw3 = yw2 - anchor_thick;
51 yw4 = yw3 - anchor_wall_space;
52 yw5 = yw4 - wall_thick;
53 yw6 = -(hsz - cnr_rad + 0.1);
56 yw11 = yw2 + anchor_wall_space;
57 yw12 = yw11 + wall_thick;
62 anchor_b = anchor_thick + anchor_rad;
63 appM = gppL + anchor_b * [1,1];
65 a_bevel = 2 * anchor_b * (1 + sqrt(0.5));
67 module upp_app_Vars(t_bevel){
68 $xppE = gppL + t_bevel * [0,1];
69 $xppF = gppL + t_bevel * [1,0];
71 $xppJ = $xppE + wall_thick * [ 1, tan(22.5) ];
72 $xppI = $xppF + base_thick * [ tan(22.5), 1 ];
74 // must pass a_bevel for t_bevel for these to be valid
75 $gppP = gppA + [0,-1] * lidinner_thick_allow;
76 $gppQ = $gppP + [1,-1] * web_height;
77 $gppR = $xppJ + [ 1, tan(22.5) ] * web_height;
78 $gppS = $xppI + [ tan(22.5), 1 ] * web_height;
79 $gppT = [ $gppQ[0], $xppE[1] ];
84 module upp_app_Profile(){
96 module UsualProfile(){
97 upp_app_Vars(bevel) upp_app_Profile();
100 module NearAnchorProfile(){
101 upp_app_Vars(a_bevel) upp_app_Profile();
104 module AnchorProfile(){
105 upp_app_Vars(a_bevel) {
116 translate(appM) circle(r= anchor_b);
118 translate(appM) circle(r= anchor_rad);
123 module AnchorWallProfile(){
127 for (bev = [bevel, a_bevel]) {
140 upp_app_Vars(a_bevel){
141 if ($gppR[1] <= $gppP[1]) {
157 $gppP + web_height * [1,0] ],
168 module SomeBaseProfile(I, F){
175 module BaseProfile(){
176 SomeBaseProfile($xppI, $xppF);
179 module SWalls(ymin, ymax, t_bevel) {
180 upp_app_Vars(t_bevel) {
181 translate([0,ymin,0])
184 linear_extrude(height= ymax-ymin, convexity=10)
192 module AtTwoCorners(){
195 translate((hsz - cnr_rad) * [1,1])
197 rotate_extrude(convexity=10)
198 translate([-cnr_rad,0])
200 translate([0,0,-250])
207 /// corners, and front and back of base
208 for (ym=[0,1]) mirror([0,ym,0]) {
212 hull() AtTwoCorners(){
223 // side walls and base
224 SWalls(yw6 , yw4 , bevel ) { UsualProfile(); BaseProfile(); }
225 SWalls(yw5 , yw4 , a_bevel) { AnchorWallProfile(); BaseProfile(); }
226 SWalls(yw5 , yw12, a_bevel) { NearAnchorProfile(); BaseProfile(); }
227 SWalls(yw3 , yw2 , a_bevel) { AnchorProfile(); BaseProfile(); }
228 SWalls(yw11, yw12, a_bevel) { AnchorWallProfile(); BaseProfile(); }
229 SWalls(yw11, yw13, bevel ) { UsualProfile(); BaseProfile(); }
230 SWalls(yw1, yw10, a_bevel) { WebProfile(); SomeBaseProfile($gppS, $xppF); }
232 // front and rear walls
233 rotate([0,0,90]) SWalls(yw6, yw13, bevel) UsualProfile();
236 module KsafeBase(){ ////toplevel
243 translate([0,0, -bolt_above -0.5 * bolthole_height])
244 cube(center=true, [ cut, bolthole_width, bolthole_height ]);
248 -(bolthole_width/2 + bolthole_rhs),
250 mirror([0,1,0]) mirror([0,0,1])
253 lidinner_thick_allow + string_depth + 1 ]);
256 for (mx=[0,1]) mirror([mx,0,0]) {
257 translate([ thumbslot_between/2,
260 cube([ thumbslot_width,
262 thumbslot_depth+1 ]);
267 module DemoProfiles(){
268 translate([0,0,-2]) color("yellow") AnchorWallProfile();
269 color("red") AnchorProfile();
270 translate([0,0,2]) color("black") NearAnchorProfile();
271 translate([0,0,4]) color("blue") UsualProfile();
272 translate([0,0,-4]) color("pink") WebProfile();
275 module RimTest(){ ////toplevel
278 cube(center=true, [ main_sz*2, main_sz*2,
283 module BoltTest(){ ////toplevel
284 dy = 0.5 * (bolthole_width+4);
287 translate([ 0, -dy, -(bolt_above + bolthole_height + 1) ])
288 cube([ main_sz, dy*2, 50 ]);