vedo
vedo copied to clipboard
Decimating a mesh with islands results in missing cells
mesh.ncells > mesh.cells.shape[0] after mesh.decimate_pro().clean()
This causes issues as mesh.cell_centers() matches the number of cells returned by mesh.ncells. Trying to use mesh.cell_centers() and mesh.cells. So it looks like mesh.cells is missing some cells.
I wasn't able to reproduce this with the typical bunny model but I found out it only occurs with a mesh that has both multiple regions and a face that is only connected to the rest of the mesh by one vertex. The issue is resolved after running mesh = mesh.extract_largest_region() and then mesh.clean().
Maybe an error should raise if decimating a mesh with small islands?