Closed polyline extrude to point - invalid mesh (python)

From my testing, CPython 3 that implements RhinoCommon will be slower than IronPython, and IronPython is in turn slower than GHPython:

In some tests drastically, so if you’re going for Python + RhinoCommon + speed I’d recommend sticking with GHPython for now. And as always, following a few simple tricks can affect performance by a lot:

Also, in this case a performance bottleneck is calling Mesh.Append many times within the loop. If we do that just once, or alternatively wrap the pyramid meshes in the Grasshopper mesh type, the compute time drops quite severely:


270710_MakePyramidMeshes_AHD_01.gh (730.9 KB)

Note how the viewport is a lot more responsive if we only output one mesh for all the pyramids.

2 Likes