mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 09:14:29 +02:00
used concat directly
This commit is contained in:
@@ -27,24 +27,23 @@ module polysections(sections, triangles = "RADIAL") {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function flat(vector, i = 0) =
|
|
||||||
i == len(vector) ? [] :
|
|
||||||
concat(vector[i], flat(vector, i + 1));
|
|
||||||
|
|
||||||
function hollow_tris() =
|
function hollow_tris() =
|
||||||
let(
|
let(
|
||||||
leng_section = len(sections[0]),
|
leng_section = len(sections[0]),
|
||||||
inner_i_begin = leng_section / 2,
|
inner_i_begin = leng_section / 2,
|
||||||
pair_idxes = [for(i = [0:inner_i_begin - 1])
|
pair_idxes = concat(
|
||||||
let(n = inner_i_begin + i + 1)
|
|
||||||
[
|
[
|
||||||
[i, inner_i_begin + i, n % inner_i_begin + inner_i_begin],
|
for(i = [0:inner_i_begin - 1])
|
||||||
|
let(n = inner_i_begin + i + 1)
|
||||||
|
[i, inner_i_begin + i, n % inner_i_begin + inner_i_begin]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
for(i = [0:inner_i_begin - 1])
|
||||||
|
let(n = inner_i_begin + i + 1)
|
||||||
[i, i + 1, n % leng_section]
|
[i, i + 1, n % leng_section]
|
||||||
]
|
]
|
||||||
|
)
|
||||||
]
|
) pair_idxes;
|
||||||
|
|
||||||
) flat(pair_idxes);
|
|
||||||
|
|
||||||
function tris() = triangles == "RADIAL" ? __triangles_radial(sections[0]) :
|
function tris() = triangles == "RADIAL" ? __triangles_radial(sections[0]) :
|
||||||
(
|
(
|
||||||
|
Reference in New Issue
Block a user