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.
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.
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.
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