Grasshopper

algorithmic modeling for Rhino

Hi everyone,

I am trying to iterate over a list of solids, adding one solid via boolean union at a time since  joining them together all at once would always fail for me.

However, I get the following error and I don't really know what to make of it:

(translated from German)

Runtime error (InvalidCastException): "Rhino.Geometry.Brep[]" object could not be translated into "Rhino.Geometry.Brep" object.

Traceback:

  line 5, in script 

What's the difference between the two? And how can I translate one into the other?

Views: 798

Attachments:

Replies to This Discussion

Thanks for your reply, I was (mistakenly) under the impression that joining them up one by one rather than passing the whole list would work better…

Still, shouldn't it be possible to convert one to the other?

I attached the file

Strange, it runs without error for me. Other than the Boolean Union not yielding any results, that is.

Did you by any chance rename the inputs of the Python component?

Anyways, I managed to get it to work with Nik's jostle script. Thanks a lot!

You're right. I opened the file again and now it's the same for me.

Adding "SolidUnion = x[0]" restores the old behaviour. Funny enough, I deleted that line when I tried to get to the core of the problem, yet, prior to closing Rhino I think it still worked…

I am inclined to say there is something funny going on with the Python plugin. The definition that I adapted from the thread you linked worked beautifully yesterday. Today it locks up Grasshopper

>.>

Possibly. It has to do with this one: https://github.com/mcneel/ghpython/issues/53

Yeah, seems like it

But I don't know Nik Willmore's definition, sorry.

It's in the post I linked, from the thread you pointed me to.

I since learned that all (?) these Boolean Union woes stem from the fact that all the spheres' centres sit in the same plane. Moving every other sphere up just by a little makes the union work reliably (so far), even with Grasshoppers standard 'Solid Union' component.

Thanks a lot for your pointers!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service