mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 09:14:29 +02:00
refactor
This commit is contained in:
@@ -101,17 +101,15 @@ module sweep(sections, triangles = "SOLID") {
|
|||||||
half_leng_v_pts = leng_sects * half_leng_sect;
|
half_leng_v_pts = leng_sects * half_leng_sect;
|
||||||
|
|
||||||
function strip_sects(begin_idx, end_idx) =
|
function strip_sects(begin_idx, end_idx) =
|
||||||
|
let(range = [begin_idx:end_idx])
|
||||||
[
|
[
|
||||||
for(i = 0; i < leng_sects; i = i + 1)
|
for(sect = sects) [for(j = range) sect[j]]
|
||||||
[
|
|
||||||
for(j = begin_idx; j <= end_idx; j = j + 1)
|
|
||||||
sects[i][j]
|
|
||||||
]
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
range = [0:half_leng_sect - 1];
|
||||||
function first_idxes() =
|
function first_idxes() =
|
||||||
[
|
[
|
||||||
for(i = 0; i < half_leng_sect; i = i + 1)
|
for(i = range)
|
||||||
[
|
[
|
||||||
i,
|
i,
|
||||||
i + half_leng_v_pts,
|
i + half_leng_v_pts,
|
||||||
@@ -122,7 +120,7 @@ module sweep(sections, triangles = "SOLID") {
|
|||||||
|
|
||||||
function last_idxes(begin_idx) =
|
function last_idxes(begin_idx) =
|
||||||
[
|
[
|
||||||
for(i = 0; i < half_leng_sect; i = i + 1)
|
for(i = range)
|
||||||
[
|
[
|
||||||
begin_idx + i,
|
begin_idx + i,
|
||||||
begin_idx + (i + 1) % half_leng_sect,
|
begin_idx + (i + 1) % half_leng_sect,
|
||||||
|
Reference in New Issue
Block a user