MeshFaceList.DeleteFaces also deletes vertices


#1

MeshFaceList.DeleteFaces also deletes vertices, however the SDK says it maintains the rest of the geometry:

“Removes a collection of faces from the mesh without affecting the remaining geometry.”

http://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Collections_MeshFaceList_DeleteFaces.htm

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.

 private void RunScript(Mesh M, ref object A)
  {
    M.Faces.DeleteFaces(new int[]{10,8,6,4,2,0});
    A = M;
  }

DeleteFacesBug.gh (10.5 KB)

Please, fix that.
Thanks.


(Dale Fugier) #2

Hi @Dani_Abalde,

The function does seem a bit heavy-handed. I’ve created an issue so we can address this.

https://mcneel.myjetbrains.com/youtrack/issue/RH-45910

– Dale