Hello,
I am writing a c# component where I cut some mesh faces and I have a difficulties keep the mesh valid during the process.
I have a polyline lying on a triangle mesh and I split every face it crosses. So I go throught all faces and for each crossed face, I do:
1- create new vertices at intersections edges/polyline (if not already created processing the neighbour face)
2- for each created vertex, create new TextureCoordinates (average of neighbour vertices respectiv TextureCoordinates)
3- add the new vertices resp. TextureCoordinates to Mesh.Vertices resp. Mesh.TextureCoordinates
4- create 2 new faces using the new vertices (so I get a triangle face and a quad face)
At the end of the loop I remove the orginal “crossed faces” and recompute the normals.
The new mesh looks all right, but it is invalid, disturbing the further process. Using the Mesh.IsValidWithLog methode, I get following feedback:
ON_Mesh.m_S.Count() = 25741 (should be 0 or 26942=vertex_count).
And here am I. I had a look in the Rhino C++ API, but couldn’t get what m_S actually is / how I can solve the problem, so any help from the forum welcome!
Thank you.
Pierre