Textures integration bugfixes.

This commit is contained in:
Revar Desmera 2022-08-21 00:21:58 -07:00
parent 60a565381a
commit 3ca4643e71
3 changed files with 13 additions and 13 deletions

View file

@ -181,9 +181,9 @@ module pco1810_cap(wall=2, texture="none", anchor=BOTTOM, spin=0, orient=UP)
difference() { difference() {
union() { union() {
if (texture == "knurled") { if (texture == "knurled") {
textured_cylinder(d=w, h=h, texture="diamonds", tex_size=[3,3], style="concave", anchor=BOT); cyl(d=w, h=h, texture="diamonds", tex_size=[3,3], tex_style="concave", anchor=BOT);
} else if (texture == "ribbed") { } else if (texture == "ribbed") {
textured_cylinder(d=w, h=h, texture="ribs", tex_size=[3,3], style="min_edge", anchor=BOT); cyl(d=w, h=h, texture="ribs", tex_size=[3,3], tex_style="min_edge", anchor=BOT);
} else { } else {
cyl(d=w, l=tamper_ring_h+wall, anchor=BOTTOM); cyl(d=w, l=tamper_ring_h+wall, anchor=BOTTOM);
} }
@ -362,9 +362,9 @@ module pco1881_cap(wall=2, texture="none", anchor=BOTTOM, spin=0, orient=UP)
difference() { difference() {
union() { union() {
if (texture == "knurled") { if (texture == "knurled") {
textured_cylinder(d=w, h=11.2+wall, texture="diamonds", tex_size=[3,3], style="concave", anchor=BOT); cyl(d=w, h=11.2+wall, texture="diamonds", tex_size=[3,3], tex_style="concave", anchor=BOT);
} else if (texture == "ribbed") { } else if (texture == "ribbed") {
textured_cylinder(d=w, h=11.2+wall, texture="ribs", tex_size=[3,3], style="min_edge", anchor=BOT); cyl(d=w, h=11.2+wall, texture="ribs", tex_size=[3,3], tex_style="min_edge", anchor=BOT);
} else { } else {
cyl(d=w, l=11.2+wall, anchor=BOTTOM); cyl(d=w, l=11.2+wall, anchor=BOTTOM);
} }
@ -567,9 +567,9 @@ module generic_bottle_cap(
// thickness so the wall+texture are the specified wall thickness. That // thickness so the wall+texture are the specified wall thickness. That
// seems wrong so this does specified thickness+texture // seems wrong so this does specified thickness+texture
if (texture == "knurled") { if (texture == "knurled") {
textured_cylinder(d=w + 1.5*diamMagMult, l=h, texture="diamonds", tex_size=[3,3], style="concave", anchor=BOT); cyl(d=w + 1.5*diamMagMult, l=h, texture="diamonds", tex_size=[3,3], tex_style="concave", anchor=BOT);
} else if (texture == "ribbed") { } else if (texture == "ribbed") {
textured_cylinder(d=w + 1.5*diamMagMult, l=h, texture="ribs", tex_size=[3,3], style="min_edge", anchor=BOT); cyl(d=w + 1.5*diamMagMult, l=h, texture="ribs", tex_size=[3,3], tex_style="min_edge", anchor=BOT);
} else { } else {
cyl(d = w, l = h, anchor = BOTTOM); cyl(d = w, l = h, anchor = BOTTOM);
} }

View file

@ -1266,7 +1266,7 @@ function cylinder(h, r1, r2, center, l, r, d, d1, d2, anchor, spin=0, orient=UP)
// Example: Texturing with VNF tile "vnf_dots" // Example: Texturing with VNF tile "vnf_dots"
// cyl(h=40, r1=20, r2=15, rounding=9, // cyl(h=40, r1=20, r2=15, rounding=9,
// texture="vnf_dots", tex_size=[5,5], // texture="vnf_dots", tex_size=[5,5],
// samples=6); // tex_samples=6);
// //
// Example: Texturing with VNF tile "vnf_bricks" // Example: Texturing with VNF tile "vnf_bricks"
// cyl(h=50, r1=25, r2=20, shift=[0,10], rounding1=-10, // cyl(h=50, r1=25, r2=20, shift=[0,10], rounding1=-10,
@ -1279,12 +1279,12 @@ function cylinder(h, r1, r2, center, l, r, d, d1, d2, anchor, spin=0, orient=UP)
// //
// Example: Taper Texure at Extreme Ends // Example: Taper Texure at Extreme Ends
// cyl(d1=25, d2=20, h=30, rounding=5, // cyl(d1=25, d2=20, h=30, rounding=5,
// texture="trunc_ribs", taper=0, // texture="trunc_ribs", tex_taper=0,
// tex_size=[5,1]); // tex_size=[5,1]);
// //
// Example: Taper Texture over First and Last 10% // Example: Taper Texture over First and Last 10%
// cyl(d1=25, d2=20, h=30, rounding=5, // cyl(d1=25, d2=20, h=30, rounding=5,
// texture="trunc_ribs", taper=10, // texture="trunc_ribs", tex_taper=10,
// tex_size=[5,1]); // tex_size=[5,1]);
function cyl( function cyl(
@ -3072,7 +3072,7 @@ module interior_fillet(l=1.0, r, ang=90, overlap=0.01, d, anchor=CENTER, spin=0,
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER`
// spin = Rotate this many degrees around the Z axis. See [spin](attachments.scad#subsection-spin). Default: `0` // spin = Rotate this many degrees around the Z axis. See [spin](attachments.scad#subsection-spin). Default: `0`
// orient = Vector to rotate top towards. See [orient](attachments.scad#subsection-orient). Default: `UP` // orient = Vector to rotate top towards. See [orient](attachments.scad#subsection-orient). Default: `UP`
// See Also: heightfield(), cylindrical_heightfield(), textured_revolution(), textured_cylinder(), textured_linear_sweep() // See Also: heightfield(), cylindrical_heightfield()
// Example: // Example:
// heightfield(size=[100,100], bottom=-20, data=[ // heightfield(size=[100,100], bottom=-20, data=[
// for (y=[-180:4:180]) [ // for (y=[-180:4:180]) [
@ -3210,7 +3210,7 @@ function heightfield(data, size=[100,100], bottom=-20, maxz=100, xrange=[-1:0.04
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER`
// spin = Rotate this many degrees around the Z axis. See [spin](attachments.scad#subsection-spin). Default: `0` // spin = Rotate this many degrees around the Z axis. See [spin](attachments.scad#subsection-spin). Default: `0`
// orient = Vector to rotate top towards. See [orient](attachments.scad#subsection-orient). Default: `UP` // orient = Vector to rotate top towards. See [orient](attachments.scad#subsection-orient). Default: `UP`
// See Also: heightfield(), cylindrical_heightfield(), textured_revolution(), textured_cylinder(), textured_linear_sweep() // See Also: heightfield(), cylindrical_heightfield()
// Example(VPD=400;VPR=[55,0,150]): // Example(VPD=400;VPR=[55,0,150]):
// cylindrical_heightfield(l=100, r=30, base=5, data=[ // cylindrical_heightfield(l=100, r=30, base=5, data=[
// for (y=[-180:4:180]) [ // for (y=[-180:4:180]) [

View file

@ -876,7 +876,7 @@ function rotate_sweep(
) )
assert(min_x>=0, "Input region must exist entirely in the X+ half-plane.") assert(min_x>=0, "Input region must exist entirely in the X+ half-plane.")
!is_undef(texture)? _textured_revolution( !is_undef(texture)? _textured_revolution(
region, shape,
texture=texture, texture=texture,
tex_size=tex_size, tex_size=tex_size,
counts=tex_counts, counts=tex_counts,
@ -935,7 +935,7 @@ module rotate_sweep(
steps = segs(max_x); steps = segs(max_x);
if (!is_undef(texture)) { if (!is_undef(texture)) {
_textured_revolution( _textured_revolution(
region, shape,
texture=texture, texture=texture,
tex_size=tex_size, tex_size=tex_size,
counts=tex_counts, counts=tex_counts,