Grasshopper Python Script utilizing Rhino Command (MeshPolyline)

Dear Grasshopper/Rhino/Pythonphile,

I am wondering if I can make a Grasshopper Python Component with the same functionality of [MeshPolyline] - (native Rhino command_Mesh from Closed Polyline), (I can find it in the Pufferfish plug-in, but can I just make it my own? ).

Pufferfish counterpart:

Thank you so much for the help!

Cheers,
Ranran

I’m not sure how to form the necessary command string (look in the command window when you trigger it manually in Rhino), but try rs.command('_Mesh')

Hey James,

Thank you so much for your prompty reply!

I believe you are talking about the first method in my screen shot, in which the triangular mesh has some internal edge, compared with the one created by"MeshPolyline",

Hi Ranran. You’re welcome. I am yes - I didn’t realise there were two different meshing methods, sorry.

1 Like

Simply use this

Hey Seghier, Thank you so much for the help, This [SimpleMesh] component is actually what I am looking for,

But do you know how to make a grasshopper Python component being the equvalent of Rhino command, i.e. [Meshpolyline], in my case.

Thank you!!!

Use

import Rhino.Geometry as rg

a = rg.Mesh.CreateFromClosedPolyline(p)

1 Like

Hey Seghier,

this is so KOOOOOOOOOOL~

Thank you very much!