mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-15 19:24:35 +02:00
add closed param
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
function __edges_from(pts) =
|
function __edges_from(pts, closed = true) =
|
||||||
let(leng = len(pts))
|
let(leng = len(pts))
|
||||||
concat(
|
concat(
|
||||||
[for(i = [0:leng - 2]) [pts[i], pts[i + 1]]],
|
[for(i = [0:leng - 2]) [pts[i], pts[i + 1]]],
|
||||||
[[pts[len(pts) - 1], pts[0]]]
|
closed ? [[pts[len(pts) - 1], pts[0]]] : []
|
||||||
);
|
);
|
||||||
|
|
Reference in New Issue
Block a user