Merge pull request #936 from revarbat/revarbat_dev

Added a clay pattern roller example to cyl()
This commit is contained in:
Revar Desmera 2022-08-30 20:17:21 -07:00 committed by GitHub
commit b4872e2820
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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,