diff --git a/examples/distorted_vase.scad b/examples/distorted_vase.scad index c1921f24..99ec40a8 100644 --- a/examples/distorted_vase.scad +++ b/examples/distorted_vase.scad @@ -1,7 +1,7 @@ use ; use ; use ; -use ; +use ; use ; use ; use ; @@ -36,7 +36,7 @@ module distorted_vase(beginning_radius, thickness, fn, amplitude,curve_step, smo ]); - sections = rail_extruded_sections(section, edge_path); + sections = path_scaling_sections(section, edge_path); noise = perlin == 2 ? function(pts, seed) nz_perlin2s(pts, seed) : function(pts, seed) nz_perlin3s(pts, seed); diff --git a/examples/dragon/spiral_dragon.scad b/examples/dragon/spiral_dragon.scad index 2bbf5682..e81db68a 100644 --- a/examples/dragon/spiral_dragon.scad +++ b/examples/dragon/spiral_dragon.scad @@ -5,7 +5,7 @@ use ; use ; use ; use ; -use ; +use ; use ; use ; use ; @@ -103,7 +103,7 @@ module flame_mountain(beginning_radius, fn, amplitude,curve_step, smoothness) { ]); - sections = rail_extruded_sections(section, edge_path); + sections = path_scaling_sections(section, edge_path); noise = function(pts, seed) nz_perlin2s(pts, seed); diff --git a/examples/superformula_vase.scad b/examples/superformula_vase.scad index 8402d55c..cf4373b3 100644 --- a/examples/superformula_vase.scad +++ b/examples/superformula_vase.scad @@ -1,6 +1,6 @@ use ; use ; -use ; +use ; use ; use ; use ; @@ -27,7 +27,7 @@ module superformula_vase(phi_step, m, n, n3, d, r1, r2, h1, h2, t_step, twist) { function cal_sections(shapt_pts, edge_path, twist) = let( - sects = rail_extruded_sections(shapt_pts, edge_path), + sects = path_scaling_sections(shapt_pts, edge_path), leng = len(sects), twist_step = twist / leng ) diff --git a/examples/taiwan/dancing_taiwan.scad b/examples/taiwan/dancing_taiwan.scad index c6948d09..61320cfc 100644 --- a/examples/taiwan/dancing_taiwan.scad +++ b/examples/taiwan/dancing_taiwan.scad @@ -1,7 +1,7 @@ use ; use ; use ; -use ; +use ; use ; use ; use ; @@ -19,7 +19,7 @@ module dancing_formosan(x1, x2, x3, y1, y2, y3, twist, t_step) { function cal_sections(shapt_pts, edge_path, twist) = let( - sects = rail_extruded_sections(shapt_pts, edge_path), + sects = path_scaling_sections(shapt_pts, edge_path), leng = len(sects), twist_step = twist / leng ) diff --git a/src/experimental/note.md b/src/experimental/note.md index 0d931c0c..50531141 100644 --- a/src/experimental/note.md +++ b/src/experimental/note.md @@ -1,7 +1,6 @@ to_do: - deprecate paths2sections(paths) -> rails2sections(rails) -- deprecate path_scaling_sections(shape_pts, edge_path) -> rail_extruded_sections(shape_pts, rail) - deprecate hull_polyline2d, hull_polyline3d -> polyline_join - deprecate shape_starburst, shape_pentagram -> shape_star - deprecate starburst -> polyhedra/star diff --git a/src/rail_extruded_sections.scad b/src/rail_extruded_sections.scad deleted file mode 100644 index 493484aa..00000000 --- a/src/rail_extruded_sections.scad +++ /dev/null @@ -1,32 +0,0 @@ -/** -* rail_extruded_sections.scad -* -* @copyright Justin Lin, 2019 -* @license https://opensource.org/licenses/lgpl-3.0.html -* -* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-rail_extruded_sections.html -* -**/ - -use ; -use ; - -function rail_extruded_sections(shape_pts, rail) = - let( - start_point = rail[0], - base_leng = norm(start_point), - scaling_matrice = [ - for(p = rail) - let(s = norm([p[0], p[1], 0]) / base_leng) - m_scaling([s, s, 1]) - ], - leng_rail = len(rail) - ) - reverse([ - for(i = 0; i < leng_rail; i = i + 1) - [ - for(p = shape_pts) - let(scaled_p = scaling_matrice[i] * [p[0], p[1], rail[i][2], 1]) - [scaled_p[0], scaled_p[1], scaled_p[2]] - ] - ]); \ No newline at end of file