// 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 generates a 3D model of a horizontal bearing base and its holes, along with a vertical bearing structure. The horizontal bearing base consists of a cube with a bearing holder at the center and cutouts for ziptie slots. The vertical bearing structure includes a main bearing cut, ziptie cutouts, and bearing retainers. The code defines various parameters such as bearing diameter, cutter length, holder length, and thickness of the bearing walls. It also includes a test section to visualize different bearing sizes.