Model Geometry based on coordinates and node numbers

Hello,

Iam starting in grasshoper and i want to model a structure with coordinates.I hope someone can help me.

I have three lists: the first contains coordinates of nodes, the second contains node numbers, and the third contains lines names along with their corresponding nodes.

List 1 (coordinates):
0,0,0
0,1,0
0,3,4
4,3,5
5,4,1

List 2 (nodes):
1
2
3
4
5

List 3 (line number, nodeA, nodeB):
501, 2, 3
502, 1, 5
503, 4, 3
504, 1, 4
505, 3, 5

What i want is to model all the polylines corresponding to the nodes. Do this individuali for each line its not working, I have arround 1000 lines

Thank you in advance
Rui

this might be one way

the thing node number might be not necessarily progressive numbers and they don’t start from 0 make key/value fail-safe (otherwise you could just list item with i-1 and stuff…)

actually you could also just input the Panel with point coordinates directly as Points, because they are already in a good {x,y,z} format, like this:

model geometries based on lists of stuff.gh (13.3 KB)

Thank you so much! The value shearch is what i have missed :slight_smile:

And what command use if i only want to higlight for example the bar 204?

keep all the structure in red, but higlight in some way the bar 204

you can just use another key/value :slight_smile:


model geometries based on lists of stuff_Re.gh (16.3 KB)

be aware that Keys are sensitive to the type of value you are supplying, in this case they are integers, that’s why the content of the Panel (which is a string) needs to be passed through an Int first

1 Like

thank you!! :slight_smile: