import rhinoscriptsyntax as rs
from ghpythonlib import treehelpers as ght
y = [(20,-10,0), (50,-10,0), (80,-10,0)]
a = rs.CurveClosestPoint(x, ght.list_to_tree(y))
(sorry for stupid question):
using list_to_tree or tree_to_list, it is not possible to have the same result as the selected def?
so if I understand correctly there is no way to use List_to_tree or Tree_to_list in Py?
ps but one question: for sure it’s the way i used it that is wrong, but if they exist List_to_tree or Tree_to_list in Py means they can be used or wrong?
No, no, these functions are explicitly for use in GHPython, but they are mostly for converting input trees to nested lists and/or nested lists to output data trees.
If you want to call a certain function, you just need to provide it the expected data type. You can’t pass it a data tree, if the function requires a single point, like in your example above.