algorithmic modeling for Rhino
As new data tree logic was introduced, I still have problems understanding it. I know (Ive read about it) that there is master and slave tree, but it remains unclear for me. Why outputting tree has 540 paths (like bottom one), but with order like in the top one (so path is formulated as one integer)....
I want to find closest point in each of 3 from bottom tree. {0} from top one with each {0;x} from bottom etc.
Tags:
I can't give a good explanation of the new default data matching behavior between mismatched trees - but in my experience there's almost no matching situation that can't be achieved with a little list manipulation. I used to do this with a lot of item duplication, and now the cross reference component makes it a fair bit easier.
In my experience, for predictable path behavior you always want your data tree structures to match. Trying to run a component with two non-matching structures basically never gives you usefully structured results.
In the above example, I would put both the grafted list of points and the curves you're dividing into a cross reference component. Then graft the A output of the cross reference so that the points you're searching from also have 540 matching branches.
In general, you can (usefully) match 1 item against 1 item, 1 item against N items, or N items against N items. The same applies for paths; you can match a flat list against a flat list, a flat list against a structure S, or a structure S against a matching structure S.
As to why GH handles the case of matching non-corresponding structures the way it does? only David can answer that...
oh interesting, that does seem like a bug. I should have tried it in GH before running my mouth :P
On further reflection, I don't think it's really accurate to call it a bug; it's the difference in tree matching between item-item and item-list.
Also, you'll note that in the first example you give above, even though the line component gives what APPEARS to be the expected structure, it's not really making a logical matching either.
I stand by my earlier statements; everything will go well so long as your tree structures and lists match 1:1, 1:N, or N:N. We can argue about the "right" implementation for an M:N situation but it's an ambiguous case... what works for one situation will surely be counter-intuitive for another.
If, as in the above example case, we have a structure where M = {A} and N = {A;B}, it's clear that we want the groupings to correspond from A : A. However if M = {A} and N = {F;G}... who knows what should happen. From the perspective of the component it seems to me there's effectively no difference between these two cases.
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
© 2025 Created by Scott Davidson.
Powered by