mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-03-14 02:59:42 +01:00
change polysections to sweep
This commit is contained in:
parent
8c95e91e78
commit
9cdf6985c6
@ -10,7 +10,7 @@
|
||||
|
||||
use <archimedean_spiral.scad>;
|
||||
use <cross_sections.scad>;
|
||||
use <polysections.scad>;
|
||||
use <sweep.scad>;
|
||||
|
||||
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
|
||||
);
|
||||
|
@ -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?
|
||||
- px_union, px_intersection, px_difference?
|
||||
|
||||
Preview
|
||||
|
||||
- sweep
|
@ -10,7 +10,7 @@
|
||||
|
||||
use <golden_spiral.scad>;
|
||||
use <cross_sections.scad>;
|
||||
use <polysections.scad>;
|
||||
use <sweep.scad>;
|
||||
|
||||
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
|
||||
);
|
||||
|
@ -11,7 +11,7 @@
|
||||
use <__comm__/__frags.scad>;
|
||||
use <helix.scad>;
|
||||
use <cross_sections.scad>;
|
||||
use <polysections.scad>;
|
||||
use <sweep.scad>;
|
||||
|
||||
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
|
||||
);
|
||||
|
@ -11,7 +11,7 @@
|
||||
use <__comm__/__to3d.scad>;
|
||||
use <__comm__/__angy_angz.scad>;
|
||||
use <rotate_p.scad>;
|
||||
use <polysections.scad>;
|
||||
use <sweep.scad>;
|
||||
use <matrix/m_rotation.scad>;
|
||||
|
||||
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
|
||||
);
|
||||
|
@ -11,7 +11,7 @@
|
||||
use <__comm__/__frags.scad>;
|
||||
use <__comm__/__ra_to_xy.scad>;
|
||||
use <cross_sections.scad>;
|
||||
use <polysections.scad>;
|
||||
use <sweep.scad>;
|
||||
|
||||
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
|
||||
);
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
use <cross_sections.scad>;
|
||||
use <sphere_spiral.scad>;
|
||||
use <polysections.scad>;
|
||||
use <sweep.scad>;
|
||||
|
||||
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
|
||||
);
|
||||
|
@ -1,7 +1,3 @@
|
||||
/**
|
||||
copy from polysections. sweep will replace polysections.
|
||||
**/
|
||||
|
||||
use <util/reverse.scad>;
|
||||
|
||||
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) {
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user