1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-13 02:04:16 +02:00

refactored before adding test

This commit is contained in:
Justin Lin
2017-06-30 09:23:23 +08:00
parent 75e5fd00b4
commit 7ae4961a43

View File

@@ -74,17 +74,14 @@ module path_extrude(shape_pts, path_pts, triangles = "SOLID", twist = 0, scale =
path_extrude_inner(index + 1) path_extrude_inner(index + 1)
); );
if(closed && pth_pts[0] == pth_pts[len_path_pts_minus_one]) { function calculated_sections() =
// round-robin let(sessions = path_extrude_inner(1))
sections = path_extrude_inner(1); closed && pth_pts[0] == pth_pts[len_path_pts_minus_one] ?
polysections( concat(sections, [sections[0]]) : // round-robin
concat(sections, [sections[0]]), concat([first_section()], sessions);
triangles = triangles
); polysections(
} else { calculated_sections(),
polysections( triangles = triangles
concat([first_section()], path_extrude_inner(1)), );
triangles = triangles
);
}
} }