Hi Scott,
Thanks for the reply, unfortunately no - using your example above what I wanted was effectively first branch of Tree 1 applied to all sub branches of the first major branch in tree 2.
Something like this:
1 + 4
1 + 8
1 +16
Then
2 + 32
2 + 64
2 + 128
I was actually just watching David’s videos on data trees- I thought the relative items might work for me but not quite right.
I did actually solve it by duplicating my smaller set of input data, matching the tree structures then doing the operation. But hoping there is a slightly more elegant way.
Ill keep working through David’s videos and if i find a better way ill post.
Thanks Scott,
Works in the number example, but not working for the application I was chasing - reason being that my second tree is pairs of points (apologies, i didn’t make this clear in my earlier post).
I am using a shatter component, to cut curves with sets of two intersections - and i need to retrieve the middle piece of the curve.
My end goal is to output a closed shape for each of the intersections with the input curve - as shown in I1 through I5 below:
Ideally, i need to split the first curve, 5 times, with each resulting pair of intersections, then my second curve with each of its intersecting pair etc.
I can do this by duplicating my input curves 5 times - and feeding to the shatter component like so:
Beautiful!
I think I need to get the pufferfish addon
Thanks alot for that! There is always a better solution!
For future reference, would there be a way to force the tree computation, dynamically, so that you could always apply the first branch of Tree 1, to all sub branches of Tree 2? I could do it with a loop in VBA easy enough - just wondered if there is some native component that would be easy for people to use?
The way I would typically handle this with native components is similar to your “duplicate” solution, only I’d use “Longest List” — it saves you the step of needing the List Length (and duplicate will occasionally get you into trouble). It can also handle multiple sets of data that need to be “duplicated” in parallel.
If we’re opening up to plug-in based solutions, I’d look at @dave_stasiuk’s tree sloth — the “Propagate Ancestors” component handles automatically duplicating the data in one higher-level tree to match the structure of a lower level tree.
Excellent,
Thank you Andrew, thats exactly what i was after - I finished it yesterday, still using duplicate but ill likely either adopt the puffer fish components (if I get what i need, as i do need the individual curve lengths, as well as the area) - or failing that try the longest list and match the trees (will figure that out regardless, for future reference).
This is for a flood modelling plugin related to failure of dams I am writing - Im interested to see if I can calculate ‘time steps’ with modified data flowing back through the script after each step. Not sure if thats possible yet but could be fun to try.