I used a python code in GH of Rhino 7 to read point files and export 3d points tree.
In the code, I used the componenet “ghpythonlib.treehelpers.list_to_tree” to transfer nested lists of poits into tree for next steps.
However, when I use the same code in GH of Rhino 8, the output is a list of “Rhino.Collections.Point3dList” which I can’t use in GH.
How can I fix this issue?
Thank you all so much!
from ghpythonlib import treehelpers as ght
from Rhino.Collections import Point3dList
from Rhino.Geometry import Point3d
l1 = Point3dList()
l1.Add(Point3d(0,0,0))
l1.Add(Point3d(0,0,1))
l1.Add(Point3d(0,0,2))
l2 = Point3dList()
l1.Add(Point3d(0,0,0))
l2.Add(Point3d(0,0,1))
l2.Add(Point3d(0,0,2))
a = ght.list_to_tree(
[ list(l1), list(l2) ] #<- Cast each Point3dList to standard list
)