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 ksafecover_lip = 4.62;
34 display_width = 69.81 - 0.50;
35 dcover_endthick = 3.0;
36 dcover_mainthick = 5.0;
37 dcover_slop_height = 0.35;
38 dcover_slop_depth = 0.25;
39 dcover_slop_inside = 1.50;
40 dcover_commonvertoff = 0.00; // slop_height or slop_inside is added too
42 // ----- calculated -----
47 gppB = gppA - [ wall_thick, 0 ];
49 gppL = [ gppB[0], -(lidinner_thick_allow + space + base_thick) ];
52 yw2 = yw1 - bolthole_rhs;
53 yw3 = yw2 - anchor_thick;
54 yw4 = yw3 - anchor_wall_space;
55 yw5 = yw4 - wall_thick;
56 yw6 = -(hsz - cnr_rad + 0.1);
59 yw11 = yw2 + anchor_wall_space;
60 yw12 = yw11 + wall_thick;
63 cpp1 = dpp1 + [ dcover_slop_depth, dcover_slop_height ];
64 cpp2 = dpp2 + [ -dcover_slop_depth, dcover_slop_height ];
65 cppH = cpp1 + [ 0, dcover_endthick ];
66 cppA = [ cpp2[0], dpp3[1] + dcover_slop_inside ];
67 cppK = cppA + [ 0, dcover_mainthick ];
68 cppZ = [ -ksafecover_lip, -dcover_commonvertoff ];
69 cppD = cppZ + [ 0, -dcover_slop_inside ];
70 cppE = cppD + [ 0, -dcover_mainthick ];
71 cppC = [ dcover_slop_inside, cppD[1] ];
72 cppF = cppC + dcover_mainthick * [1,-1];
73 cppB = [ cppC[0], cppA[1] ];
74 cppG = [ cppF[0], cppK[1] ];
78 anchor_b = anchor_thick + anchor_rad;
79 appM = gppL + anchor_b * [1,1];
81 a_bevel = 2 * anchor_b * (1 + sqrt(0.5));
83 module upp_app_Vars(t_bevel){
84 $xppE = gppL + t_bevel * [0,1];
85 $xppF = gppL + t_bevel * [1,0];
87 $xppJ = $xppE + wall_thick * [ 1, tan(22.5) ];
88 $xppI = $xppF + base_thick * [ tan(22.5), 1 ];
90 // must pass a_bevel for t_bevel for these to be valid
91 $gppP = gppA + [0,-1] * lidinner_thick_allow;
92 $gppQ = $gppP + [1,-1] * web_height;
93 $gppR = $xppJ + [ 1, tan(22.5) ] * web_height;
94 $gppS = $xppI + [ tan(22.5), 1 ] * web_height;
95 $gppT = [ $gppQ[0], $xppE[1] ];
100 module upp_app_Profile(){
112 module UsualProfile(){
113 upp_app_Vars(bevel) upp_app_Profile();
116 module NearAnchorProfile(){
117 upp_app_Vars(a_bevel) upp_app_Profile();
120 module AnchorProfile(){
121 upp_app_Vars(a_bevel) {
132 translate(appM) circle(r= anchor_b);
134 translate(appM) circle(r= anchor_rad);
139 module AnchorWallProfile(){
143 for (bev = [bevel, a_bevel]) {
156 upp_app_Vars(a_bevel){
157 if ($gppR[1] <= $gppP[1]) {
173 $gppP + web_height * [1,0] ],
184 module SomeBaseProfile(I, F){
191 module BaseProfile(){
192 SomeBaseProfile($xppI, $xppF);
195 module DCoverProfileRaw(){
210 module DCoverProfile(){
216 module SWalls(ymin, ymax, t_bevel) {
217 upp_app_Vars(t_bevel) {
218 translate([0,ymin,0])
221 linear_extrude(height= ymax-ymin, convexity=10)
229 module AtTwoCorners(){
232 translate((hsz - cnr_rad) * [1,1])
234 rotate_extrude(convexity=10)
235 translate([-cnr_rad,0])
237 translate([0,0,-250])
244 /// corners, and front and back of base
245 for (ym=[0,1]) mirror([0,ym,0]) {
249 hull() AtTwoCorners(){
260 // side walls and base
261 SWalls(yw6 , yw4 , bevel ) { UsualProfile(); BaseProfile(); }
262 SWalls(yw5 , yw4 , a_bevel) { AnchorWallProfile(); BaseProfile(); }
263 SWalls(yw5 , yw12, a_bevel) { NearAnchorProfile(); BaseProfile(); }
264 SWalls(yw3 , yw2 , a_bevel) { AnchorProfile(); BaseProfile(); }
265 SWalls(yw11, yw12, a_bevel) { AnchorWallProfile(); BaseProfile(); }
266 SWalls(yw11, yw13, bevel ) { UsualProfile(); BaseProfile(); }
267 SWalls(yw1, yw10, a_bevel) { WebProfile(); SomeBaseProfile($gppS, $xppF); }
269 // front and rear walls
270 rotate([0,0,90]) SWalls(yw6, yw13, bevel) UsualProfile();
273 module KsafeBase(){ ////toplevel
280 translate([0,0, -bolt_above -0.5 * bolthole_height])
281 cube(center=true, [ cut, bolthole_width, bolthole_height ]);
285 -(bolthole_width/2 + bolthole_rhs),
287 mirror([0,1,0]) mirror([0,0,1])
290 lidinner_thick_allow + string_depth + 1 ]);
293 for (mx=[0,1]) mirror([mx,0,0]) {
294 translate([ thumbslot_between/2,
297 cube([ thumbslot_width,
299 thumbslot_depth+1 ]);
304 module DemoProfiles(){ ////toplevel
305 translate([0,0,-2]) color("yellow") AnchorWallProfile();
306 color("red") AnchorProfile();
307 translate([0,0,2]) color("black") NearAnchorProfile();
308 translate([0,0,4]) color("blue") UsualProfile();
309 translate([0,0,-4]) color("pink") WebProfile();
310 translate([0,0,6]) color("purple") DCoverProfile();
313 module RimTest(){ ////toplevel
316 cube(center=true, [ main_sz*2, main_sz*2,
321 module BoltTest(){ ////toplevel
322 dy = 0.5 * (bolthole_width+4);
325 translate([ 0, -dy, -(bolt_above + bolthole_height + 1) ])
326 cube([ main_sz, dy*2, 50 ]);