Grasshopper

algorithmic modeling for Rhino

Hi all,

I’ve been having a headache with splitting data trees and am wondering if someone can take a look at this and let me know what I’m doing wrong. Basically I want that every output in the ‘sift’ component produces the same list, each of which I can then use to cull the numbers that I need and perform actions, etc. Then recombine all the lists to the master list, keeping the original numbering integrity (I need the plot numbers that show up in the Rhino file to stay the same when I recombine everything).

I’ve had no problem culling the lists but now I can only use sift output 0; all the subsequent outputs bring up ‘null’ for every path.

I know that I can use the ‘sift’ and ‘combine’ components to accomplish this. But I don’t know how to deal with the P input on the ‘sift’ component so that each ‘sift’ output will give me a master list I can cull from.

Thanks to anyone who can point me in the right direction! 

Views: 2077

Attachments:

Replies to This Discussion

Hello Andrew

can you please describe what you are after? i am not sure sift is the component for your case. also you are grafting data with no obvious reason, but maybe i am missing something. 

my guess is you have an initial curve describing the block. then you offset you curves and you want to cull the curves that are not closed?

cheers

alex

Hi Alex, thanks for the reply. I'll try to explain. I assume you meant 'sift pattern' (as opposed to 'shift'). 

I want to do a few things, one being as you say, to cull curves which aren't closed. I then want to take the plot numbers which are in each of the lists I have in the file and do different things with each of them (for example I may create unique geometries for each set of lists and perform separate calculations on them, etc.). Finally, I want to re-combine all of those lists together, where each plot number stays in its proper position, and use that list for its own calculations/color gradient previews etc. which include all of the plots. 

I can do this by culling the lists without using the 'sift pattern' component, but then I can't/don't know how to re-combine those lists at the end, keeping every plot number in its place. 

As for the grafting, for some reason it helps me do something that's unrelated to this list problem. I'm still quite new to Grasshopper so I haven't figured out why yet, but that's why it's there. 

In the beginning you have a list of 88 curves (the holes from the offset)

you offset these and you test them to see if they are closed or not, to cull the not ones.

so far so good. the part i am missing is why you want to use sift pattern.

you want to have a data tree form the initial list of 88 curves? (according to a pattern?)

I've tried to illustrate quickly an example. After I cull the 'blue' from the 'red', and try to make each have their own separate properties, then strange things happen, and the original plot numbers (seen in the rhino file) don't seem to relate to the geometry changes in Grasshopper anymore. If I just connected the 'polyoffset' output H to either of the 'item' L inputs, everything goes okay. 

I hope this helps. There's a lot I'm unclear about so it's hard to be precise. Thanks again. 

Attachments:

there are some problems with the definition. for example for the red parts you provide to the input i of list item component the output from cull list which is polylines and not integers describing list indexes. (check the numbers).

in order to have your curves organized you need to set the rules of the organization.

for example

if you want to partition you 88curves list to a tree with 11 curves in each list, you can use partition list component.

after the structure of data is clear you can continue to cull or have other operations, and there are ways to keep the the initial data structure.

Ah yes, I missed that input error. My mistake, thanks.

What if I want to partition my 88 curves list to a tree with variable numbers of curves in each list, and each corresponding to their position on the map? For example in one list I want curves 5, 20, 21, 22, 23, 60. In another I want curves 1, 37, 40. In another maybe 70-80. And in the last, all curves that aren't specified in those three lists. Is there a way to partition the lists as such?

yes, check image,

since i cannot find any obvious position connection between the ones you want in each list , i used panel. if you set the rule for each list (for example areas from 0-30 list one, areas 30-90 list 2 etc) or position-wise you wont have to use the panels. 

Thanks a lot, Alex. Helps a lot. I will look at this example and try to apply it. 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service