Open petrasvestartas opened 7 years ago
I managed to reproduce the "divide by zero" error, so it looks like there's a bug...! As a workaround, if you compact the mesh after removing the face, the "divide by zero" error disappears.
Note: compacting the data structure might change all the indexing! For example, if by removing the face there are now vertices that aren't connected to anything, they will be removed and the list of vertices will shrink, changing all the vertex indices. All the other faces/halfedges will be updated to reflect the new indexing, but you might have some external code that relies on the original indexing...
PlanktonMesh pm = x.ToPlanktonMesh();
pm.Faces.RemoveFace(0);
pm.Compact(); // purges any unreferenced vertices, faces and halfedges
A = pm;
Note to self: this grasshopper definition reproduces the bug... remove_face_bug.gh.zip
Same happens when mergin Faces...
Hi,
I would like to ask how to properly delete face from planktonMesh.
When I do it like this I get error for division by zero. I just want to remove one first face from planktonMesh.