summaryrefslogtreecommitdiff
path: root/prototype/mech_pcbs/bearing_mount_bottom.scad
blob: 53467c3c03e8032727c1dac289da43244cdbe2f8 (plain)
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
46
/* Linear units are mm */

ext_dia = 32.0;
int_dia = 8.0;
h = 9;

mnth_dia = 3.2;
mnth_ins_dia = 6.0;
mnth_ins_h = 2.0;
mnth_center_r = 45.0;
mnth_num = 5;

mnta_w = 15.0;
mnta_h = 6.0;

bearing_od = 19.0;
bearing_h = 6.0;

$fn = 64;

translate([0, 0, h])
rotate(180, [0, 1, 0])
difference() {
    union() {
        cylinder(d=ext_dia, h=h);
        for (alpha = [0 : 360/mnth_num : 359.9999]) {
            rotate(alpha-180, [0,0,1]) {
                translate([0, -mnta_w/2, 0]) cube([mnth_center_r, mnta_w, mnta_h]);
                translate([mnth_center_r, 0, 0]) cylinder(d=mnta_w, h=mnta_h);
            }
        }
    }
    
    cylinder(d=int_dia, h=h);
    
    for (alpha = [0 : 360/mnth_num : 359.9999]) {
        rotate(alpha, [0, 0, 1])
        translate([-mnth_center_r, 0, 0])
        union() {
            cylinder(d=mnth_dia, h=mnta_h);
            translate([0, 0, mnta_h-mnth_ins_h]) cylinder(d=mnth_ins_dia, h=mnth_ins_h);
        }
    }
    
    cylinder(d=bearing_od, h=bearing_h);
}