1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-31 10:11:53 +02:00

add ret param

This commit is contained in:
Justin Lin
2021-04-24 10:05:38 +08:00
parent baf64e47b8
commit 209ba9cc01

View File

@@ -4,4 +4,7 @@
use <experimental/_impl/_tri_ear_clipping_impl.scad>; use <experimental/_impl/_tri_ear_clipping_impl.scad>;
function tri_ear_clipping(shape_pts, epsilon = 0.0001) = _tri_ear_clipping_impl(shape_pts, epsilon); // ret: "TRI_SHAPES", "TRI_INDICES"
function tri_ear_clipping(shape_pts, ret = "TRI_INDICES", epsilon = 0.0001) =
let(tris = _tri_ear_clipping_impl(shape_pts, epsilon))
ret == "TRI_INDICES" ? tris : [for(tri = tris) [for(idx = tri) shape_pts[idx]]];