I am wondering if we can input a constant number to the geometry, then read the number in grasshopper.
Say each rectangle contains a constant number, then we can read this number in grasshopper, as shown in the following figure:
Thank you in advance,
The quickest way to assign a value to the geometry is by giving each geometry a name. If you want to assign more values than just a name, you can use Attribute User Text. I assigned names for all six curves and one Attribute user text for the curve ‘2’
The names and attributes can be read in GH with Elefront or possibly with a script.
I’m using Elefront and it works great for large data sets, especially also due to the option to overwrite previously baked geometry.
geometry_value_dot.gh (10.7 KB)
geometry_value_dot.3dm (34.2 KB)
Thanks for the great idea, but what if the geometry is created from grasshopper? In other words, is it possible to assign the name for the geometry in grasshopper?
Yes of yourse that is possible.
I am wondering if it is possible to reference the key and value of the geometry without baking it?
October 21, 2021, 7:29am
Yes, with a little bit of coding.
You don’t have to bake. In my file I assigned a key value combination in Rhino so you can see an example. You can assign keys / values with Elefront in Grasshopper
not sure what is the problem
October 21, 2021, 7:42am
right click on geo, set type hint to “geometrybase”
Thanks. I am not sure if I really understand it - keys/ values could be assigned with Elefromt in Grasshopper but the assigned geometry will need to be baked in Rhino for the subsequent process?
At some point you will probably bake geometry but there is no point in baking just to be able to read the values again unless you have to manipulate data manually in Rhino.
I think you are right, read the index would be fine for many cases! Thanks!