1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-14 10:44:48 +02:00
This commit is contained in:
Justin Lin
2022-05-04 09:15:25 +08:00
parent a53c15bafe
commit ccf77872ed

View File

@@ -69,12 +69,12 @@ module sweep(sections, triangles = "SOLID") {
// hook for testing // hook for testing
test_sweep_solid(v_pts, f_idxes, triangles); test_sweep_solid(v_pts, f_idxes, triangles);
} else { } else {
first_idxes = [each [leng_pts_sect - 1:-1:0]];
from = leng_pts_sect * (leng_sects - 1); from = leng_pts_sect * (leng_sects - 1);
last_idxes = [each [from:from + leng_pts_sect - 1]]; f_idxes = [
[each [leng_pts_sect - 1:-1:0]],
f_idxes = [first_idxes, each side_indexes(sects), last_idxes]; each side_indexes(sects),
[each [from:from + leng_pts_sect - 1]]
];
polyhedron(v_pts, f_idxes); polyhedron(v_pts, f_idxes);
@@ -151,10 +151,12 @@ module sweep(sections, triangles = "SOLID") {
// hook for testing // hook for testing
test_sweep_solid(v_pts, f_idxes, triangles); test_sweep_solid(v_pts, f_idxes, triangles);
} else { } else {
first_idxes = first_idxes(); f_idxes = concat(
last_idxes = last_idxes(half_leng_v_pts - half_leng_sect); first_idxes(),
outer_idxes,
f_idxes = concat(first_idxes, outer_idxes, inner_idxes, last_idxes); inner_idxes,
last_idxes(half_leng_v_pts - half_leng_sect)
);
polyhedron( polyhedron(
v_pts, v_pts,