1 include <DroidSans.scad>
3 // the holes layout is determined by this variable:
4 // drill bit sizes, row by row.
5 // remember to add these numbers also to numbers.txt
6 // and regenerate DroidSans.scad using make.sh
8 [ 1.5, 1.7, 2, 2.2, 2.3, 2.5, 3, 3.2, 3.4, 3.5, 4, ],
9 [ 4.2, 4.5, 4.6, 4.7, 4.8, 4.9, 5, 5.1, 5.2, 5.5, ],
10 [ 5.7, 6, 6.1, 6.2, 6.5, 6.7, 6.8, 7, 7.5, 8, ],
11 [ 8.5, 8.6, 9, 9.5, 9.8, 10, 10.1, 10.4 ],
13 sizes_max = 10.4; // the maximum value of the above values
17 row_y_offsets = [ // can we calculate this somehow?
19 sizes[0][len(sizes[0])-1],
20 sizes[0][len(sizes[0])-1] + sizes[1][len(sizes[1])-1],
21 sizes[0][len(sizes[0])-1] + sizes[1][len(sizes[1])-1] + sizes[2][len(sizes[2])-1],
22 sizes[0][len(sizes[0])-1] + sizes[1][len(sizes[1])-1] + sizes[2][len(sizes[2])-1] + sizes[3][len(sizes[3])-1],
26 sizes = [ [ 1.5, 4.6 ], [ 6.1, 10.1 ] ];
27 // sizes = [ [ 10, 8 ], [ 9.1, 7 ] ];
33 // 1.5, 2, 2, 3, 3, 3.5, 4.5, 4.5, 4.8, 5, 5.1, 5.5, 6, 6.5, 7,
36 diam_tolerance = 0.2; // make the hole diameter this bigger
37 drill_bottom = 1.2; // solid bottom (where the holes end)
38 drill_cone = 1.5; // top of the hole is wider by this
41 item_height = 8; // height of the first row
42 item_depth = sizes_max + 2*drill_cone + angled_height/sqrt(2);
43 item_h_step = angled_height/sqrt(2); // other rows increment
48 // holder for a single bit
49 module one_slot(diam, width, depth, height) {
50 // precision holes; see
51 // http://hydraraptor.blogspot.cz/2011/02/polyholes.html
53 n = max(round(2 * (diam + diam_tolerance)),3);
54 assign(diam1 = (diam + diam_tolerance) / cos(180/n))
58 cube([width, depth, height]);
60 translate([width/2, (depth+angled_height/sqrt(2))/2, drill_bottom])
61 cylinder(r = diam1/2, h = infty, $fn=n);
63 translate([width/2, (depth+angled_height/sqrt(2))/2, height-drill_cone])
64 cylinder(r1 = diam1/2, r2 = (diam+drill_cone)/2,
65 h = drill_cone+epsilon,
68 translate([0, 0, height-angled_height/sqrt(2)])
70 translate([-infty/2, -infty, -infty/2])
73 translate([width/2, 0, height-angled_height/sqrt(2)])
75 scale([0.1, 0.1, 0.2])
76 translate([0, 12, 5-(0.8/0.1)])
81 module one_row(row, height) {
82 assign(item_width = total_width/len(row),
83 depth = row[len(row)-1] + 2*drill_cone + angled_height/sqrt(2))
84 for (i = [0 : len(row)-1])
85 translate([i*(item_width-epsilon), 0, 0])
86 one_slot(row[len(row)-1-i], item_width, depth, height);
89 module all_rows(rows) {
90 for (i = [0 : len(rows)-1]) {
91 translate([0, row_y_offsets[i] + i*(2*drill_cone + angled_height/sqrt(2) - epsilon), 0])
93 item_height+item_h_step*i);
97 translate([-total_width/2, -len(sizes)*item_depth/2, 0])