If you interested with irregular points triangulation you can use it.
Test for FreeCAD:
from Delaunator import Delaunator
import numpy as np
import Mesh
import FreeCAD as App
points = np.random.randint(1,1677.7215,size=(10000,2))
triangles = Delaunator(points).triangles
coords = [App.Vector(i[0], i[1]) for i in points]
facets = list(tuple([triangles[x+2],triangles[x+1],triangles[x]]) for x in range(0, len(triangles), 3))
mesh = Mesh.Mesh()
mesh.addFacets((coords, facets))
Mesh.show(mesh)
Btw, to extend your example, here is how the triangulation can be transferred to FreeCAD:
from Delaunator import Delaunator
import numpy as np
import Mesh
import FreeCAD as App
points = np.random.randint(4000000,4500000,size=(100000,2))
triangles = Delaunator().run(points)
coords = [App.Vector(i[0], i[1]) for i in points]
facets = list(tuple(triangles[x:x + 3]) for x in range(0, len(triangles), 3))
mesh = Mesh.Mesh()
mesh.addFacets((coords, facets))
Mesh.show(mesh)
Yes I am aware of triangle and python bindings via meshpy. I also worked on a triangulation tool [1] but never reached scipy speeds (trying to acelerate with numba). How does this library compares to scipy? If it’s really faster, would it be possible to add the concave-boundary and hole removal functionality?
What time does scipy take for 100 000 scattered points? This algorithm takes ~17 sec on my computer.
Btw, this algorithm seems to only work for scattered points when three adjacent points always form a real triangle. As soon as they are collinear the algorithm stops with a division-by-zero exception. This means for structured clouds where the points are organized in a grid structure it cannot be used.
Yes, that seems to be quite good, but compared to triangle (meshpy) and scipy about 10 times slower. The comparison to polytri is not really fair as polytri produce a non-delaunay triangulation.