Grasshopper

algorithmic modeling for Rhino

Hello everyone,

I made a cluster which has as input:

  • file path 
  • boolean valor (a controller)

the output is:

  • a panel with 12 string formatted (with point coordinate for every string)
    • xxxxx.xxxxx  yyy.yyyy  zzz.zzzzz
    • xxxxx.xxxxx  yyy.yyyy  zzz.zzzzz
    • xxxxx.xxxxx  yyy.yyyy  zzz.zzzzz
    • xxxxx.xxxxx  yyy.yyyy  zzz.zzzzz
    • ...

So this is the problem: I have 44 file to process, and I wonder how (if it's possible) to "graft" the input so that I have 44 file in input + booleans and 44 panel in output...

In the "middle" of the cluster I have some flattern instruction so cannot directly add the whole input, I have to graft it from "outside" but I don't know how....

Any advice? Thank you!!

Umberto

Views: 1247

Replies to This Discussion

I think if you're flattening inside the cluster there's not much you can do.  if you share your cluster definition, someone might be able to help you out a bit in regards to working with data structures in it.  for example, you may not need to actually flatten your data in the cluster in order to get it to perform the way you'd like it to...basically if you want to retain your original data structure, you're going to have to make it happen inside the cluster.

thank you for your quick answer David!

in fact you are telling me the "worst" case, because the cluster is very very complicate and full of components.... I initially thougth that "cluster" was a kind of "function" of grasshopper, so that if I give 44 input it would give me back 44 output treating them as " 1 by 1 "... but he behaves like a bunch of components "closed of view" in a box... and the data tree of the cluster is the same of the data tree "outside", with no real advantage in using them (IMHO, apart from closing/pw them). I just wanted that GH "forgot" the things inside the cluster, using my input 44 path file one by one....

So I managed to fulfill my task copying 44 times the cluster and giving the rigth input... the result on picture allegated:

GH_03 is the main, with the 44 copied cluster, in GH_04 there is a detailed view of the cluster, and in GH_05 inside the cluster.

Attachments:

oh dear! 44 copies...well, I guess you got it done.  But I'll bet it would be possible to perform some surgery on that cluster...the key (generally) lies in finding where you lose data structure to a flattening process, and if you can't figure out how to perform an adjustment to the data structure, like shifting paths, then at least figuring out how to use use list lengths and replace branches to reconfigure the data structure as you like it.  I'd be curious if you posted the cluster to see if it would be possible...

...Yes I know it would be possible, but I hoped that "clustering" would separate the tree... in fact if I develop a successfull "single" algorithm (and save it with a cluster), if I try to use it "in series" am I always suppose to re-elaborate it according to the different input I can have in the future?

In short terms, I viewed the Cluster as a "machine", like a "production island" in a factory, which process the input and give the output "as they are", but in GH cluster is seen more like "a box", where to put and "pack" a lot of components...

The component "Entwine" before entering your cluster may be interesting.
Can we see a sample of your definition within the cluster.
If there is a flatten inside, it may did not work.

I tried entwine, and he think it is very useful when you are organising and grafting multiple stream of datas... but my input data are two vectors, one of string one of boolean, and I need to "separate" the elements of both vectors, not really entwine them... The cluster in fact is full of flatten inside, and I needed a component that gave the input to the cluster 1 by 1... in fact "ignorating" the data stream of the cluster, using it as a function...

Sorry but I can't show you the inside of the cluster, it has an original algorythm inside. :)

Umberto,

I use a lot of cluster mode tree calculation. I must say that the component "flatten" in this case is unusable. Fake it better to use a "shift paths" which returns to a logical structure of data rather than overwrite it with "flatten".
It is true that this method is more complex to use, but you could reduce your definition to a single component.
Can be reviewed within the "cluster" by focusing on tree structure for example by trying two or three branches.
Good luck to you.

Yes I admit that flatten is the "last way" to do something, the less proper. And I should get better know of tree management. I was only wondering why the data tree management outside the cluster is influenced by what's inside. According to me, they should remain on "different level of separation", so for me a cluster is a kind of repetitive call for a bunch of component.... and you can also reduce a definition to a single component with an approach like that.

es:

by now (as you say) cluster is INPUT (x,x,x,x,x,x)-> MANAGED(y,y,y,y,y,y,)->OUTPUT(z,z,z,z,z,z)

I thougth  (x,x,x,x,x,x)-> y1->z1          ->(z,z,z,z,z,z,z)

                                   y2->z2                

                                    ......

                                   yn->zn

...do you understand?

I understood, but it is impossible with a "flatten".

If you have in your definition a "flatten" all your tree shook automatically reduced list.
As some components create a tree from a list of objects, here for you throughout your structure descendera list form.


The cluster acts as if it was not grouped.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service