Speckle nodes and Hops

Hi there,
I was trying to use a definition with some Speckle nodes via Hops, and it doesn’t work.
I was assuming that because the Rhino Instance launched by Hops is local, it was able to pick up all the plugins installed (with some of them, hops works).
Do you have any possible ideas/solutions?
Cheers.

1 Like

Hey Mirco,

There are a couple of issues I was able to dodge to use Speckle with Hops/Rhino.Compute. It would be helpful if you could attach a sample definition and some screenshots of the errors you are getting and also from your rhino.compute console window. :slight_smile:

Welcome to the community. :rocket:

2 Likes

Hi Victor,
attached is the definition colled into hops.
HopsTest.gh (10.1 KB)

here the screenshot from RC.

Let me know if you need more information.
Thanks

Looks like GeometryGym is waking up, although I do not see any GeometryGym components on your definition.

Am I missing something here?

image

If you are not using GeometryGym, you might want to disable the plugin, restart Rhino and see what happens.

1 Like

I don’t think GG is creating the problem, because the input and output point in the definition works and if I remove all the Speckle nodes still working, even if I have that error.

I removed GG, so I don’t have that error.
And this is the error I got.



Hey there! I think I know what’s going on here…

If i remember correctly, hops cannot output anything that is not a “primitive data type” from Rhinocommon. So any base object will end up as empty when the component runs.

Your attempt at serialising/deserialising is good but, it turns out those are some of the last GH_AsyncComponent the connector has. These don’t play nice with compute, as it expects a single solution to be executed. I guess we could convert them to TaskCapableComponents if there’s a need for it.

So basically, for different reasons (some ours, some McNeel’s) none of your examples will work :sweat_smile:.

While we discuss if/when we change these components to be TaskCapable, you can hack your own Serialise/Deserialise nodes using a super short c# script!

Serialise to JSON

Deserialise to Base
Screenshot 2021-10-27 at 13.29.34

Remember to setup your c# script as instructed in Grasshopper | Speckle Docs

And here’s a quick demo I did to check if it worked (you’ll need to re-reference the dll’s in the c# scripts)

https://drive.google.com/file/d/1ogvvwDehyV7gwcVQZYMmYg-qALAwWLHW/view?usp=sharing

Hope that helps!!

2 Likes

Here’s a colorful collection of hacks including @AlanRynne’s that might help you get going.

Choose a hashtag #MakeSpeckleSyncAgain or #RhinoComputePleaseAwait (@McNeel)

hops-speckle-hacks.gh (10.7 KB)

4 Likes

Awesome! Thx @vwb!

My hashtag of choice would be #ReleaseGrasshopper2Already! haha but we can #MakeSpeckleTaskCapable haha which is better than just Sync :slight_smile:

Edit: LOL, I replied to myself instead :man_facepalming:t3:

3 Likes

I opened an issue to keep track of the change:

3 Likes

Firstly thanks @AlanRynne and @vwb

If i remember correctly, hops cannot output anything that is not a “primitive data type” from Rhinocommon. So any base object will end up as empty when the component runs.

Yeah, Alan this is why I tested the serialization, but I didn’t know the problem with the new component, also I tried using the C# component to avoid the use of the plugin, so I was close, but I missed the last bit :slight_smile:

Thanks, Victor for the example!

@AlanRynne regarding your demo, it works passing a string (the CSO component doesn’t fail) but if passing a point for example won’t work, so for a complex object is better to use a C# component.

3 Likes