1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-15 11:14:17 +02:00

add sorted param

This commit is contained in:
Justin Lin
2020-11-19 10:45:36 +08:00
parent 8d978eb374
commit c19a01f281

View File

@@ -1,10 +1,10 @@
use <_impl/_vx_contour_impl.scad>;
use <util/sort.scad>;
function vx_contour(points) =
function vx_contour(points, sorted = false) =
let(
// always start from the left-bottom pt
sortedXY = sort(points, by = "vt"),
sortedXY = sorted ? points : sort(points, by = "vt"),
fst = sortedXY[0] + [-1, -1]
)
_vx_contour_travel(sortedXY, fst, fst);