Grasshopper

algorithmic modeling for Rhino

hi everyone

I have thought a little about this and I don't see why not, so here it is.

A while ago I had this configuration:

0;0;0 {a,b,c,d}

0;0;1 {e,f,g,h}

0;0;2 {i,j,k,l}

0;1;0 {m,n,o,p}

0;1;1 {q,r,s,t}

0;1;2 {v,w,x,y}

and needed this instead

0;0;0 {e,f,g,h}

0;0;1 {i,j,k,l}

0;0;2 {a,b,c,d}

0;1;0 {q,r,s,t}

0;1;1 {v,w,x,y}

0;1;2 {m,n,o,p}

Basically shift list but operating on the branches... I could make it but I think it would be easier with a change in the way some tools work...

What if the list tools had a "level" to perform the action. Level 0 would be the list, the data. Level 1 would be the first branch, level 2 would continue to get further away from the list...

The previous operation could be done with shift list and a level 1.

With level 2 I would get

0;0;0 {m,n,o,p}

0;0;1 {q,r,s,t}

0;0;2 {v,w,x,y}

0;1;0 {a,b,c,d}

0;1;1 {e,f,g,h}

0;1;2 {i,j,k,l}

shifting the upper most level in this case.

List Item could work in the same way, also reverse list, sort list... maybe all the list tools... I don't know yet.

Let me know if it is nonsense or if there is another way to have the same functionality. 

Views: 1726

Replies to This Discussion

I think everything you are trying to do can be accomplished with the current components. 

For your first example, the "Relative Item" component is able to do precisely this, as shown below:

Similarly, substituting "{0;1;0}(0)" as the offset mask will produce your second example.

Andrew

There is always that hidden component that I see but don't get the time to explore... Nice! Thanks.

I see the "shift branch" case works but I was looking for a more generic solution that could be used for list components like reverse, list item, cull, shift, list length, split... so that they can operate on items or on branches at any level. 

for instance, base on the original list:

List Lenght with level 0 (default) would be 

{0;0;0}(4)

{0;0;1}(4)

{0;0;2}(4)

{0;1;0}(4)

{0;1;1}(4)

{0;1;2}(4)

With level 1 it would be

{0;0}(3)

{0;1}(3)

With level set to 2 it would be

{0}(2)

Does it make sense? Or maybe this functionality is again hiding from me in plain sight :)

anyone?

The logic of definition follows from your question. It is necessary to shift numbering of branches of a tree .

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service