Hi all,
I’m a great fan of Speckle! It got to a point that I now use Speckle to create a more object-oriented grasshopper canvas, by using the speckle components as transporters to embed data and extracting the data later in the script again. I like this because the canvas becomes a lot cleaner and I am able to send data in ‘stages’, for example before or after a transformation in gh. This can for example come in handy if you are nesting geometry and want to send the 3d object ánd the nested geometry to Speckle.
A feature that would immensely help would be to make the speckle objects transformable if the main object has a input form a Geometrybase datatype. This speckle object can be transformed instead of having to rebuild the Speckle object after every transform . Would that be possible?
3 Likes
Hi @simonlut!
Welcome to the community! I’m glad you’re enjoying Speckle! Feel free to Introduce yourself 🙆 if you feel like it
Regarding your request, sadly there is no way we can support this without some kind of data-loss, the same way you are experiencing here. That being said, there are a couple of strategies that could help so that you wouldn’t “destroy” any information and have to re-construct it again (I get your pain).
“Simple solution”
For simple objects, instead of attaching properties to the line
, you can create an object with the data AND the line, and then use Object Value by Key
to obtain the geometry you want to transform. To update the object you can just extend the speckle object (if the key already exists the value will be overriden)
For more complex scenarios
I’d suggest if you need to do more complex stuff that you look into integrating speckle into a python/c# script. This would give you total control over what you change and how. There’s a brief guide on how to set it up here Grasshopper | Speckle Docs
2 Likes
Thanks @AlanRynne for the response! I will definitely introduce myself soon!
I am considering going the complex route and making some custom C# transform components that can eat speckle base parameters.
The reason I attach properties to the line is because I have a lot of geometric data with a parent-child relationship. The great thing about speckle is that it would allow us to do hierarchical transformations, where a child geometry will transform in reference to its parent. I personally like the gameobject system in Unity, where you can nest gameobjects and set different types of transformations. They visualized the shemas here.
I was thinking of doing something similar in GH and making a component such as this:
Maybe this way the grasshopper canvas can become a hybrid of objects and data-trees, so it is easier to keep the speckle objects structured throughout the canvas.
Does this sound to you like something I should try out ? Or do you feel like there is already a simpler solution available?
2 Likes