1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
cube_side = 100;
min_cube_height = 116;
shaft_hole_rad=15;
blind_hole_depth = 5; // arbitrary value, TODO
clamp_hole_rad = 13/2;
board_width=18;
cube_height = board_width * ceil(min_cube_height / board_width);
clamp_hole_excentricity = (shaft_hole_rad + cube_side/2 - clamp_hole_rad) / 2;
module suspension_cube() {
difference() {
translate([-cube_side/2, -cube_side/2, 0])
union() {
cube([cube_side, cube_side, cube_height]);
cube([cube_side + board_width, cube_side + board_width, board_width]);
}
// bore hole for bike shaft (radius of the smallest available
// tool larger than the shaft radius)
cylinder(r=shaft_hole_rad, h=2*cube_height, center=true);
// blind holes to capture the bearing
for (h = [-0.001, cube_height - blind_hole_depth + 0.001])
translate([0, 0, h])
cylinder(r=20, h=blind_hole_depth);
// holes for clamping screws
for (i = [-1, 1])
for (j = [-1, 1])
rotate([0, 0, 45+j*45])
translate([i * clamp_hole_excentricity,
0,
board_width + (0.5 - i/4)*(cube_height - board_width) + j*clamp_hole_rad])
rotate([90, 0, 0])
cylinder(r=clamp_hole_rad, h=2*cube_height, center=true);
}
}
if (no_master == undef)
suspension_cube();
|