Cocoon Error

unhandled

(Velocir) #1

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 unduped.gh (33.8 KB)

(Michael Pryor) #2

Screenshots and files


(Michael Pryor) #3

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.


(Velocir) #4

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?


(Michael Pryor) #5

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.


(Velocir) #6

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


(Michael Pryor) #7

What does the output say, again screenshots always help.


(Velocir) #8

Empty mesh parameter


(Michael Pryor) #9

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


(Velocir) #10

Reinforcing a surface using a Hexgrid unduped.gh (31.3 KB)


(Michael Pryor) #11

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


(Velocir) #12

Reinforcing a surface using a Hexgrid unduped.gh (32.3 KB)


(Michael Pryor) #13

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.


(Velocir) #14

Thank you!