I was wondering if it were possible to associate a grasshopper definition to a defined Geometry in Rhino and Execute it right away.
The Problem I would like to solve is to create “sort of” parametric elements within Rhino to handle “part libraries” better.
Example: Coat Hook
I created a GH Definition for a Coat hook.
It has one Geometric Input (a curve) and a lot of numerical Sliders inside
If I would like to handle several coat hooks at a time I would have to either, “set” the curve to each hook line one by one, or use “set on multiple curves”. Since I didn’t handle the Data trees correctly multiple curves will not get me anywhere, without some additional effort.
However, If I could associate a GH Definition to a geometry and handle the numeric parameters through a user Interface associated toe the object (Like a RCP associated to an Object)
It would be like a parametric Block. (If I explode it, the GH Definition is gone and only the geometry will be baked to the document.
A few Benefits of that approach:
- I could handle several Elements with the same GH definition, but different paramenter configurations at a time
- I could run several GH definitions at the same time within one document. (A coat hook, a chair, a table)
- Users would not have to go into Datatrees as deep (as this concept is quite challanging for beginners)
- I could handle part libraries more efficiently (Screws in different lengths, tables in different sizes, Steel Profiles) rather than Blocks for each instance.
- I could read out parameters of these components and could convert them into other file formats. (Way simpler to create a Revit family if you know the driving parameters)
- I could handle Layers, Properties and so on outside of GH. Basically inherit the Object Properties from the driving geometry
- if the parameters are accessible through code that be really great!
The possibility to associate executable code (GH or RhinoCommon) to an object and set parameters that drive the Geometry at runtime and recalculate as soon as a parameter is changed would be a great feature.
Let me know what you think.
hooks.gh (18.3 KB)