Create NGon Mesh Rhinocommon c#

Hi @tsiddikee

the simplest method I can think of is this one:

    Mesh result = new Mesh();
    foreach(var poly in P)
    {
      Mesh temp = Mesh.CreateFromClosedPolyline(poly);
      temp.Ngons.AddPlanarNgons(0.01); // some meaningful tolerance
      result.Append(temp);
    }

    A = result;

polyline.gh (6.7 KB)

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

1 Like