@Federico_Giacomarra wrote:
Hi,
I’m trying to reorder the points in a tree according to another order (always coming with the same tree structure).
Basically I calculate the relative position of the points ( of a rectangle ) to the normal plane and then I use the signs (of the x and y coordinates) to get a new order.
for some reason the last part is not working, I post the code in case someone can help:import Rhino.Geometry as rg import System new_tree = gh_tree[System.Object]() temp_list=[] for i in range(tree.BranchCount): path = tree.Path(i) temp_l = [ tree.Branch(i)[j] for j in order.Branch(i)] new_tree.AddRange(temp_l,path)thanks!
Posts: 1
Participants: 1