Importing polylines with properties

Feel free to ask any question here
Post Reply
croman
Posts: 1
Joined: Fri May 29, 2020 1:50 pm

Importing polylines with properties

Post by croman »

Hi,

I am importing polylines with a .poly file as sets of points with a blank line between them.

X Y Z
X Y Z
X Y Z
X Y Z

X Y Z
X Y Z
X Y Z

X Y Z
X Y Z
X Y Z

Can I also encode line properties (width, color) in the file? That would be really helpful. I have too many lines to edit the properties individually after they are loaded. Or, is there another file type that I can use? I'm generating the .poly file myself in Matlab or Python.

Thanks

Chris
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Importing polylines with properties

Post by daniel »

Nope, this format is super simple.

And for now it's the only 'open' format that allows to import polylines in CC. Otherwise you would have to use DXF but that's not easy to generate (and quite heavy).
Daniel, CloudCompare admin
phoenix_vishal
Posts: 1
Joined: Tue Jan 17, 2023 5:17 pm

Re: Importing polylines with properties

Post by phoenix_vishal »

Hey,

I have a txt file of the format:

X Y Z
X Y Z
X Y Z

I force change the extension to .poly, but I get the following error: "an invalid polyline (single vertex) will be ignored"

I think I'm doing something really stupid because I'm a novice in this area. Any ideas?

Vishal
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Importing polylines with properties

Post by daniel »

Make sure there's no blank line. A blank line is interpreted as a separation between 2 polylines.
Daniel, CloudCompare admin
Post Reply