diff --git a/src/archimedean_spiral_extrude.scad b/src/archimedean_spiral_extrude.scad index a229786a..f4e602e4 100644 --- a/src/archimedean_spiral_extrude.scad +++ b/src/archimedean_spiral_extrude.scad @@ -10,7 +10,7 @@ use ; use ; -use ; +use ; module archimedean_spiral_extrude(shape_pts, arm_distance, init_angle, point_distance, num_of_points, rt_dir = "CT_CLK", twist = 0, scale = 1.0, triangles = "SOLID") { @@ -32,7 +32,7 @@ module archimedean_spiral_extrude(shape_pts, arm_distance, init_angle, point_dis sections = cross_sections(shape_pts, points, angles, twist, scale); - polysections( + sweep( sections, triangles = triangles ); diff --git a/src/experimental/todo.txt b/src/experimental/todo.txt index b5a52e38..07cf02b2 100644 --- a/src/experimental/todo.txt +++ b/src/experimental/todo.txt @@ -2,4 +2,8 @@ - deprecate trianglate, use tri_ear_clipping. - sort supports a list of ints? - dedup px_xxx? -- px_union, px_intersection, px_difference? \ No newline at end of file +- px_union, px_intersection, px_difference? + +Preview + +- sweep \ No newline at end of file diff --git a/src/golden_spiral_extrude.scad b/src/golden_spiral_extrude.scad index 07265cfc..046cb2fe 100644 --- a/src/golden_spiral_extrude.scad +++ b/src/golden_spiral_extrude.scad @@ -10,7 +10,7 @@ use ; use ; -use ; +use ; module golden_spiral_extrude(shape_pts, from, to, point_distance, rt_dir = "CT_CLK", twist = 0, scale = 1.0, triangles = "SOLID") { @@ -37,7 +37,7 @@ module golden_spiral_extrude(shape_pts, from, to, point_distance, scale = scale ); - polysections( + sweep( sections, triangles = triangles ); diff --git a/src/helix_extrude.scad b/src/helix_extrude.scad index f5a61f41..19049802 100644 --- a/src/helix_extrude.scad +++ b/src/helix_extrude.scad @@ -11,7 +11,7 @@ use <__comm__/__frags.scad>; use ; use ; -use ; +use ; module helix_extrude(shape_pts, radius, levels, level_dist, vt_dir = "SPI_DOWN", rt_dir = "CT_CLK", @@ -47,7 +47,7 @@ module helix_extrude(shape_pts, radius, levels, level_dist, sections = cross_sections(shape_pts, path_points, angles, twist, scale); - polysections( + sweep( sections, triangles = triangles ); diff --git a/src/path_extrude.scad b/src/path_extrude.scad index 3f839871..57f27d8d 100644 --- a/src/path_extrude.scad +++ b/src/path_extrude.scad @@ -11,7 +11,7 @@ use <__comm__/__to3d.scad>; use <__comm__/__angy_angz.scad>; use ; -use ; +use ; use ; module path_extrude(shape_pts, path_pts, triangles = "SOLID", twist = 0, scale = 1.0, closed = false, method = "AXIS_ANGLE") { @@ -145,7 +145,7 @@ module path_extrude(shape_pts, path_pts, triangles = "SOLID", twist = 0, scale = concat(sections, [sections[0]]) : // round-robin sections; - polysections( + sweep( calculated_sections, triangles = triangles ); @@ -192,7 +192,7 @@ module path_extrude(shape_pts, path_pts, triangles = "SOLID", twist = 0, scale = concat(path_extrude_inner, [path_extrude_inner[0]]) : // round-robin concat([section(pth_pts[0], pth_pts[1], 0)], path_extrude_inner); - polysections( + sweep( calculated_sections, triangles = triangles ); diff --git a/src/ring_extrude.scad b/src/ring_extrude.scad index b49de8d5..3e75b23e 100644 --- a/src/ring_extrude.scad +++ b/src/ring_extrude.scad @@ -11,7 +11,7 @@ use <__comm__/__frags.scad>; use <__comm__/__ra_to_xy.scad>; use ; -use ; +use ; module ring_extrude(shape_pts, radius, angle = 360, twist = 0, scale = 1.0, triangles = "SOLID") { if(twist == 0 && scale == 1.0) { @@ -52,7 +52,7 @@ module ring_extrude(shape_pts, radius, angle = 360, twist = 0, scale = 1.0, tria sections = cross_sections(shape_pts, all_points, all_angles, twist, scale); - polysections( + sweep( sections, triangles = triangles ); diff --git a/src/sphere_spiral_extrude.scad b/src/sphere_spiral_extrude.scad index 12e0e428..08346a46 100644 --- a/src/sphere_spiral_extrude.scad +++ b/src/sphere_spiral_extrude.scad @@ -10,7 +10,7 @@ use ; use ; -use ; +use ; module sphere_spiral_extrude(shape_pts, radius, za_step, z_circles = 1, begin_angle = 0, end_angle = 0, vt_dir = "SPI_DOWN", rt_dir = "CT_CLK", @@ -36,7 +36,7 @@ module sphere_spiral_extrude(shape_pts, radius, za_step, shape_pts, points, angles, twist = twist, scale = scale ); - polysections( + sweep( sections, triangles = triangles ); diff --git a/src/experimental/sweep.scad b/src/sweep.scad similarity index 94% rename from src/experimental/sweep.scad rename to src/sweep.scad index bd92c979..5fdcfa5c 100644 --- a/src/experimental/sweep.scad +++ b/src/sweep.scad @@ -1,7 +1,3 @@ -/** - copy from polysections. sweep will replace polysections. -**/ - use ; module sweep(sections, triangles = "SOLID") { @@ -81,7 +77,7 @@ module sweep(sections, triangles = "SOLID") { ); // hook for testing - test_polysections_solid(v_pts, f_idxes, triangles); + test_sweep_solid(v_pts, f_idxes, triangles); } else { range_i = [0:leng_pts_sect - 1]; first_idxes = [for(i = range_i) leng_pts_sect - 1 - i]; @@ -98,7 +94,7 @@ module sweep(sections, triangles = "SOLID") { ); // hook for testing - test_polysections_solid(v_pts, f_idxes, triangles); + test_sweep_solid(v_pts, f_idxes, triangles); } } @@ -176,7 +172,7 @@ module sweep(sections, triangles = "SOLID") { ); // hook for testing - test_polysections_solid(v_pts, f_idxes, triangles); + test_sweep_solid(v_pts, f_idxes, triangles); } else { first_idxes = first_idxes(); last_idxes = last_idxes(half_leng_v_pts - half_leng_sect); @@ -189,7 +185,7 @@ module sweep(sections, triangles = "SOLID") { ); // hook for testing - test_polysections_solid(v_pts, f_idxes, triangles); + test_sweep_solid(v_pts, f_idxes, triangles); } } @@ -243,6 +239,6 @@ module sweep(sections, triangles = "SOLID") { // override it to test -module test_polysections_solid(points, faces, triangles) { +module test_sweep_solid(points, faces, triangles) { } \ No newline at end of file