How to import line segments into CloudCompare

Feel free to ask any question here
Post Reply
shayanni
Posts: 2
Joined: Tue Nov 09, 2021 5:48 pm

How to import line segments into CloudCompare

Post by shayanni »

I have a c++ program that creates some line segments. For each line segment, I have the vertices ([1 x y z], [2 x y z], [3 x y z]) and the topology (1-2, 1-3) which says how the vertices connect to each other. How I can import this into CloudCompare as a polyline object or line segment to visualize it. I can write it into the OFF format but off format expects faces to visualize them. Is there a simple way or a simple format to do this instead of using DXF or SHP file? Because I don't know how to export my data into dxf or shapefile.

I appreciate any help.
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to import line segments into CloudCompare

Post by daniel »

We have the '.poly' format, where you just need to list the vertices one after the other (one by line). CC will implicitly connect them.

And if you leave a blank line, you 'break' the polyline, and therefore describe several parts in one file.
Daniel, CloudCompare admin
shayanni
Posts: 2
Joined: Tue Nov 09, 2021 5:48 pm

Re: How to import line segments into CloudCompare

Post by shayanni »

Thank you Daniel. So this is "Salome Hydro polylines" which I was not aware of.
Post Reply