Hello!
I’m was looking for a way to apply a transformation to all lines in a DataTree. A simple way would be to iterate through all elements in the data tree and apply the transformation, but since the tree might contain different elements counts on each branch, this would be cumbersome. As an alternative I was exploring the AllData() method to get a list and apply the transformation to all elements. The problem is that I want to keep the elements with the Tree structure so I have to rebuild the Tree after the transformation. Is there a simpler way to do this without converting the Tree to List?
I was experimenting this but it doesn’t work.
diagonals.AllData().ForEach(delegate (Line line)
{
line.Transform(transform);
});