Cocoon Mesh Error

Hi, I am trying to create a mesh using Cocoon in grasshopepr but certain values have given me the following error message:

  1. Solution exception:Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

When I use a cell size of 10, it works perfectly fine. Values from 1-9 do not work. I want to use a smaller cell size so that I can get a better mesh with fewer holes.

Cell size 5: Sample size 2:

Cell Size 10: Sample size 5:

Would appreciate any help! thank you.

First it is hard to say if there is a workaround without script and data. See this

Second, If the error is inside Cocoon plugin, it will be hard to correct, ask the author of the plugin.

Third, try Dendro, it will require you a bit more work to get the same result as Cocoon but it will work better for little cell size.

1 Like

Thank you for your help! I will look at dendro for the time being. I have attached the grasshopper script for your reference. It includes the polyline framework i am working with. These polylines were created by a swarming effect using Culebra. (379.7 KB)

here a script with Dendro, I think you are at the limit of Cocoon. This plugins has some very nice unique features but is not as optimized as Dendro which use power of OpenVdB (which is in Houdini … and many other great softwares)
You can suppress the soothing at the beginning during your research of the nicest shape. And beware of sliders for long operations. Use double click to adjust the values, or use dam …
Use also a cell that is not too loow 2, 3
Then you can go to 1.
Play at the end with the smoothing

There are many options (387.4 KB)

1 Like

Hi, Thank you so much for suggesting Dendro! I totally agree with you. I was playing around with dendro and it produced much better results with my polylines. Thank you so much for taking the time to help me and write a script. I will have a look at your script and learn further from it.