Grasshopper

generative modeling for Rhino

# RelItem & ReplaceMember

Hi,

I think I have some difficulties with RelItem.

I read this post ( http://www.grasshopper3d.com/forum/topics/relative-tree-item-proble...), but still couldn´t get It to work.

What I try to do:

3Sets of Points (or Vectors) --> Take the first & last from the longest list and replace by the closest of the shorter sublists.

Also the Replace Member doesn´t work right for me. (Rounding error?)

Tried something akward, which seems to work in this case, but in my other cases this doens´t.

Thanks,

Phillip

Views: 183

Attachments:

### Replies to This Discussion

RelItem is not the component for this.

Think of it like this:

Everyone (Items) in Every Room (Branches) of a Building Block (Data Tree) forms a line (List).

Now each person has to punch the person in front of them. {0;0}(+1)

Now each person has to punch the person in the same place of the line but in the next room. {0;+1}(0)

Now each person has to punch the person before them in the line but in the next but one room. {0;+2}(-1)

The important thing to get across here is that it is a relationship for each person and someone else. You cannot just cherry pick specific cases. Everybody has to punch and everybody gets hit.

I'll have a think about how to achieve the cherry picking case.

I see. Sometimes little stories help.

I think I am maybe looking for something like a pick´n´choose path...

Thanks,

Phillip

Are there only two branches that you don't want anything to happen on. {0;1;0;1} and {3;2;0;1} and is this because they don't have any list length 2 on the previous branch?

No, the paths can change.

Yes, the condition for the Replace item is, if there is a previous branch.

So for {a;b;c;d} is: For every b check number of c (subbranch) --> if it is more than 1, then replace first and last item of longest list of d (in each c)  with one of the other both d.

If you look at the other Internalised TreeStructure you see that the pattern is the same, but also the "d"  can change from being 0s and 1s.

Well, at the end I want to fin a line across a polysurface but keep continuity of normals.

Thats why all this cherry picking..

In this case {a;b;c;d}(i):

a - group of surfaces

b - subgroup (location) of surfaces

c - condition of srf or polysrfs

d - Crvs on srf / polysrf

i - points / vectors  of crvs / polycrvs

Hope this is understandable. So if there was a string input like with RelItem, I would need to make this string depending on the pathbehaviour of "d".

Thanks

Hey Danny,

Relative Tree Component

I like the example from you here :

http://www.grasshopper3d.com/forum/topics/how-to-order-item-a-list-...

DeDackel

Attachments:

Wow, I have no recollection of that. I must be getting old!

you are not old, but you have many posts with many files :-)

So I took a look at Dannys Def and I think It helped a lot understanding the use of RelItem and that it want solve what I want to do. I will try some weaving / stream method on the weekend.

Thanks,

Phillip

• View All