I have the following data: Data.csv
It crates the following image:
Im trying to make a concave hull so that I can create an outline of the region. I have tried to use all versions of the alphaShapes2D code found in this answer. I think have pinpointed the issue, it seems my points are too close. In the latest versions of the code it create a "complex infinity". While in the first version it just creates incredibly large numbers, when computing the radii of the tetrahedrons. I tried to manually remove these error by adding another line to the code. Each time it creates the error MeshRegion::dgcellr: Degenerate cells including Polygon[{22,19,21}] have been removed.
Any ideas how to make this work?
So if I edit the data to delete duplicates, which I overlooked. The edited code works. However the latest version alphaShapes2DC still outputs the same error even if the duplicates are removed.
P.S. Here is the version of the code I tried to modify:
alphaShapes2D[points_, crit_] := Module[{alphacriteria, del =Quiet@DelaunayMesh@points,
tetras,tetcoords, tetradii, tetradii2, selectExternalFaces},
alphacriteria[tetrahedra_, radii_, rmax_] :=
Pick[tetrahedra, UnitStep@Subtract[rmax, radii], 1];
selectExternalFaces[facets_] := MeshRegion[points, facets];
If[Head[del] === EmptyRegion, del, tetras = MeshCells[del, 2];
tetcoords = MeshPrimitives[del, 2][[All, 1]];
tetradii = Quiet@Thread[Circumsphere[tetcoords]][[All, 2]];
tetradii2 = If[# < 1, #, 1] & /@ tetradii;
selectExternalFaces@alphacriteria[tetras, tetradii2, crit]]
]

