Mesh from closed polyline when it fails to make a mesh?

I was using mesh from closed polyline, but there are moments when it stops working.

For instance one below at the center is null and cannot be converted to mesh: (4.4 KB)

What are other methods normally used to mesh closed polyline?

Adding point at center always create mesh from a closed polyline but then issue with concave/convex shapes occur.

Hi Tom,

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.

– Dale

I usually triangulate closed non-planar polylines first, using Polyline.TriangulateClosedPolyline, and then generate a mesh from this. Works pretty well:

1 Like

Hey there, sometimes this method fails for me too. Have you ran into a similar situation? What was ur workaround in that case ?


Depends on the case, but here’s one:

If you post your case (i.e. provide files and screenshots), that might help the McNeelies troublehshoot why the method failed.

Edit: Ah you’re probably referring to the method implemented in the original post, but replied to me. Anywho, welcome :slight_smile:

1 Like

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 !