mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-16 11:44:50 +02:00
add sorted param
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
use <_impl/_vx_contour_impl.scad>;
|
use <_impl/_vx_contour_impl.scad>;
|
||||||
use <util/sort.scad>;
|
use <util/sort.scad>;
|
||||||
|
|
||||||
function vx_contour(points) =
|
function vx_contour(points, sorted = false) =
|
||||||
let(
|
let(
|
||||||
// always start from the left-bottom pt
|
// always start from the left-bottom pt
|
||||||
sortedXY = sort(points, by = "vt"),
|
sortedXY = sorted ? points : sort(points, by = "vt"),
|
||||||
fst = sortedXY[0] + [-1, -1]
|
fst = sortedXY[0] + [-1, -1]
|
||||||
)
|
)
|
||||||
_vx_contour_travel(sortedXY, fst, fst);
|
_vx_contour_travel(sortedXY, fst, fst);
|
Reference in New Issue
Block a user