Data Matching Tree

unhandled

#1

Hi,

For confirmation and generalisation.
In this simple situation, the line component is matching points placed into 2 trees A and B.
A possesses the following branches:
{0;0;1}
{0;0;3}
B possesses the following branches:
{0;0;0}
{0;0;1}

The line component matches the first branch from tree A with the first branch from tree B. And the second branch from tree A with second branch from B regarless of the fact that the first branch of A has the same path as the second branch from B.

Can this be generalized ?
In other words, that matching at the branch level depends ONLY on the order in which the branches appears in the list of tree paths.

Thanks !
Jean


Tree with same branch count but different path mapping
(Rickson) #2

This is a great resource.

grasshopper primer


#3

In other words, that matching at the branch level depends ONLY on the order in which the branches appears in the list of tree paths.

If the parameter accesses are not tree type, you can expect the branches to be related in order and not by path. It depends on the implementation, but I think the usual thing is not to worry about paths if the accesses are not of the tree type.


#4

Just for clarification.
By that I understand that, if the components performing the matching are not of the type found in Set->Tree (or the merging of 2 outputs into a volatile parameter) then the path is ignored and it is the order in which the branches appears in the list of tree paths that determines the matching.

Thanks Dani !


(David Rutten) #5

This is correct. Data is matched item-by-item and branch-by-branch in order, unless this default behaviour is specifically overridden by the component. If you have a component operating on two inputs, both of which provide four branches (\{0;0\},\{0;1\},\{1;0\},\{1;1\}) and (\{0;0\},\{1;1\},\{2;2\},\{3;3\}) then they will be matched like so:

\{0;0\} \leftrightarrow \{0;0\}
\{0;1\} \leftrightarrow \{1;1\}
\{1;0\} \leftrightarrow \{2;2\}
\{1;1\} \leftrightarrow \{3;3\}

the fact that \{1;1\} occurs in both trees is irrelevant.