2012-03-12 01:13:07 +00:00
|
|
|
//
|
|
|
|
// Mendel90
|
|
|
|
//
|
|
|
|
// GNU GPL v2
|
|
|
|
// nop.head@gmail.com
|
|
|
|
// hydraraptor.blogspot.com
|
|
|
|
//
|
|
|
|
// Ball bearings
|
|
|
|
//
|
|
|
|
BB624 = [4, 13, 5, "624"]; // 624 ball bearing for idlers
|
|
|
|
BB608 = [8, 22, 7, "608"]; // 608 bearings for wades
|
|
|
|
|
|
|
|
function ball_bearing_diameter(type) = type[1];
|
|
|
|
function ball_bearing_width(type) = type[2];
|
|
|
|
|
|
|
|
module ball_bearing(type) {
|
2012-04-02 15:30:31 +01:00
|
|
|
vitamin(str("BB",type[3],": Ball bearing ",type[3]," ",type[0], "mm x ", type[1], "mm x ", type[2], "mm"));
|
2012-03-12 01:13:07 +00:00
|
|
|
rim = type[1] / 10;
|
|
|
|
|
2012-03-13 10:02:35 -05:00
|
|
|
color(bearing_color) render() difference() {
|
2012-03-12 01:13:07 +00:00
|
|
|
cylinder(r = type[1] / 2, h = type[2], center = true);
|
|
|
|
cylinder(r = type[0] / 2, h = type[2] + 1, center = true);
|
|
|
|
for(z = [-type[2] / 2, type[2] / 2])
|
|
|
|
translate([0,0,z]) difference() {
|
|
|
|
cylinder(r = (type[1] - rim) / 2, h = 2, center = true);
|
2014-06-12 23:12:59 +01:00
|
|
|
cylinder(r = (type[0] + rim) / 2, h = 3, center = true);
|
2012-03-12 01:13:07 +00:00
|
|
|
}
|
|
|
|
}
|
2016-01-05 12:18:38 +00:00
|
|
|
if($children)
|
|
|
|
translate([0, 0, ball_bearing_width(type) / 2])
|
|
|
|
children();
|
2012-03-12 01:13:07 +00:00
|
|
|
}
|
2013-09-25 01:28:24 +01:00
|
|
|
|
|
|
|
module bearing_ball(dia) {
|
|
|
|
vitamin(str("SB",dia * 10,": Steel ball ",dia, "mm"));
|
|
|
|
color(bearing_color) render() sphere(r = dia / 2);
|
|
|
|
}
|