Mesh.CreateFromClosedPolyline requires that the input polygon must project to a plane and the projected polygon must be a simple closed curve. My guess is the polygon that isn’t meshing doesn’t meet the projection criteria.
I usually triangulate closed non-planar polylines first, using Polyline.TriangulateClosedPolyline, and then generate a mesh from this. Works pretty well:
Nope, I meant to reply to you. It failed for me because I was trying to triangulate a non planar polyline. I have not tried your workaround yet. Thank you for your prompt reply !