1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-03-14 11:10:01 +01:00

refactored

This commit is contained in:
Justin Lin 2017-05-22 11:12:36 +08:00
parent 979ca8e89c
commit fbf9968935

View File

@ -52,7 +52,7 @@ module polysections(sections, triangles = "SOLID") {
i < leng_pts_sect ? i < leng_pts_sect ?
(p == first_sect[i] ? i : search_at_first_sect(p, i + 1)) : -1; (p == first_sect[i] ? i : search_at_first_sect(p, i + 1)) : -1;
function the_same_as_first_sect() = function the_same_after_twisting() =
let( let(
found_at_i = search_at_first_sect(last_sect[0]) found_at_i = search_at_first_sect(last_sect[0])
) )
@ -68,7 +68,7 @@ module polysections(sections, triangles = "SOLID") {
pt pt
]; ];
if(first_sect == last_sect || the_same_as_first_sect()) { if(first_sect == last_sect || the_same_after_twisting()) {
polyhedron( polyhedron(
v_pts, v_pts,
side_indexes(sects) side_indexes(sects)