It seems to happen when a vertex loses all its faces.
Since there is a method to remove unused vertices, this method shouldn’t change the topology in my place.
Can someone test if returns 120 or 121 vertices and with which version of Rhino? I don’t understand why it doesn’t work for me! Delete faces remove vertices facepalm (1).gh (9.2 KB)
Yes - DeleteFaces with Compact=false was incorrectly removing vertices in some previous releases.
It is fixed and works as it should in R7. I’m not sure why the fix looks like it hasn’t gone into 6.31
You can track the issue here: https://mcneel.myjetbrains.com/youtrack/issue/RH-59863
I know it’s a pain - I encountered this bug too a while back and it was driving me crazy for a while why I couldn’t get it to work.
You can work around it though with something like this:
Mesh m = mesh.DuplicateMesh();
m.Faces.Clear();
for(int i = 0;i < mesh.Faces.Count;i++)
{
if(!ids.Contains(i)) m.Faces.AddFace(mesh.Faces[i]);
}