mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-12 09:44:16 +02:00
extracted function
This commit is contained in:
@@ -53,7 +53,14 @@ module polysections(sections, triangles = "SOLID") {
|
|||||||
l_sect == concat(
|
l_sect == concat(
|
||||||
[for(i = [found_at_i:leng_pts_sect-1]) f_sect[i]],
|
[for(i = [found_at_i:leng_pts_sect-1]) f_sect[i]],
|
||||||
[for(i = [0:found_at_i - 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) {
|
module solid_sections(sects) {
|
||||||
|
|
||||||
@@ -131,13 +138,6 @@ module polysections(sections, triangles = "SOLID") {
|
|||||||
outer_sects = strip_sects(0, half_leng_sect - 1);
|
outer_sects = strip_sects(0, half_leng_sect - 1);
|
||||||
inner_sects = strip_sects(half_leng_sect, 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);
|
outer_v_pts = to_v_pts(outer_sects);
|
||||||
inner_v_pts = to_v_pts(inner_sects);
|
inner_v_pts = to_v_pts(inner_sects);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user