algorithmic modeling for Rhino
Hi, I have a question about data tree selection, please see the attached images, how can I repeat selecting three consecutive items from each branch?
I'm trying to select items (0,1,2), (1,2,3), (2,3,4)...(8,9,10) within each branch, basically what I want is after the operation, each existing branch will have 9 new branches with three items in each new branch.
From:
{0;0;0}
0
...
10
{0;0;1}
0
...
10
...
To:
{0;0;0;0}
0
1
2
{0;0;0;1}
0
1
2
...
{0;0;0;9}
0
1
2
{0;0;1;0}
0
1
2
{0;0;1;1}
0
1
2
...
{0;0;1;9}
0
1
2
...
Tags:
isn't your example wrong as you would pass from a 100 items tree to a 300 items tree?
anyways I think that a Flatten followed by a Path Mapper might be all you need.
p.s. I am not an expert
Hi Sergio,
actually I want to extract three consecutive items from each branch to construct a geometry. I can flatten it or even select a single branch and do it branch by branch, but if there is hundreds of branches, I think it will be really tiresome to do that. So I am looking for a definition that can do this to all the branches at the same time.
I cannot post an example until monday next week but what you need is:
[series] c=number of branches
[shift list] s=series output
[list item] zui expose i+1 & +2 gibing you the first 3 items
[merbe list]
Alternatively you can use [sub list] with a domain 0 to 2
Alterantively you can use a [split list] s=3
Hi Danny, thanks for the answer, but i'm still a bit confused...can you later post an example to show that? Many thanks!
Hi Junfeng Wang!
That works perfect! Thanks a lot
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by