Data Structures Being Changed when Using Hops

Hi Everyone,

I was working on a script to find the inside or outside tangents circles or two input circles and wanted to test out using Hops for the first time. I have a working script that does what I need it to, but when I reference it as a Hops component, the script does not return anything. I believe it has something to do with the Hops component internally changing the data structures of my script because I have a work around in the script to check if a singular item or a tree has been input, and it only doesn’t work when I try to use trees. Has anyone had this issue before or know why it’s happening?

I’ve attached a file that shows the script exploded, packaged in a cluster, and referenced with a Hops component. I’ve also attached the separate Grasshopper script that is referenced in the Hops component.


Grant (36.5 KB)

I haven’t checked the definition, but have you checked the At Most setting on your Get Components (the ones that define inputs on the Hops component). The default is set to 1 which means its expecting you to pass in a single item. If you pass it in a list, then it will make a separate call for each item that gets passed in. If you unset the At Most value (meaning clear out the value), or set the number to some large integer, then it will treat the input as a list and only make a single call with the values your passing in. This value could be what’s causing the data structure to be different than what you’re expecting.

Thanks for the response, Andy! I’ll try it out.

Hey Andy! I’d love to get your help as well, I have the same problem. I did unset the “At Most” value, or set it to ‘2’, or even to ‘9999’.

It either works with the data I input when the “At Most” is set to ‘1’ but it flattens the tree (or weirdly changes the branches in other cases) or when unset or changed it just doesn’t work at all…

I can’t seem to be able to make it work at all with the “At Most” set as anything but ‘1’…

Could you attach an example file so that I can take a closer look? Thanks.