0.5 mm nozzle 0.2mm layers
It is essential to check the slicer's G-code path for proper separation of rollers and shells over the full height. I printed the part directly and with a clearance of 0.1 mm.
After print it may be necessary to break off the rollers with gentle force using some small skrewdriver. Once all roller are free, operate the bearing carefully and remove all droplets and waste the printhead may have spilled.
Then lube with silicon grease or lithium spray and operate the inner shell with a dremel at higher speed until the outer shell starts to feel warm. Repeat this until the bearing runs smoothly.
As the name AnySizeBearing promises, it lets you create a roller bearing with any inner and outer diameter, di, da and any height h. OK, there is some restriction in the code that enforces a minimal height and a minimal distance between the inner and outer diameter.
The call is simple. You specify the three measures and that's it:
bearing(da=40, di=11.7, h=12); // single unit
To simplify usage, the code automatically stacks up several instances, if the height is not representable by a single stage design. Further it also calculates the number and the radius of the rollers. Also note that I implemented a help_AnySizeBearing() function.
To test the code, I made a printout using a 0.5mm nozzle and 0.2mm layers. It came out well: see the video https://youtu.be/Lsn4va4d5Qc
In the parameter section you'll find some variables for customizing the output. In particular setting view_crossection to true, is quite helpful to preview exactly what get.
As in my other projects I'm using the library shortcuts.scad to speed up my coding. It defines a bunch of macros that save about 75% of typing and a lot of brackets. It also features a help_shortcuts() function which outputs a cheat sheet to the console. For more information about its usage please refer to https://www.thingiverse.com/thing:644830