From 6725f7311b968931c8a43cdf06f07a0410458e14 Mon Sep 17 00:00:00 2001 From: Adrian Mariano Date: Sat, 27 Jan 2024 22:25:25 -0500 Subject: [PATCH] only $fn affects texture, not $fa or $fs --- skin.scad | 10 +++++----- vnf.scad | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/skin.scad b/skin.scad index 9f6a7f2..cb08842 100644 --- a/skin.scad +++ b/skin.scad @@ -2969,7 +2969,7 @@ function associate_vertices(polygons, split, curpoly=0) = // rect(30), texture=tex, h=30, // tex_size=[10,10] // ); -// Example(3D): **"cones"** (VNF) = Raised conical spikes. Specify `$fn` to set the number of segments on the cone (will be rounded to a multiple of 4). If you use $fa and $fs then the number of segments is determined for the original VNF scale of 1x1. Giving `border=` specifies the horizontal border width between the edge of the tile and the base of the cone. The `border` value must be nonnegative and smaller than 0.5. Default: 0. +// Example(3D): **"cones"** (VNF) = Raised conical spikes. Specify `$fn` to set the number of segments on the cone (will be rounded to a multiple of 4). The default is `$fn=16`. Note that `$fa` and `$fs` are ignored, since the scale of the texture is unknown at the time of definition. Giving `border=` specifies the horizontal border width between the edge of the tile and the base of the cone. The `border` value must be nonnegative and smaller than 0.5. Default: 0. // tex = texture("cones", $fn=16); // linear_sweep( // rect(30), texture=tex, h=30, tex_depth=3, @@ -3011,13 +3011,13 @@ function associate_vertices(polygons, split, curpoly=0) = // rect(30), texture=tex, h=30, // tex_size=[10,10] // ); -// Example(3D): **"dimples"** (VNF) = Round divots. Specify `$fn` to set the number of segments on the cone (will be rounded to a multiple of 4). If you use $fa and $fs then the number of segments is determined for the original VNF scale of 1x1. Giving `border=` specifies the horizontal width of the flat border region between the tile edges and the edge of the dimple. Must be nonnegative and strictly less than 0.5. Default: 0.05. +// Example(3D): **"dimples"** (VNF) = Round divots. Specify `$fn` to set the number of segments on the dimples (will be rounded to a multiple of 4). The default is `$fn=16`. Note that `$fa` and `$fs` are ignored, since the scale of the texture is unknown at the time of definition. Giving `border=` specifies the horizontal width of the flat border region between the tile edges and the edge of the dimple. Must be nonnegative and strictly less than 0.5. Default: 0.05. // tex = texture("dimples", $fn=16); // linear_sweep( // rect(30), texture=tex, h=30, // tex_size=[10,10] // ); -// Example(3D): **"dots"** (VNF) = Raised round bumps. Specify `$fn` to set the number of segments on the cone (will be rounded to a multiple of 4). If you use $fa and $fs then the number of segments is determined for the original VNF scale of 1x1. Giving `border=` specifies the horizontal width of the flat border region between the tile edge and the edge of the dots. Must be nonnegative and strictly less than 0.5. Default: 0.05. +// Example(3D): **"dots"** (VNF) = Raised round bumps. Specify `$fn` to set the number of segments on the dots (will be rounded to a multiple of 4). The default is `$fn=16`. Note that `$fa` and `$fs` are ignored, since the scale of the texture is unknown at the time of definition. Giving `border=` specifies the horizontal width of the flat border region between the tile edge and the edge of the dots. Must be nonnegative and strictly less than 0.5. Default: 0.05. // tex = texture("dots", $fn=16); // linear_sweep( // rect(30), texture=tex, h=30, @@ -3374,7 +3374,7 @@ function texture(tex, n, border, gap, roughness, inset) = assert(num_defined([gap,roughness])==0, "cones texture does not accept gap or roughness") let( border = default(border,0), - n = quant(segs(1/2-border),4) + n = $fn > 0 ? quantup($fn,4) : _tex_fn_default() ) assert(border>=0 && border<0.5) [ @@ -3429,7 +3429,7 @@ function texture(tex, n, border, gap, roughness, inset) = assert(num_defined([gap,roughness])==0, str(tex," texture does not accept gap or roughness")) let( border = default(border,0.05), - n = quant(segs(1/2-border),4) + n = $fn > 0 ? quantup($fn,4) : _tex_fn_default() ) assert(border>=0 && border < 0.5) let( diff --git a/vnf.scad b/vnf.scad index 9dcbcb0..5ede45e 100644 --- a/vnf.scad +++ b/vnf.scad @@ -906,7 +906,6 @@ function _vnf_sort_vertices(vnf, idx=[2,1,0]) = ) sorted_vnf; - // Function: vnf_slice() // Synopsis: Slice the faces of a VNF along an axis. // SynTags: VNF