Grasshopper

algorithmic modeling for Rhino

Hello,

I'm new to Grasshopper, so apologies if this is a duplicate question.

The first language that uses this node based visual programming paradigm I used is MaxMSP and there you had the option to encapsulate code.

Say a 'patcher'/definition got pretty hefty, you could put inside a 'box' another object and you could define 'inlets'/inputs and 'outlets'/outputs. This made it fairly easy to create 'classes'/reusable definitions. Is there any similar functionality in Grasshopper ?

I've also just spotted that C# scripts can be used, so I imagine that would be one option (In MaxMSP you can write js object or compile objects using C or Java). Still I wish I could just select a bunch of objects end abstract them in a new definition easily.

Any tips/hints on how might do that ?

Views: 882

Replies to This Discussion

look into making clusters.
Oops.
There used to be clusters which did/do nearly exactly as you describe..

http://www.grasshopper3d.com/forum/topics/what-happened-with-the

Hi George,

Clusters(tm) are supposed to do this but I'm still working on them. The first two attempts at getting it to work (especially the first) were not good enough.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hello,

Thank you both for the great answers.

I've just looked into clusters. Since I'm a n00b, here's what worked for me:

  1. For each slider/element I had in my definition I also connected Cluster Input objects
  2. I've routed the resulting geometry in my definition to a Cluster Output object
  3. Clustered the group of components (via Edit > Cluster Selection )

That worked, but on my second try. The first time I simply clustered everything 1st and then ran into issues when I tried to add the inputs and outputs for the cluster. This bit got me confused. When I edit a cluster, it opens up an unnamed definition. Even if I save that definition to a file and go back to the original grasshopper document where I had the cluster, when I open the cluster again, it's a new/unnamed document. So for now, what I learned is that it's best to define the inputs/outputs beforehand, then cluster/encapsulate.

Still I find it useful to be able to make changes to a cluster and go back to the document that contains it and I haven't worked out how to do this. Is this possible in the current version of grasshopper ? If so, how ?

Thanks again,

George

When you are finished editing a cluster, the idea is that you close it from the file menu. It is a bit confusing ATM. I'm sur it will get sorted eventually.

@David, it may have already been mentioned, but it would be fantastic to use ZUI to navigate in and out of clusters. Zoom in to a closed cluster node to open it. Then while in the cluster sefinition, zoom out to close it. Possible?

@Jonah If I close the definition from the File Menu (File > Close unnamed* Ctrl+W) it is "unnamed" I get prompted to save. A file is saved, but the cluster in the document I return to is unchanged. Is there an easy way to move back and forth/update clusters at the moment ?

I have not had any luck with clusters either. It may very well be that they are still in development. Maybe we need to Save As... or something. I haven't dug that deep into them. 

yeah I agree. Clusters could be so powerful if done right. Both GC and catia/dp use the idea of instantianting an adaptive custom element. A way to easily parse through a library of clusters would be awesome too.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service