make deck flange smaller to print caster faster
[challenge-bot] / sonar-table-top-holder.scad
CommitLineData
dac38b58 1// challenge-bot
2// GNU AGPLv3 (or later at your option)
3// project available at these locations:
4// https://gitorious.org/ozzloy/challenge-bot
5// https://github.com/waynegramlich/challenge-bot
6
74f8c088 7// 3/8 inch in mm
8deck_depth = 4.7625;
dac38b58 9sonar_plate_width = 20;
10sonar_plate_length = 45;
8ca271e9 11// sonar sensor measurements taken with calipers:
12// 9.6 in between, 41.33 outside, 15.82 diameter
13// measured diameter of 15.82 with calipers,
14// but when printed ends up being too small
15sonar_sensor_radius = 15.82 / 2 + 0.3;
dac38b58 16sonar_sensor_height = 13.8;
8ca271e9 17between_sensor_centers = 15.82 + 9.6;
18
74f8c088 19sonar_holder_length = sonar_plate_length + 10;
20sonar_holder_width = sonar_plate_width + 3;
dac38b58 21sonar_holder_depth = 3;
8ca271e9 22
74f8c088 23
24module sensors(){
25 translate([between_sensor_centers / 2, 0, 0]){
26 cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);}
27 translate([-between_sensor_centers / 2, 0, 0]){
28 cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);}}
29
30module deck_holder(){
31 deck_holder_length = 25;
32 deck_holder_width = sonar_holder_width;
33 cube([deck_holder_length, deck_holder_width, sonar_holder_depth]);
34 translate([0, 0, sonar_holder_depth]){
35 cube([deck_depth, deck_holder_width, deck_depth]);
36 translate([0, 0, deck_depth]){
37 cube([deck_holder_length, deck_holder_width, sonar_holder_depth]);}}}
38
39module sonar_table_top_holder(){
40 difference(){
41 union(){
42 cube([sonar_holder_length, sonar_holder_width, sonar_holder_depth]);
43 translate([sonar_holder_length, 0, 0]){
44 deck_holder();}}
45 translate([between_sensor_centers / 2 + sonar_sensor_radius + 3,
46 sonar_holder_width / 2,
47 -1]){
48 sensors();}
49 // cut out a bit of the circle to make it 3d printable,
50 // no severe overhang
51 translate([3 + sonar_sensor_radius,
52 sonar_holder_width - 3.025,
53 sonar_holder_depth / 2 - 0.025]){
54 cube([10, 6.1, sonar_holder_depth + .1], center = true);
55 translate([between_sensor_centers, 0, 0]){
56 cube([10, 6.1, sonar_holder_depth + .1], center = true);}}}}
dac38b58 57
74f8c088 58rotate([90, 0, 0]){
59 sonar_table_top_holder();}