Grasshopper

algorithmic modeling for Rhino

Importing points from txt and connecting them by lines

Hello, could you please help me with following problem? I have a comma separated txt file with point coordinates and I would like to import these points into grasshopper and connect them by lines from another comma separated txt file. I know how to import points (function Import coordinates), but I dont know how to connect them by lines if the only information I have about lines is the list of point numbers which should be connected. The txt file with point coordinates looks like:

-18,-36,-1000
-18,-34,-19.728
-18,-32,-17.603
-18,-30,-15.372
-18,-28,-13.121

...

And the txt file with line connections looks like:

1,2
2,3
3,4
4,5
5,6

...

Which means that I want to connect point 1 with point 2, point 2 with point 3 etc...

Both txt files are attached, thank you for the answer...

Views: 3273

Attachments:

Replies to This Discussion

Hello Filip,

this could be a way (text split component uses comma as separator, list item i=0)

 

best

alex

Thank you very much!

Filip

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service