algorithmic modeling for Rhino
I've always struggled with combining data trees with a different levels of branches. Usually I'm able to get Grasshopper to do what I want eventually, but I always feel like there is probably a better way.
For example say I want to take a collection of curves, and divide them over their length and then draw vertical lines from each division point to the same height as the length of the original curve. I often end up with a situation like this:
So I have one tree of points with the structure {A;B;C} and a tree of lengths with the structure {A,B}. B identifies the curve, and C identifies the division point on the curve. I want to match each curve length with each point from the same curve, but I don't want to flatten the tree of points as later I might need to know the order of points.
Here's what I end up doing most of the time. I trim the points tree from {A,B,C} to {A,B}, find the number of point at each branch, repeat the curve lengths using this number, and finally branch the curve lengths to the same {A,B,C} structure.
Yet this method does't work if I want to say match a {A,B} tree to a {A,B,C,D,E,F} tree, where I'd want to match every item in the two trees where A=A and B=B. Is there a simpler way to do this?
- Eric
Tags:
In the case you show gh knows to match the list as they are the same just one has more paths. It will work because of longest list rules.
however if you want them to look the same you can change the principle data or simplify the data.
Is there a way to tag discussions into our own pages because I know I am going to want to refer back to this discussion at some point in the future!
I use the data viewer loads now to see what's going on. This has helped a lot but I still feel like I am guessing on data structures most of the time.
I've had a few instances now where I have sets of points with several branches and I want to select points across branches in 3's or 4's for inputs as mesh face vertices. I end up doing this long handed with ListItem or my last effort was using a VB component.
I like to use this site. http://www.pearltrees.com/
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