Cocoon Error

Hi all,
I’m trying to convert a bunch (809) of closed meshes into a single mesh, and the way I’ve discovered that might be possible is by using Cocoon. However, I get this error when I try to use the cocoon component:

  1. Solution exception:Unable to cast object of type ‘Grasshopper.Kernel.Types.GH_Mesh’ to type ‘MarchingCubes.CubeWrapper’.
    Any ideas how to solve this?
    Thanks in advance!
    Reinforcing a surface using a Hexgrid (33.8 KB)

Screenshots and files

1 Like

It asks for charges. A mesh is a mesh, not a charge. Charges are in cocoon. Have you looked at the example files? See charges in image below.

1 Like

Yep I just noticed that in a picture on grasshopper3D , and I’ve changed my file accordingly. Only just got Cocoon, so charge is a new term for me.
It looks like I’ve got too many curves for Cocoon to handle all at once anyway. So now I’ve got to figure out how to feed it the curves bit by bit?

It looks like I’ve got too many curves for Cocoon to handle all at once anyway.

Marching cubes is a notoriously slow algorithm and is only as fast as your computer and processor. Unfortunately, you can’t really break it up unless you plan to manually stitch the parts together afterwards.

1 Like

It stopped computing, and the error has gone, but it looks like cocoon isn’t doing anything now - no green preview…

What does the output say, again screenshots always help.

1 Like

Empty mesh parameter

Well means something went wrong if no mesh was made. Post your file with the cocoon component not running (Execute to False)

Reinforcing a surface using a Hexgrid (31.3 KB)

You haven’t internalized your data. Please internalize any referenced data so it is usable. Right click the component and select internalize.

Reinforcing a surface using a Hexgrid (32.3 KB)

It worked for me with setting like these. I think your settings were just too big for the size of your lines. What I usually do is test the result on one line or curve first so it is very fast to see the thickness / smoothness (That’s why you see the list item in my screen shot, I used that to test on one line first). Then once I find a good size I do all the curves (and go for one or many coffees or beers and hope it is done when I get back :smiley: )

If you are just using straight lines you might also try something like exo skeleton.

1 Like

Thank you!