Mesh from polyline alternative


I have issue with closed polyline meshing. I need meshing just for shading. But do not know how to approach this issue in good way.

Below I have a polyline, I have lots of this like polylines. I would like to mesh so that mesh faces stays inside closed polyline. But polyline is folded on one axis and meshfrompolyline from rhinocommon produce not a good result… Is there any way to automatically approximate desired meshing for such polylines?

I also attached rhino file

file.3dm (80.8 KB)

Alternative to mashing this type of polyline is to:
-explode polyline to lines
-find all different planes to which neighbor-lines belongs to (in this case probably 2 planes but I have not realy check it)

  • neighbor lines L1 and L2 are lines if L1 ends where L2 starts, and if they are not parallel they will define a plane (if they are paralles skip L1 a compare L2 and L3)
    -in each plane create closed polyline by conecting existing lines with new line(s) which you add to “close” existing open lines
    -so you will have closed polylines in different planes but they will share same line(s) you just added in previuos step
    -now you can mesh closed polylines one by one
    -at the end you join meshes

file_v2.3dm (70.5 KB)


Might fail in some cases, but you could cull faces outside of the original boundary.