4 bolt_above = 8.50 - 0.50;
5 bolthole_height = 4.24 + 1.00;
7 bolthole_width = 16.62 + 1.00;
8 main_sz = 149.06 - 0.25;
10 lidinner_thick_allow = 20.78 + 0.50;
11 display_width = 69.81 - 0.50;
14 dpp2 = [ -11.0, 7.0 ];
15 dpp1 = [ -34.0, 14.0 ];
19 web_height = 20; // excluding wall and base thick
23 anchor_wall_space = 25;
31 thumbslot_depth = 5.0;
32 thumbslot_width = 15.0;
33 thumbslot_between = 10;
34 ksafecover_lip = 4.62;
35 display_rhs_secs = 15;
36 dcover_endthick = 3.0;
37 dcover_mainthick = 5.0;
38 dcover_slop_height = 0.35;
39 dcover_slop_depth = 0.25;
40 dcover_slop_inside = 1.50;
41 dcover_commonvertoff = 0.00; // slop_height or slop_inside is added too
42 dcover_edge_gap_more_width = 2.0; // each side
44 // ----- calculated -----
50 gppB = gppA - [ wall_thick, 0 ];
52 gppL = [ gppB[0], -(lidinner_thick_allow + space + base_thick) ];
55 yw2 = yw1 - bolthole_rhs;
56 yw3 = yw2 - anchor_thick;
57 yw4 = yw3 - anchor_wall_space;
58 yw5 = yw4 - wall_thick;
59 yw6 = -(hsz - cnr_rad + 0.1);
62 yw11 = yw2 + anchor_wall_space;
63 yw12 = yw11 + wall_thick;
66 cpp1 = dpp1 + [ dcover_slop_depth, dcover_slop_height ];
67 cpp2 = [ dpp2[0] - dcover_slop_depth, dpp3[1] + dcover_slop_height ];
68 cppH = cpp1 + [ 0, dcover_endthick ];
69 cppA = [ cpp2[0], dpp3[1] + dcover_slop_inside ];
70 cppK = cppA + [ 0, dcover_mainthick ];
71 cppZ = [ -ksafecover_lip, -dcover_commonvertoff ];
72 cppD = cppZ + [ 0, -dcover_slop_inside ];
73 cppC = [ dcover_slop_inside, cppD[1] ];
74 cppF = cppC + dcover_mainthick * [1,-1];
75 cppB = [ cppC[0], cppA[1] ];
76 cppG = [ cppF[0], cppK[1] ];
77 cppE = [ cppD[0], cppF[1] - (cppF[0] - cppD[0]) ];
81 anchor_b = anchor_thick + anchor_rad;
82 appM = gppL + anchor_b * [1,1];
84 a_bevel = 2 * anchor_b * (1 + sqrt(0.5));
86 module upp_app_Vars(t_bevel){
87 $xppE = gppL + t_bevel * [0,1];
88 $xppF = gppL + t_bevel * [1,0];
90 $xppJ = $xppE + wall_thick * [ 1, tan(22.5) ];
91 $xppI = $xppF + base_thick * [ tan(22.5), 1 ];
93 // must pass a_bevel for t_bevel for these to be valid
94 $gppP = gppA + [0,-1] * lidinner_thick_allow;
95 $gppQ = $gppP + [1,-1] * web_height;
96 $gppR = $xppJ + [ 1, tan(22.5) ] * web_height;
97 $gppS = $xppI + [ tan(22.5), 1 ] * web_height;
98 $gppT = [ $gppQ[0], $xppE[1] ];
103 module upp_app_Profile(){
115 module UsualProfile(){
116 upp_app_Vars(bevel) upp_app_Profile();
119 module NearAnchorProfile(){
120 upp_app_Vars(a_bevel) upp_app_Profile();
123 module AnchorProfile(){
124 upp_app_Vars(a_bevel) {
135 translate(appM) circle(r= anchor_b);
137 translate(appM) circle(r= anchor_rad);
142 module AnchorWallProfile(){
146 for (bev = [bevel, a_bevel]) {
159 upp_app_Vars(a_bevel){
160 if ($gppR[1] <= $gppP[1]) {
176 $gppP + web_height * [1,0] ],
187 module SomeBaseProfile(I, F){
194 module BaseProfile(){
195 SomeBaseProfile($xppI, $xppF);
198 module DCoverProfileRaw(){
213 module DCoverProfile(){
219 module SWalls(ymin, ymax, t_bevel) {
220 upp_app_Vars(t_bevel) {
221 translate([0,ymin,0])
224 linear_extrude(height= ymax-ymin, convexity=10)
232 module AtTwoCorners(){
235 translate((hsz - cnr_rad) * [1,1])
237 rotate_extrude(convexity=10)
238 translate([-cnr_rad,0])
240 translate([0,0,-250])
247 /// corners, and front and back of base
248 for (ym=[0,1]) mirror([0,ym,0]) {
252 hull() AtTwoCorners(){
263 // side walls and base
264 SWalls(yw6 , yw4 , bevel ) { UsualProfile(); BaseProfile(); }
265 SWalls(yw5 , yw4 , a_bevel) { AnchorWallProfile(); BaseProfile(); }
266 SWalls(yw5 , yw12, a_bevel) { NearAnchorProfile(); BaseProfile(); }
267 SWalls(yw3 , yw2 , a_bevel) { AnchorProfile(); BaseProfile(); }
268 SWalls(yw11, yw12, a_bevel) { AnchorWallProfile(); BaseProfile(); }
269 SWalls(yw11, yw13, bevel ) { UsualProfile(); BaseProfile(); }
270 SWalls(yw1, yw10, a_bevel) { WebProfile(); SomeBaseProfile($gppS, $xppF); }
272 // front and rear walls
273 rotate([0,0,90]) SWalls(yw6, yw13, bevel) UsualProfile();
276 module DCover(){ ////toplevel
277 translate([ -display_width/2, -hsz, 0 ])
280 linear_extrude( display_width - display_rhs_secs, convexity = 10)
284 module DCoverSupportAllowance(){
285 translate([0, -hsz, 0])
287 [ display_width + 2 * dcover_edge_gap_more_width,
289 dcover_slop_inside * 2 + 0.01 ]);
293 translate([0,0, -(bolt_above + 0.5 * bolthole_height)])
294 cube(center=true, [ cut, bolthole_width, bolthole_height ]);
297 module KsafeBase(){ ////toplevel
307 -(bolthole_width/2 + bolthole_rhs),
309 mirror([0,1,0]) mirror([0,0,1])
312 lidinner_thick_allow + string_depth + 1 ]);
315 for (mx=[0,1]) mirror([mx,0,0]) {
316 translate([ thumbslot_between/2,
319 cube([ thumbslot_width,
321 thumbslot_depth+1 ]);
324 DCoverSupportAllowance();
328 module DemoProfiles(){ ////toplevel
329 translate([0,0,-2]) color("yellow") AnchorWallProfile();
330 color("red") AnchorProfile();
331 translate([0,0,2]) color("black") NearAnchorProfile();
332 translate([0,0,4]) color("blue") UsualProfile();
333 translate([0,0,-4]) color("pink") WebProfile();
334 translate([0,0,6]) color("purple") DCoverProfile();
337 module RimTest(){ ////toplevel
340 cube(center=true, [ main_sz*2, main_sz*2,
345 module DCoverTest(){ ////toplevel
352 DCoverSupportAllowance();
356 cube(center=true, [ main_sz*2, main_sz*2,
361 module BoltTest(){ ////toplevel
362 dy = 0.5 * (bolthole_width+4);
365 translate([ 0, -dy, -(bolt_above + bolthole_height + 1) ])
366 cube([ main_sz, dy*2, 50 ]);