Where can I find GH_SpeckleBase

Hi Speckle people!

I’m developing a C# Grasshopper plugin on-top/interfacing with Speckle.

It used to be that the GH_SpeckleBase where available in ConnectorGrasshopper.Extras, which could be accessed through the Grasshopper plugin. After updating to 2.7+ the Grasshopper plugin has been moved from %appdata%\Grasshopper\Libraries.
Where can I find the speckle.gha in 2.7+?

Is there another way of using the GH_SpeckleBase than getting it from the .gha? I couldn’t find out which NuGet package to get it from.

Cheers,
/Christian

1 Like

Hi @chrk!

You raise a good point! Right now, the only way to get GH_Speckle base is directly from our Gha file.

As of version 2.7, we’re now packaging the Grasshopper connector alongside the Rhino one, so you’ll be able to find it on the Rhino plugin folder:

AppData\Roaming\McNeel\Rhinoceros\7.0\Plug-ins\SpeckleRhino2 (8dd5f30b-xxxx-xxxx-xxxx-3e05c8cxxxxx)

It could be possible to split out GH_SpeckleBase and any other useful parameter or component base into a NuGet package, but I’d love to hear about your use-case for GH_SpeckleBase, as it’s only a dumb wrapper for a Base object, doesn’t really do much other than complain if something is not Base, and print the object name to the user.

Hi @AlanRynne
Thanks for the path!

I want to feed my custom component with a Speckle object and unwrap it inside the component.
The only way I could figure out how to do that was by casting the Speckle object to a GH_Speckle type.

1 Like

Well then, even though I’ll admit using our own GH_SpeckleBase would be preferable, it’s not really necessary for it to work.

GH_SpeckleBase inherits from GH_Goo<Base>, so you could cast it to that instead and then do ghGoo.Value to get the Base object (can be null).

If you wanted better control on how things get casted at the parameter level, you could always copy our implementation of Gh_SpeckleBase for your own parameters. This can be a “better” solution while we discuss providing NuGets for this separately :slight_smile:

Thanks @AlanRynne!
I’ll give the GH_Goo thing a try :slight_smile:

1 Like