1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 09:14:29 +02:00

extracted function

This commit is contained in:
Justin Lin
2017-06-11 07:48:36 +08:00
parent 136f736865
commit d44dfbad64

View File

@@ -53,7 +53,14 @@ module polysections(sections, triangles = "SOLID") {
l_sect == concat(
[for(i = [found_at_i:leng_pts_sect-1]) f_sect[i]],
[for(i = [0:found_at_i - 1]) f_sect[i]]
);
);
function to_v_pts(sects) =
[
for(sect = sects)
for(pt = sect)
pt
];
module solid_sections(sects) {
@@ -131,13 +138,6 @@ module polysections(sections, triangles = "SOLID") {
outer_sects = strip_sects(0, half_leng_sect - 1);
inner_sects = strip_sects(half_leng_sect, leng_sect - 1);
function to_v_pts(sects) =
[
for(sect = sects)
for(pt = sect)
pt
];
outer_v_pts = to_v_pts(outer_sects);
inner_v_pts = to_v_pts(inner_sects);