How to connect each point from point cloud with a line

I have a point cloud with hundreds of points that I can import in Sketchup. All points are in the XY surface (Z=0). So far so good, but…
I would like to connect every point with a line to the next point from the file.
Is there a way skechup can do this automatically?
So first point- line- second point -line- third point - line- fourth point and so on.
The final result must be then a line connecting all the points.
Anybody can help?

There are some different extensions that can help with this. Look at TopoShaper from Sketchucation.

I’ve tried but didn’t found what I’m looking for. Now I’ve read something about Ruby code in Shetchup. Seems to be this is the way to go. But I don’t have any experience with this. (Have some knowledge about C code)
Is there somebody who would likes so write a few lines of code as a start? Would be very helpfull.
For example:
Read point - draw line - read next point…
Thanks in advance!

Sounds as though you need a mesh. If you post the point cloud, I will try to create one using Undet’s Feature Extraction Tool.

I’ve witten the following code in the Ruby code editor (found it on the net). But I get an error message:

Done running code. Ruby says: No such file or directory @ rb_sysopen - C:Points.txt (Line 8)

The code is:

I’m 100% sure the file “Points.txt” is on the correct location.

It works. He draws the line :grinning: :grinning:
Only thing that I’ve changed is two times “\” instead of ones in the filename. Don’t know why but it works. I still have an error at the end.

1 Like

Would you post the point cloud, “Points.txt”? I’d like to take a look at the format.

If you are truly looking to draw a line from point to point sequentially, take a look at the extension PointGadget. This extension will import points and, after import, one of the features is to draw a line from point to point in order of import.

2022-11-05_06-49-51 (1)

Hi all,
Thanks a lot for all the really good answers. Thanks ChrisDizon for the PointGadget. This was exactly what I needed. Now I don’t need the Ruby code anymore.
To answer the question from 3DxGFD:
I tested the Ruby code with a textfile that I created with notepad. The text file looks like:

1 Like

Thank you. I wasn’t sure whether there was any required formatting on the .txt side other than comma separation. Easy peasy.