From cb1ffdfac4d388c87323612b617bae47f5038089 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Thu, 18 Feb 2021 10:45:44 +0800 Subject: [PATCH] change param name --- examples/hollow_out/hollow_out_cylinder.scad | 4 +-- examples/hollow_out/hollow_out_holder.scad | 10 +++--- examples/hollow_out/hollow_out_starburst.scad | 10 +++--- examples/hollow_out/hollow_out_torus.scad | 4 +-- examples/hollow_out/hollow_out_vase.scad | 18 +++++----- examples/maze/mobius_maze.scad | 4 +-- examples/maze/torus_maze.scad | 4 +-- examples/maze/twisted_maze.scad | 4 +-- examples/sierpinski_pyramid.scad | 22 ++++++------ examples/square_pursuit_3d.scad | 16 ++++----- examples/string_tetrahedron.scad | 26 +++++++------- examples/string_tetrahedrons.scad | 36 +++++++++---------- examples/tiled_line_mobius.scad | 10 +++--- examples/tiled_line_torus.scad | 10 +++--- examples/turtle/hilbert_curve_drawing.scad | 4 +-- examples/turtle/hilbert_dragon.scad | 1 - examples/turtle/lsystem3_collection.scad | 2 +- examples/voronoi/voronoi_torus.scad | 2 +- test/test_hull_polyline3d.scad | 8 ++--- 19 files changed, 97 insertions(+), 98 deletions(-) diff --git a/examples/hollow_out/hollow_out_cylinder.scad b/examples/hollow_out/hollow_out_cylinder.scad index 87c5d727..6a9afa9d 100644 --- a/examples/hollow_out/hollow_out_cylinder.scad +++ b/examples/hollow_out/hollow_out_cylinder.scad @@ -5,7 +5,7 @@ use ; size = [100, 40]; pt_nums = 20; -thickness = 1; +line_diameter = 1; radius = 15; fn = 12; @@ -35,7 +35,7 @@ for(line = bisectors) { pts = [for(p = line) ptf_bend(size, p, radius, 360)]; hull_polyline3d( concat(pts, [pts[0]]), - thickness = thickness, + line_diameter = line_diameter, $fn = 4 ); } \ No newline at end of file diff --git a/examples/hollow_out/hollow_out_holder.scad b/examples/hollow_out/hollow_out_holder.scad index 57e2201c..4db8301c 100644 --- a/examples/hollow_out/hollow_out_holder.scad +++ b/examples/hollow_out/hollow_out_holder.scad @@ -7,7 +7,7 @@ columns = 30; rows = 15; radius = 30; angle = 360; -thickness = 2; +diameter = 2; lines = concat( hollow_out_square([columns, rows], width), @@ -18,10 +18,10 @@ lines = concat( for(line = lines) { transformed = [for(pt = line) ptf_bend([columns * width, rows * width], pt, radius, angle)]; - hull_polyline3d(transformed, thickness, $fn = 4); + hull_polyline3d(transformed, diameter, $fn = 4); } -translate([0, 0, -thickness / 2]) -linear_extrude(thickness) +translate([0, 0, -diameter / 2]) +linear_extrude(diameter) rotate(180 / columns) - circle(radius + thickness / 2, $fn = columns); \ No newline at end of file + circle(radius + diameter / 2, $fn = columns); \ No newline at end of file diff --git a/examples/hollow_out/hollow_out_starburst.scad b/examples/hollow_out/hollow_out_starburst.scad index f423532f..14593ccb 100644 --- a/examples/hollow_out/hollow_out_starburst.scad +++ b/examples/hollow_out/hollow_out_starburst.scad @@ -6,10 +6,10 @@ r1 = 30; r2 = 12; h = 10; n = 5; -thickness = 1.75; +line_diameter = 1.75; half = true; -module hollow_out_starburst(r1, r2, h, n, thickness, half = false) { +module hollow_out_starburst(r1, r2, h, n, line_diameter, half = false) { star = [for(p = shape_starburst(r1, r2, n)) [p[0], p[1], 0]]; leng = len(star); tris = concat( @@ -19,9 +19,9 @@ module hollow_out_starburst(r1, r2, h, n, thickness, half = false) { module half_star() { for(tri = tris) { - hull_polyline3d(concat(tri, [tri[0]]), thickness = thickness); + hull_polyline3d(concat(tri, [tri[0]]), line_diameter = line_diameter); for(line = tri_bisectors(tri)) { - hull_polyline3d(concat(line, [line[0]]), thickness = thickness); + hull_polyline3d(concat(line, [line[0]]), line_diameter = line_diameter); } } } @@ -32,4 +32,4 @@ module hollow_out_starburst(r1, r2, h, n, thickness, half = false) { } } -hollow_out_starburst(r1, r2, h, n, thickness, half); \ No newline at end of file +hollow_out_starburst(r1, r2, h, n, line_diameter, half); \ No newline at end of file diff --git a/examples/hollow_out/hollow_out_torus.scad b/examples/hollow_out/hollow_out_torus.scad index 0400a759..21354ef4 100644 --- a/examples/hollow_out/hollow_out_torus.scad +++ b/examples/hollow_out/hollow_out_torus.scad @@ -6,14 +6,14 @@ width = 5; columns = 10; rows = 30; radius = 30; -thickness = 2; +line_diameter = 2; twist = 0; lines = hollow_out_square([columns, rows], width); for(line = lines) { transformed = [for(pt = line) ptf_torus([columns * width, rows * width], pt, [radius, radius / 2], twist = twist)]; - hull_polyline3d(transformed, thickness, $fn = 4); + hull_polyline3d(transformed, line_diameter, $fn = 4); } color("black") diff --git a/examples/hollow_out/hollow_out_vase.scad b/examples/hollow_out/hollow_out_vase.scad index 008816ee..1e8578bf 100644 --- a/examples/hollow_out/hollow_out_vase.scad +++ b/examples/hollow_out/hollow_out_vase.scad @@ -6,7 +6,7 @@ use ; use ; t_step = 0.1; -width = 3; +line_diameter = 3; fn = 18; line_style = "HULL_LINES"; // [LINES, HULL_LINES] @@ -16,9 +16,9 @@ p2 = [0, 0, 60]; p3 = [25, 0, 120]; p4 = [35, 0, 130]; -hollow_out_vase([p0, p1, p2, p3, p4], t_step, width, fn, line_style); +hollow_out_vase([p0, p1, p2, p3, p4], t_step, line_diameter, fn, line_style); -module hollow_out_vase(ctrl_pts, t_step, width, fn, line_style) { +module hollow_out_vase(ctrl_pts, t_step, line_diameter, fn, line_style) { bezier = bezier_curve(t_step, ctrl_pts ); @@ -32,7 +32,7 @@ module hollow_out_vase(ctrl_pts, t_step, width, fn, line_style) { ]); // body - hollow_out_sweep(sects, thickness = width, style = line_style, $fn = 4); + hollow_out_sweep(sects, diameter = line_diameter, style = line_style, $fn = 4); leng_sect = len(sects[0]); @@ -45,9 +45,9 @@ module hollow_out_vase(ctrl_pts, t_step, width, fn, line_style) { for(tri = fst_tris) { lines = tri_bisectors(tri); for(line = lines) { - hull_polyline3d(line, thickness = width, $fn = 4); + hull_polyline3d(line, diameter = line_diameter, $fn = 4); } - hull_polyline3d([lines[2][1], [0, 0, 0]], thickness = width, $fn = 4); + hull_polyline3d([lines[2][1], [0, 0, 0]], diameter = line_diameter, $fn = 4); } // mouth @@ -57,9 +57,9 @@ module hollow_out_vase(ctrl_pts, t_step, width, fn, line_style) { [[[0, 0, fpt[2]], lst_sect[leng_sect - 1], lst_sect[0]]] ); dangling_pts = [for(tri = lst_tris) tri_bisectors(tri)[1][1]]; - offset_z = [0, 0, width]; + offset_z = [0, 0, line_diameter]; for(i = [0: leng_sect - 1]) { - hull_polyline3d([lst_sect[i] + offset_z, dangling_pts[i]], thickness = width, $fn = 4); - hull_polyline3d([lst_sect[(i + 1) % leng_sect] + offset_z, dangling_pts[i]], thickness = width, $fn = 4); + hull_polyline3d([lst_sect[i] + offset_z, dangling_pts[i]], diameter = line_diameter, $fn = 4); + hull_polyline3d([lst_sect[(i + 1) % leng_sect] + offset_z, dangling_pts[i]], diameter = line_diameter, $fn = 4); } } \ No newline at end of file diff --git a/examples/maze/mobius_maze.scad b/examples/maze/mobius_maze.scad index 9c456979..965ad102 100644 --- a/examples/maze/mobius_maze.scad +++ b/examples/maze/mobius_maze.scad @@ -6,7 +6,7 @@ use ; rows = 48; columns = 8; cell_width = 2; -wall_thickness = 1; +line_diameter = 1; angle = 180; // $fn = 24; @@ -24,5 +24,5 @@ walls = mz_square_walls(cells, rows, columns, cell_width, bottom_border = false) size = [columns * cell_width, rows * cell_width]; for(wall_pts = walls) { transformed = [for(pt = wall_pts) ptf_ring(size, pt, radius, 360, angle)]; - hull_polyline3d(transformed, wall_thickness); + hull_polyline3d(transformed, line_diameter); } \ No newline at end of file diff --git a/examples/maze/torus_maze.scad b/examples/maze/torus_maze.scad index 55130c0d..ea8176d5 100644 --- a/examples/maze/torus_maze.scad +++ b/examples/maze/torus_maze.scad @@ -6,7 +6,7 @@ use ; rows = 36; columns = 12; cell_width = 2; -wall_thickness = 1; +line_diameter = 1; angle = 180; twist = 360; @@ -24,7 +24,7 @@ walls = mz_square_walls(cells, rows, columns, cell_width, left_border = false, b size = [columns * cell_width, rows * cell_width]; for(wall_pts = walls) { transformed = [for(pt = wall_pts) ptf_torus(size, pt, [radius, radius / 2], twist = twist)]; - hull_polyline3d(transformed, wall_thickness, $fn = 4); + hull_polyline3d(transformed, line_diameter, $fn = 4); } color("black") diff --git a/examples/maze/twisted_maze.scad b/examples/maze/twisted_maze.scad index e95ebf40..8098510d 100644 --- a/examples/maze/twisted_maze.scad +++ b/examples/maze/twisted_maze.scad @@ -7,7 +7,7 @@ use ; rows = 10; columns = 10; cell_width = 4; -wall_thickness = 1; +line_diameter = 1; angle = 90; axis = "X_AXIS"; // [X_AXIS, Y_AXIS] // $fn = 24; @@ -21,5 +21,5 @@ walls = mz_square_walls(cells, rows, columns, cell_width); size = [columns * cell_width, rows * cell_width]; for(wall_pts = walls) { transformed = [for(pt = wall_pts) axis == "X_AXIS" ? ptf_x_twist(size, pt, angle) : ptf_y_twist(size, pt, angle)]; - hull_polyline3d(transformed, wall_thickness); + hull_polyline3d(transformed, line_diameter); } \ No newline at end of file diff --git a/examples/sierpinski_pyramid.scad b/examples/sierpinski_pyramid.scad index 009372b4..4d9dd3c8 100644 --- a/examples/sierpinski_pyramid.scad +++ b/examples/sierpinski_pyramid.scad @@ -2,12 +2,12 @@ use ; side_leng = 100; min_leng = 5; -thickness = 2.5; +diameter = 2.5; -sierpinski_pyramid(side_leng, min_leng, thickness, $fn = 4); +sierpinski_pyramid(side_leng, min_leng, diameter, $fn = 4); -module sierpinski_pyramid(side_leng, min_leng, thickness) { - pyramid_frame(side_leng, thickness); +module sierpinski_pyramid(side_leng, min_leng, diameter) { + pyramid_frame(side_leng, diameter); if(side_leng > min_leng){ half_leng = side_leng / 2; h = half_leng * 0.707107; @@ -15,25 +15,25 @@ module sierpinski_pyramid(side_leng, min_leng, thickness) { for(i=[0:3]) { rotate([0, 0, i * 90]) translate(pt) - sierpinski_pyramid(half_leng, min_leng, thickness); + sierpinski_pyramid(half_leng, min_leng, diameter); } translate([0, 0, h]) - sierpinski_pyramid(half_leng, min_leng, thickness); + sierpinski_pyramid(half_leng, min_leng, diameter); } } -module pyramid_frame(side_leng, thickness) { +module pyramid_frame(side_leng, diameter) { half_leng = side_leng / 2; h = half_leng * 1.414214; tri_pts = [[0, 0, h], [half_leng, half_leng, 0], [half_leng, -half_leng, 0], [0, 0, h]]; line_pts = [[half_leng, half_leng, 0], [-half_leng, half_leng, 0]]; - hull_polyline3d(tri_pts, thickness); + hull_polyline3d(tri_pts, diameter); mirror([1, 0, 0]) - hull_polyline3d(tri_pts, thickness); + hull_polyline3d(tri_pts, diameter); - hull_polyline3d(line_pts, thickness); + hull_polyline3d(line_pts, diameter); mirror([0, 1, 0]) - hull_polyline3d(line_pts, thickness); + hull_polyline3d(line_pts, diameter); } \ No newline at end of file diff --git a/examples/square_pursuit_3d.scad b/examples/square_pursuit_3d.scad index d5e3aa7f..546788bc 100644 --- a/examples/square_pursuit_3d.scad +++ b/examples/square_pursuit_3d.scad @@ -2,11 +2,11 @@ use ; length = 100; diff_scale = 0.125; -thickness = 2; +diameter = 2; n = 30; $fn = 6; -module square_pursuit_3d(length, diff_scale, thickness, n) { +module square_pursuit_3d(length, diff_scale, diameter, n) { function inter_p(p1, p2, leng, d) = let( vp = p2 - p1, @@ -14,7 +14,7 @@ module square_pursuit_3d(length, diff_scale, thickness, n) { ) p1 + u * d; - module _square_pursuit_3d(pts, diff_scale, thickness, n) { + module _square_pursuit_3d(pts, diff_scale, diameter, n) { if(n != 0) { vp = pts[1] - pts[0]; leng = norm(vp); @@ -22,9 +22,9 @@ module square_pursuit_3d(length, diff_scale, thickness, n) { npts = [for(i = [0:3]) inter_p(pts[i], pts[(i + 1) % 4], leng, d)]; - hull_polyline3d(concat(npts, [npts[3], npts[0]]), thickness); + hull_polyline3d(concat(npts, [npts[3], npts[0]]), diameter); - _square_pursuit_3d(npts, diff_scale, thickness, n - 1); + _square_pursuit_3d(npts, diff_scale, diameter, n - 1); } } @@ -36,9 +36,9 @@ module square_pursuit_3d(length, diff_scale, thickness, n) { [0, length, 0] ]; - hull_polyline3d(concat(pts, [pts[3], pts[0]]), thickness); + hull_polyline3d(concat(pts, [pts[3], pts[0]]), diameter); - _square_pursuit_3d(pts, diff_scale, thickness, n - 1); + _square_pursuit_3d(pts, diff_scale, diameter, n - 1); } -square_pursuit_3d(length, diff_scale, thickness, n); \ No newline at end of file +square_pursuit_3d(length, diff_scale, diameter, n); \ No newline at end of file diff --git a/examples/string_tetrahedron.scad b/examples/string_tetrahedron.scad index 8f1c1ba0..d7108b8c 100644 --- a/examples/string_tetrahedron.scad +++ b/examples/string_tetrahedron.scad @@ -1,14 +1,14 @@ use ; leng = 50; -thickness = 5; +diameter = 5; segs_per_side = 20; line_fn = 5; model = "Tetrahedron"; // [Tetrahedron, Base, Both] -module string_tetrahedron(leng, thickness, segs_per_side, line_fn) { - module lines_between(side1, side2, thickness, segs) { +module string_tetrahedron(leng, diameter, segs_per_side, line_fn) { + module lines_between(side1, side2, diameter, segs) { function pts(p1, p2, segs) = let( p = p2 - p1, @@ -21,7 +21,7 @@ module string_tetrahedron(leng, thickness, segs_per_side, line_fn) { pts2 = pts(side2[0], side2[1], segs); for(i = [0:len(pts1) - 1]) { - hull_polyline3d(points = [pts1[i], pts2[i]], thickness = thickness); + hull_polyline3d(points = [pts1[i], pts2[i]], diameter = diameter); } } @@ -49,15 +49,15 @@ module string_tetrahedron(leng, thickness, segs_per_side, line_fn) { vt3 = vts[2]; vt4 = vts[3]; - lines_between([vt1, vt2], [vt3, vt4], thickness, segs_per_side); - lines_between([vt2, vt3], [vt1, vt4], thickness, segs_per_side); - lines_between([vt3, vt1], [vt2, vt4], thickness, segs_per_side); + lines_between([vt1, vt2], [vt3, vt4], diameter, segs_per_side); + lines_between([vt2, vt3], [vt1, vt4], diameter, segs_per_side); + lines_between([vt3, vt1], [vt2, vt4], diameter, segs_per_side); } -module base(leng, thickness, line_fn) { +module base(leng, diameter, line_fn) { vts = vts(leng); r = leng / 4; - half_th = thickness / 2; + half_th = diameter / 2; difference() { sphere(r, $fn = 48); @@ -83,15 +83,15 @@ module base(leng, thickness, line_fn) { } if(model == "Tetrahedron") { - string_tetrahedron(leng, thickness, segs_per_side, line_fn); + string_tetrahedron(leng, diameter, segs_per_side, line_fn); } else if(model == "Base") { - base(leng, thickness, line_fn); + base(leng, diameter, line_fn); } else { translate([0, 0, height(leng) + half_th]) rotate([0, 180, 0]) translate([0, -leng / 2 * tan(30), 0]) - string_tetrahedron(leng, thickness, segs_per_side, line_fn); + string_tetrahedron(leng, diameter, segs_per_side, line_fn); - base(leng, thickness, line_fn); + base(leng, diameter, line_fn); } diff --git a/examples/string_tetrahedrons.scad b/examples/string_tetrahedrons.scad index ed41f06c..d1f34263 100644 --- a/examples/string_tetrahedrons.scad +++ b/examples/string_tetrahedrons.scad @@ -2,12 +2,12 @@ use ; level = 1; leng = 50; -thickness = 5; +diameter = 5; segs_per_side = 10; center = false; -module string_tetrahedron(leng, thickness, segs_per_side, line_fn) { - module lines_between(side1, side2, thickness, segs) { +module string_tetrahedron(leng, diameter, segs_per_side, line_fn) { + module lines_between(side1, side2, diameter, segs) { function pts(p1, p2, segs) = let( p = p2 - p1, @@ -20,12 +20,12 @@ module string_tetrahedron(leng, thickness, segs_per_side, line_fn) { pts2 = pts(side2[0], side2[1], segs); leng = len(pts1); - hull_polyline3d(points = [pts1[0], pts2[0]], thickness = thickness); + hull_polyline3d(points = [pts1[0], pts2[0]], diameter = diameter); for(i = [1:leng - 2]) { - hull_polyline3d(points = [pts1[i], pts2[i]], thickness = thickness); + hull_polyline3d(points = [pts1[i], pts2[i]], diameter = diameter); } end = leng - 1; - hull_polyline3d(points = [pts1[end], pts2[end]], thickness = thickness); + hull_polyline3d(points = [pts1[end], pts2[end]], diameter = diameter); } function height(leng) = @@ -52,18 +52,18 @@ module string_tetrahedron(leng, thickness, segs_per_side, line_fn) { vt3 = vts[2]; vt4 = vts[3]; - lines_between([vt1, vt2], [vt3, vt4], thickness, segs_per_side); - lines_between([vt2, vt3], [vt1, vt4], thickness, segs_per_side); - lines_between([vt3, vt1], [vt2, vt4], thickness, segs_per_side); + lines_between([vt1, vt2], [vt3, vt4], diameter, segs_per_side); + lines_between([vt2, vt3], [vt1, vt4], diameter, segs_per_side); + lines_between([vt3, vt1], [vt2, vt4], diameter, segs_per_side); } -module string_tetrahedrons(level, leng, thickness, segs_per_side, center) { +module string_tetrahedrons(level, leng, diameter, segs_per_side, center) { function height(leng) = leng * sqrt(1 - 4 / 9 * pow(sin(60), 2)); if(level == 0) { - string_tetrahedron(leng * 2, thickness, segs_per_side, 6); + string_tetrahedron(leng * 2, diameter, segs_per_side, 6); } else { @@ -71,21 +71,21 @@ module string_tetrahedrons(level, leng, thickness, segs_per_side, center) { center_y = half_leng * tan(30); translate([0, center_y * 2]) - string_tetrahedrons(level - 1, half_leng, thickness, segs_per_side, center); + string_tetrahedrons(level - 1, half_leng, diameter, segs_per_side, center); translate([half_leng, -center_y]) - string_tetrahedrons(level - 1, half_leng, thickness, segs_per_side, center); + string_tetrahedrons(level - 1, half_leng, diameter, segs_per_side, center); translate([-half_leng, -center_y]) - string_tetrahedrons(level - 1, half_leng, thickness, segs_per_side, center); + string_tetrahedrons(level - 1, half_leng, diameter, segs_per_side, center); translate([0, 0, height(leng)]) - string_tetrahedrons(level - 1, half_leng, thickness, segs_per_side, center); + string_tetrahedrons(level - 1, half_leng, diameter, segs_per_side, center); if(center) { rotate(60) - string_tetrahedrons(level - 1, half_leng, thickness, segs_per_side, center); + string_tetrahedrons(level - 1, half_leng, diameter, segs_per_side, center); a = atan(height(leng * 2) / (2 * center_y)); @@ -97,12 +97,12 @@ module string_tetrahedrons(level, leng, thickness, segs_per_side, center) { translate([0, center_y * 2]) rotate([180, 0, 0]) scale(0.9427) - string_tetrahedrons(level - 1, half_leng, thickness, segs_per_side, center); + string_tetrahedrons(level - 1, half_leng, diameter, segs_per_side, center); } } } } -string_tetrahedrons(level, leng, thickness, segs_per_side, center); +string_tetrahedrons(level, leng, diameter, segs_per_side, center); diff --git a/examples/tiled_line_mobius.scad b/examples/tiled_line_mobius.scad index 07a59996..ae4a4cd7 100644 --- a/examples/tiled_line_mobius.scad +++ b/examples/tiled_line_mobius.scad @@ -3,14 +3,14 @@ use ; use ; size = [20, 100]; -line_width = 1; +line_diameter = 1; step = 1; twist = 180; $fn = 8; -module tiled_line_mobius(size, twist, step, line_width = 1) { +module tiled_line_mobius(size, twist, step, line_diameter = 1) { sizexy = is_num(size) ? [size, size] : size; - s = is_undef(step) ? line_width * 2 : step; + s = is_undef(step) ? line_diameter * 2 : step; function rand_diagonal_line_pts(x, y, size) = rand(0, 1) >= 0.5 ? [[x, y], [x + size, y + size]] : [[x + size, y], [x, y + size]]; @@ -33,8 +33,8 @@ module tiled_line_mobius(size, twist, step, line_width = 1) { for(line = lines) { pts = [for(p = line) ptf_ring(size, p, size[0], twist = twist)]; - hull_polyline3d(pts, thickness = line_width); + hull_polyline3d(pts, diameter = line_diameter); } } -tiled_line_mobius(size, twist, step, line_width); +tiled_line_mobius(size, twist, step, line_diameter); diff --git a/examples/tiled_line_torus.scad b/examples/tiled_line_torus.scad index 96cf6f71..e2d717d1 100644 --- a/examples/tiled_line_torus.scad +++ b/examples/tiled_line_torus.scad @@ -3,14 +3,14 @@ use ; use ; size = [20, 50]; -line_width = 1; +line_diameter = 1; step = 1; twist = 180; $fn = 4; -module tiled_line_torus(size, twist, step, line_width = 1) { +module tiled_line_torus(size, twist, step, line_diameter = 1) { sizexy = is_num(size) ? [size, size] : size; - s = is_undef(step) ? line_width * 2 : step; + s = is_undef(step) ? line_diameter * 2 : step; function rand_diagonal_line_pts(x, y, size) = rand(0, 1) >= 0.5 ? [[x, y], [x + size, y + size]] : [[x + size, y], [x, y + size]]; @@ -25,11 +25,11 @@ module tiled_line_torus(size, twist, step, line_width = 1) { for(line = lines) { pts = [for(p = line) ptf_torus(size, p, [size[0], size[0] / 2], twist = twist)]; - hull_polyline3d(pts, thickness = line_width); + hull_polyline3d(pts, diameter = line_diameter); } } -tiled_line_torus(size, twist, step, line_width); +tiled_line_torus(size, twist, step, line_diameter); color("black") rotate_extrude($fn = 36) translate([size[0] * 1.5, 0, 0]) diff --git a/examples/turtle/hilbert_curve_drawing.scad b/examples/turtle/hilbert_curve_drawing.scad index 7a0b5e4e..85063a58 100644 --- a/examples/turtle/hilbert_curve_drawing.scad +++ b/examples/turtle/hilbert_curve_drawing.scad @@ -3,7 +3,7 @@ use ; use ; use ; -thickness = 0.3; +diameter = 0.3; corner_r = 0.5; lines = hilbert_curve(); @@ -14,7 +14,7 @@ hilbert_path = dedup( ); smoothed_hilbert_path = bezier_smooth(hilbert_path, corner_r); -hull_polyline3d(smoothed_hilbert_path, thickness = thickness); +hull_polyline3d(smoothed_hilbert_path, diameter = diameter); function hilbert_curve() = let( diff --git a/examples/turtle/hilbert_dragon.scad b/examples/turtle/hilbert_dragon.scad index bfe09a07..31cfd84a 100644 --- a/examples/turtle/hilbert_dragon.scad +++ b/examples/turtle/hilbert_dragon.scad @@ -1,6 +1,5 @@ use ; use ; -use ; use ; use ; use ; diff --git a/examples/turtle/lsystem3_collection.scad b/examples/turtle/lsystem3_collection.scad index d82842a1..11093f45 100644 --- a/examples/turtle/lsystem3_collection.scad +++ b/examples/turtle/lsystem3_collection.scad @@ -4,7 +4,7 @@ use ; for(line = hilbert_curve()) { hull_polyline3d( [line[0], line[1]], - thickness = 0.5, + diameter = 0.5, $fn = 4 ); } diff --git a/examples/voronoi/voronoi_torus.scad b/examples/voronoi/voronoi_torus.scad index fe1ee269..c0ee25b1 100644 --- a/examples/voronoi/voronoi_torus.scad +++ b/examples/voronoi/voronoi_torus.scad @@ -11,5 +11,5 @@ $fn = 4; for(cell = cells) { cell_poly = [for(p = cell[1]) ptf_torus(size, p, [10, 5], [360, 360])]; - hull_polyline3d(cell_poly, thickness = 1); + hull_polyline3d(cell_poly, diameter = 1); } \ No newline at end of file diff --git a/test/test_hull_polyline3d.scad b/test/test_hull_polyline3d.scad index 3ffeaf99..311df1d5 100644 --- a/test/test_hull_polyline3d.scad +++ b/test/test_hull_polyline3d.scad @@ -9,11 +9,11 @@ module test_hull_polyline3d_line_segment(index, point1, point2, radius) { [0, 0, 0] ]; - thickness = 1; + diameter = 1; assertEqualPoint(points[index - 1], point1); assertEqualPoint(points[index], point2); - assertEqualNum(thickness, radius * 2); + assertEqualNum(diameter, radius * 2); } module test_hull_polyline3d() { @@ -26,11 +26,11 @@ module test_hull_polyline3d() { [0, 0, 0] ]; - thickness = 1; + diameter = 1; hull_polyline3d( points = points, - thickness = thickness, + diameter = diameter, $fn = 3 ); }