mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-09 08:16:50 +02:00
update ret
This commit is contained in:
@@ -10,7 +10,7 @@ module drawTris(pointsOfTriangles) {
|
||||
}
|
||||
}
|
||||
|
||||
drawTris2(points, tri_delaunay(points, ret = "INDICES"));
|
||||
drawTris2(points, tri_delaunay(points, ret = "TRI_INDICES"));
|
||||
module drawTris2(points, indices) {
|
||||
pointsOfTriangles = [for(i = indices) [points[i[0]], points[i[1]], points[i[2]]]];
|
||||
%for(t = pointsOfTriangles) {
|
||||
|
@@ -1,8 +1,9 @@
|
||||
use<experimental/_impl/_tri_delaunay_impl.scad>;
|
||||
|
||||
// ret: "SHAPES", "INDICES", "DELAUNAY"
|
||||
function tri_delaunay(points, ret = "SHAPES") =
|
||||
// ret: "TRI_SHAPES", "TRI_INDICES", "DELAUNAY"
|
||||
// todo: "VORONOI_SHAPES"
|
||||
function tri_delaunay(points, ret = "TRI_SHAPES") =
|
||||
let(d = _tri_delaunay(delaunay_init(points), points, len(points)))
|
||||
ret == "SHAPES" ? tri_delaunay_shapes(d) :
|
||||
ret == "INDICES" ? tri_delaunay_indices(d) :
|
||||
ret == "TRI_SHAPES" ? tri_delaunay_shapes(d) :
|
||||
ret == "TRI_INDICES" ? tri_delaunay_indices(d) :
|
||||
d; // [coords(list), triangles(hashmap), circles(hashmap)]
|
Reference in New Issue
Block a user