algorithmic modeling for Rhino
Hi All,
Am new to grasshopper & am tearing my hair out trying to rearrange a data tree, so I'm hoping someone can help! It's all the more frustrating because I feel this should be easy but it's somehow not...
I have point data in twelve branches as per the attached shot. What I want to do is rearrange the data so that it becomes 47 branches of 12, and the matching logic will be to take the first in each branch, then the last, then the second, then the second last etc.
You can see that each branch has a different length - the length of these branches will/could change depending upon parameters within the gh definition.
The logic as I see it would be to take all index = 0; cull the list, reverse it, then repeat until it's all done, except there is no looping component. Do I need to learn some VB script or is this possible in the path mapper? (I tried to look at this, but couldn't see how the syntax applied to my data tree).
Any hints on how to approach it?
Tags:
oh,
i miss understood him, as it seems.
I thought he wants something like this:
path with 12 items: 1,2,3,4,5,6,7,8,9,10,11,12
rerange with: 1,12,2,11,3,10,4,9,5,8,6,7
I do not know how to do it mathimatically, but i got an drawing soultion :-)
Is there a easier way to get somthing lik this, Danny?
Best Regards
DeDackel
Sorry, you are right I missed a crucial sentence. I'll have another look.
What happens to the Nulls? are they included in the list
Thanks Danny & DeDackel!
The nulls are culled once the sort is done. To give a bit of context the script is trying to generate cross bracing lines @ fixed centres across a series of curves of descending length. If I do a straight flip matrix then the cross bracing is out of whack up one end of the series, so I thought it best to start the bracing from either end & the bracing elements in the centre would be roughly horizontal, but shortest.
I've figured out how to do it so that the numbers are equal for the time being... (see attached).
EDIT: wow nice one Danny, thanks! What is the component with the hazmat like icon?
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by