// Ziptie cutouts
ziptie_cut_ofset = 0;
for ( i = [0 : bearings-1] ){
// For easier positioning I move them by half of one
// bearing holder then add each bearign lenght and then center again
translate(v=[0,-holder_lenght/2,0]) translate(v=[0,one_holder_lenght/2+i*25,0]) difference(){
union(){
translate(v=[0,2-6,12]) rotate(a=[90,0,0]) translate(v=[0,0,0]) cylinder(h = 4, r=12.5, fn=50);translate(v=[0,2+6,12])rotate(a=[90,0,0])translate(v=[0,0,0])cylinder(h=4,r=12.5,fn=50);
}
translate(v=[0,10,12]) rotate(a=[90,0,0]) translate(v=[0,0,0]) cylinder(h = 24, r=10, $fn=50);
}
}
This OpenSCAD code will generate a horizontal bearing with multiple bearings and vertical bearings. The horizontal bearing is made up of a base and holes. The base is a cube with dimensions [24, 8+bearings*25, 12], and the holes are cutouts with dimensions [24, 6, 8]. The bearings are positioned at different heights and are separated by the bearing diameter.
The code also includes a test module that generates multiple bearings with different numbers of bearings. The vertical bearing is a cylinder with a diameter equal to the bearing diameter plus twice the thinwall. The code also includes a cutout for zipties to hold the bearings together. The ziptie cutouts are positioned at the bottom of the bearing and are spaced apart by the bearing diameter.