mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-26 07:55:16 +02:00
< leng is not necessary
This commit is contained in:
@@ -44,8 +44,7 @@ module sweep(sections, triangles = "SOLID") {
|
|||||||
function the_same_after_twisting(f_sect, l_sect) =
|
function the_same_after_twisting(f_sect, l_sect) =
|
||||||
let(found = search([l_sect[0]], f_sect)[0], leng = len(l_sect))
|
let(found = search([l_sect[0]], f_sect)[0], leng = len(l_sect))
|
||||||
found != [] &&
|
found != [] &&
|
||||||
// l_sect == concat(slice(f_sect, found), slice(f_sect, 0, found))
|
len([for(i = 0; l_sect[i] == f_sect[(found + i) % leng]; i = i + 1) undef]) == leng;
|
||||||
len([for(i = 0; i < leng && l_sect[i] == f_sect[(found + i) % leng]; i = i + 1) undef]) == leng;
|
|
||||||
|
|
||||||
function to_v_pts(sects) = [for(sect = sects) each sect];
|
function to_v_pts(sects) = [for(sect = sects) each sect];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user