Added a clay pattern roller example to cyl()

This commit is contained in:
Garth Minette 2022-08-30 19:45:14 -07:00
parent b42b4ac962
commit f3261c5eaf

View file

@ -1287,6 +1287,38 @@ function cylinder(h, r1, r2, center, l, r, d, d1, d2, anchor, spin=0, orient=UP)
// cyl(d1=25, d2=20, h=30, rounding=5,
// texture="trunc_ribs", tex_taper=10,
// tex_size=[5,1]);
//
// Example: Making a Clay Pattern Roller
// tex = [
// [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,],
// [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,],
// [1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,],
// [1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,],
// [0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,],
// [0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,],
// [0,1,1,0,0,1,1,0,0,1,1,1,1,1,1,0,],
// [0,1,1,0,0,1,1,0,0,1,1,1,1,1,1,0,],
// [0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,],
// [0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,],
// [0,1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,],
// [0,1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,],
// [0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,],
// [0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,],
// [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,],
// [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,],
// [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,],
// ];
// diff()
// cyl(d=20*10/PI, h=10, chamfer=0,
// texture=tex, tex_counts=[20,1], tex_scale=-1,
// tex_taper=undef, tex_style="concave") {
// attach([TOP,BOT]) {
// cyl(d1=20*10/PI, d2=30, h=5, anchor=BOT)
// attach(TOP) {
// tag("remove") zscale(0.5) up(3) sphere(d=15);
// }
// }
// }
function cyl(
h, r, center,