Python in Rhino

Hi guys,

I am trying to extract the x,y,z points of a curve into python. Attached you can find Grasshopper setting for this.
As soon as, I print the incoming points I can actually read all the points of my curve.

But how can I take just the first set of x,y,z points? x[0] indicates all the x values of my curve points and x[1] all the y values. x[0][0] doesnt work, since x[0] is defined as float.

Hi Hyungjoo,

not sure if I understand your question properly, but try:
in Python compoent, change "x " to LIST ACCESS and type hint to “point3d”, and then
if you print x[0], you got first set of x,y value of points.
and if you printx[0][0], you got x value of the first point.

1 Like