/ src / triangle / tri_delaunay_indices.scad
tri_delaunay_indices.scad
 1  /**
 2  * tri_circumcenter.scad
 3  *
 4  * @copyright Justin Lin, 2021
 5  * @license https://opensource.org/licenses/lgpl-3.0.html
 6  *
 7  * @see https://openhome.cc/eGossip/OpenSCAD/lib3x-tri_delaunay_indices.html
 8  *
 9  **/
10  
11  use <_impl/_tri_delaunay_comm_impl.scad>
12  use <../util/map/hashmap_keys.scad>
13  
14  function tri_delaunay_indices(d) =	[
15  	for(tri = hashmap_keys(delaunay_triangles(d))) 
16  	if(tri[0] > 3 && tri[1] > 3 && tri[2] > 3)
17  	[tri[2] - 4, tri[1] - 4, tri[0] - 4] // counter-clockwise
18  ];