Select and edit point coordinate in a point list with python

grasshopper
(Collins SL) #1

Hi,

I am wondering how I can select the element in the point list and delete the points I want with python script. I tried to use x(1) x{0;0;0}(1) or something like these but they all went wrong finally.

I have totally messed up the data structure in grasshopper. I have no idea how I can call the coordinate s and points.
Could anyone help me?

Many thanks!!

(Collins SL) #2

Oh god I found out the input datalist is GUID and I need to use create3Dpoint to make them points.

Now I am just wondering how to filter these points by coordinates, maybe just create a new point list:sweat_smile:

(Collins SL) #3


I am encountering a new problem. I can only select the X, Y or Z column in the list. I cannot select any point alone.

(Graham) #4

Hello. Do you need to select List Access on entry x ? That way you should be able to select eg the 13th pt x[12]

(Collins SL) #5


Hi Graham. I also want to do it in this way. Buy you can see when I call x[2] it just return the 3rd column of the whole array. And I tried x[0][1] or x[1][0] it shows float object is not subscriptable

(Collins SL) #6

Hi Graham. I also want to do it in this way. But you can see when I call x[2] it just return the 3rd column of the whole array. And I tried x[0][1] or x[1][0] it shows float object is not subscriptable

(Collins SL) #7

:joy:

#8

Set to list access to get the third point with a=x[2]

1 Like
(Collins SL) #9

Bogdan thank you so much. Your answer perfectly solved my problem