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