I'm trying to solve a very tricky bugissue in my program. It's tricky because it seems to be not working intermittently, and mostly not working when running with large data setsfunction. The code itself is kind of enormous but I think I know the crux offunction needs the problem, which I'll include here.
My program calculates many Point[]NDSolve`FEM` 's, a fairly large number (~10,000) framework. I then pass it to this function I've created that tries to find
Here is a concave hull for itminimal example:
GetBoundaryMesh[points_, alphaparameter_]Quit[] GetBoundaryMesh[obj_] := (Module[{bmesh}, (*<<NDSolve`FEM`;*) Needs["NDSolve`FEM`"]; ashape bmesh = alphaShapes2DC[points,ToBoundaryMesh alphaparameter];@ obj; bmesh = ToBoundaryMesh@ashape; MeshPrimitives[MeshRegion @ Return@MeshPrimitives[MeshRegion@bmeshbmesh, 1]; )1] ] GetBoundaryMesh[pts,0.05]GetBoundaryMesh[Disk[]] MeshPrimitives[MeshRegion[Global`ToBoundaryMesh[Disk[{0,0}]]],1]
So here's an exampleSomething went wrong, I was expecting a list of ptsLines, and what it looks like when which I show them with Graphics[]can get by executing this code manually:
ptsQuit[] {{0.31275,0.330298},{0.31301,0.330526},{0.313278,0.330762},{0.313553,0.331004},{0.313835,0.331251},{0.314123,0.331505},{0.314418,0.331764},{0.314718,0.332028},{0.315023,0.332296},Needs["NDSolve`FEM`"]; bmesh \[CenterEllipsis]9983\[CenterEllipsis]= ,{0.334019,0.335577},{0.333671,0.335608},{0.333337,0.335646},{0.333018,0.33569},{0.332713,0.335741},{0.332421,0.335797},{0.332142,0.335859},{0.331876,0.335925}} ToBoundaryMesh @ obj; Graphics@Point[pts]MeshPrimitives[MeshRegion @ bmesh, 1] And here's what happens when I pass it to GetBoundaryMesh[] as in the code above:
{Line[{{1.,0.},{0.991575,0.129537}}],<<46>>,Line[{{<<19>>,-<<20>>},{<<1>>}}]}
I'm not sure how to search for this, so that's why I'm kind of stumped. To me it seems like it isn't importing the NDSolve`FEM package correctly (in my GetBoundaryMesh function), so that's why ToBoundaryMesh isn't evaluating, but that's just my best guess. Also, ToBoundaryMesh is syntax highlighted in red in the function.
Loose thoughts



