-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathleadscrew-bearing-block.scad
54 lines (44 loc) · 1.25 KB
/
leadscrew-bearing-block.scad
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
47
48
49
50
51
52
53
54
use <myLibs.scad>
use <../MCAD/triangles.scad>
width= 40;
height= 35;
depth= 30;
to_center= 20;
shafthole= 16;
bearinghole= 22;
bearingwidth= 7;
thick= 9;
module block(ext=0) {
union() {
// base
translate([0,0,thick/2-ext/2]) cube([width,depth,thick+ext], center= true);
// sides
translate([width/2, depth/2-thick+1, thick/2+ext/2]) rotate([90, 0, -90]) triangle(height, depth-thick, 5);
translate([-width/2+5, depth/2-thick+1, thick/2+ext/2]) rotate([90, 0, -90]) triangle(height, depth-thick, 5);
// face
translate([0, depth/2-thick/2, height/2+thick-0.1]) cube(size=[width, thick, height], center=true);
}
}
module holes(ext=0) {
// bearing hole
translate([0, depth/2-thick+bearingwidth, height/2+thick]) rotate([90, 0, 0]) hole(bearinghole, 20);
// shaft hole
translate([0, depth/2+5, height/2+thick]) rotate([90, 0, 0]) hole(shafthole, 20);
//attachment holes
for(x= [10,-10]) {
translate([x,-thick/2,-25]) hole(5, 50);
//counter sink
#translate([x,-thick/2,-ext+7]) hole(10, thick+ext+20);
}
}
module pillow(ht=0) {
// ht is height of center of bearing from the base
h= ht- (height/2+thick);
translate([0, 0, h]) difference() {
block(h);
holes(h);
}
}
// print
rotate([-90, 0, 0]) pillow(30);
//pillow(height/2+thick+5);