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 dcover_endthick = 3.0;
35 dcover_mainthick = 5.0;
36 dcover_slop_height = 0.35;
37 dcover_slop_depth = 0.25;
38 dcover_slop_inside = 1.50;
39 dcover_commonvertoff = 0.00; // slop_height or slop_inside is added too
41 // ----- calculated -----
46 gppB = gppA - [ wall_thick, 0 ];
48 gppL = [ gppB[0], -(lidinner_thick_allow + space + base_thick) ];
51 yw2 = yw1 - bolthole_rhs;
52 yw3 = yw2 - anchor_thick;
53 yw4 = yw3 - anchor_wall_space;
54 yw5 = yw4 - wall_thick;
55 yw6 = -(hsz - cnr_rad + 0.1);
58 yw11 = yw2 + anchor_wall_space;
59 yw12 = yw11 + wall_thick;
62 cpp1 = dpp1 + [ dcover_slop_depth, dcover_slop_height ];
63 cpp2 = dpp2 + [ -dcover_slop_depth, dcover_slop_height ];
64 cppH = cpp1 + [ 0, dcover_endthick ];
65 cppA = [ cpp2[0], dpp3[1] + dcover_slop_inside ];
66 cppK = cppA + [ 0, dcover_mainthick ];
67 cppZ = [ -ksafecover_lip, -dcover_commonvertoff ];
68 cppD = cppZ + [ 0, -dcover_slop_inside ];
69 cppE = cppD + [ 0, -dcover_mainthick ];
70 cppC = [ dcover_slop_inside, cppD[1] ];
71 cppF = cppC + dcover_mainthick * [1,-1];
72 cppB = [ cppC[0], cppA[1] ];
73 cppG = [ cppF[0], cppK[1] ];
77 anchor_b = anchor_thick + anchor_rad;
78 appM = gppL + anchor_b * [1,1];
80 a_bevel = 2 * anchor_b * (1 + sqrt(0.5));
82 module upp_app_Vars(t_bevel){
83 $xppE = gppL + t_bevel * [0,1];
84 $xppF = gppL + t_bevel * [1,0];
86 $xppJ = $xppE + wall_thick * [ 1, tan(22.5) ];
87 $xppI = $xppF + base_thick * [ tan(22.5), 1 ];
89 // must pass a_bevel for t_bevel for these to be valid
90 $gppP = gppA + [0,-1] * lidinner_thick_allow;
91 $gppQ = $gppP + [1,-1] * web_height;
92 $gppR = $xppJ + [ 1, tan(22.5) ] * web_height;
93 $gppS = $xppI + [ tan(22.5), 1 ] * web_height;
94 $gppT = [ $gppQ[0], $xppE[1] ];
99 module upp_app_Profile(){
111 module UsualProfile(){
112 upp_app_Vars(bevel) upp_app_Profile();
115 module NearAnchorProfile(){
116 upp_app_Vars(a_bevel) upp_app_Profile();
119 module AnchorProfile(){
120 upp_app_Vars(a_bevel) {
131 translate(appM) circle(r= anchor_b);
133 translate(appM) circle(r= anchor_rad);
138 module AnchorWallProfile(){
142 for (bev = [bevel, a_bevel]) {
155 upp_app_Vars(a_bevel){
156 if ($gppR[1] <= $gppP[1]) {
172 $gppP + web_height * [1,0] ],
183 module SomeBaseProfile(I, F){
190 module BaseProfile(){
191 SomeBaseProfile($xppI, $xppF);
194 module DCoverProfileRaw(){
209 module DCoverProfile(){
214 module SWalls(ymin, ymax, t_bevel) {
215 upp_app_Vars(t_bevel) {
216 translate([0,ymin,0])
219 linear_extrude(height= ymax-ymin, convexity=10)
227 module AtTwoCorners(){
230 translate((hsz - cnr_rad) * [1,1])
232 rotate_extrude(convexity=10)
233 translate([-cnr_rad,0])
235 translate([0,0,-250])
242 /// corners, and front and back of base
243 for (ym=[0,1]) mirror([0,ym,0]) {
247 hull() AtTwoCorners(){
258 // side walls and base
259 SWalls(yw6 , yw4 , bevel ) { UsualProfile(); BaseProfile(); }
260 SWalls(yw5 , yw4 , a_bevel) { AnchorWallProfile(); BaseProfile(); }
261 SWalls(yw5 , yw12, a_bevel) { NearAnchorProfile(); BaseProfile(); }
262 SWalls(yw3 , yw2 , a_bevel) { AnchorProfile(); BaseProfile(); }
263 SWalls(yw11, yw12, a_bevel) { AnchorWallProfile(); BaseProfile(); }
264 SWalls(yw11, yw13, bevel ) { UsualProfile(); BaseProfile(); }
265 SWalls(yw1, yw10, a_bevel) { WebProfile(); SomeBaseProfile($gppS, $xppF); }
267 // front and rear walls
268 rotate([0,0,90]) SWalls(yw6, yw13, bevel) UsualProfile();
271 module KsafeBase(){ ////toplevel
278 translate([0,0, -bolt_above -0.5 * bolthole_height])
279 cube(center=true, [ cut, bolthole_width, bolthole_height ]);
283 -(bolthole_width/2 + bolthole_rhs),
285 mirror([0,1,0]) mirror([0,0,1])
288 lidinner_thick_allow + string_depth + 1 ]);
291 for (mx=[0,1]) mirror([mx,0,0]) {
292 translate([ thumbslot_between/2,
295 cube([ thumbslot_width,
297 thumbslot_depth+1 ]);
302 module DemoProfiles(){ ////toplevel
303 translate([0,0,-2]) color("yellow") AnchorWallProfile();
304 color("red") AnchorProfile();
305 translate([0,0,2]) color("black") NearAnchorProfile();
306 translate([0,0,4]) color("blue") UsualProfile();
307 translate([0,0,-4]) color("pink") WebProfile();
308 translate([0,0,6]) color("purple") DCoverProfile();
311 module RimTest(){ ////toplevel
314 cube(center=true, [ main_sz*2, main_sz*2,
319 module BoltTest(){ ////toplevel
320 dy = 0.5 * (bolthole_width+4);
323 translate([ 0, -dy, -(bolt_above + bolthole_height + 1) ])
324 cube([ main_sz, dy*2, 50 ]);