mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-14 02:34:12 +02:00
refactor
This commit is contained in:
@@ -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,
|
||||||
|
Reference in New Issue
Block a user