GH Python Mesh Repair Help

Hi,

Im trying to create a python script inside the GH python component that will allow me to plug in an “invalid” mesh and use the Rhinocommon mesh repair methods on it. Has anyone done this? Its just a real pain having to bake out a mesh into rhino and mesh repair it every time when the goal is to iterate quickly.

I just can’t seem to get the mesh functions to work properly i.e.:

r.Geometry.Mesh.Faces.PropertyType.RemoveZeroAreaFaces()

not sure i understand the arguments that the function takes

(RemoveZeroAreaFaces(self: MeshFaceList, fixedFaceCount: int) )

anyone gone down this road before?

#Python
m.Faces.RemoveZeroAreaFaces(0)
a = m
//CS
private void RunScript(Mesh m, ref object A)
{
  int i = 0;
  m.Faces.RemoveZeroAreaFaces(ref i);
  A = m;
}

RemoveZeroAreaFaces.gh (5.3 KB)

that worked :slight_smile: thank you very much