Yep, there are other knurling libraries, and most of them work by creating an array of polyhedrons to add to a surface. This one creates cut grooves that are subtracted from the surface.
Available parameters are:
diameter of cylinder,
height of cylinder,
number of cuts in each direction,
depth of cut,
angle of rotation for each cut
It may be no better than the others, but I just like the idea of knurling as cut grooves rather than little pyramids. Please use as you like, and let me know your thoughts for improvements.
Reference this file in your code: use < knurlinder.scad > ;
knurlinder(radius, height, number of cuts, depth of cuts, rotation angle of cuts);
radius of the cylinder -
height of cylinder -
number of cuts - if you specify 12, for example, there will be 24 cuts spiraled around the cylinder at the rotation specified, 12 in the clockwise direction and 12 in the counter-clockwise direction. -
depth of cuts - max cut depth will display in the console when previewed -
- rotation angle - each cut starts at the bottom of the cylinder at zero degrees and is cut to the top at the angle specified. If you specify 90 degrees, each cut will start and end 90 degrees apart on the cylinder. -
knurlinder(12,10,24,0.8,45); will yield a cylinder of 12 radius, 10 height, 24 cuts in each direction at 0.8 deep, rotated 45 degrees on the cylinder.
echo("practical cutting depth",tr);
if(dc>tr) echo("WARNING - cut depth exceeds practical depth",tr);