Created a list of vectors in python

Hey,

I currently need help with Python.
I created a pointcloud in Rhino and transfered it into Grasshopper. I searched for every point in the pointcloud the nearest points. I wrote a script in Python to calculate some vectors from this point to every nearest points.

I saved the results in a list of strings.
Now I want to calculate the cross product from two vectors which are next to each others.
But I can’t access the list.
How can I save the results in a list of vectors so that I can use it for my next steps.

And its my first time that I use Python, so how can I define a function to calculate the cross product from a list of vectors.

The following picture shows my script. x is a list of points, y a tree where the branch contains the information of the nearest points, u is the number of the points, and z includes the number of nearest points.


There’s a lot going on there that would be easier to understand with the Grasshopper file (preferably using a GHPython component, as most people probably aren’t using Rhino 8 yet).

But this part at least can be solved using Vector3d.CrossProduct.

here is the Grasshopper file and the associated file with the geometry from Rhino

zylinder 2.gh (40.5 KB)
rhino Zylinder.3dm (1.6 MB)