Hello,

What do you mean by filters? If you're talking about functions of CGAL

Point Set Processing (for example CGAL::grid_simplify_point_set()), some

of them reorder the input range, which means you loose the original

indices. That could explain why you're experiencing problems if you rely

on the original order.

There's a way to avoid altering the point set order using dedicated

property maps: the principle is that you create a range of indices

(trivial, just the ordered indices from 0 to N-1, N being your number of

points), and use a property map referencing the original range to

recover the right point/normal. That way, the functions that reorder the

input range will just reorder the range of indices and leave your

original point range unaltered (then you can just use the range of

indices to access the elements you want). You can see an example that

does that in Spatial Searching:

https://doc.cgal.org/latest/Spatial_searching/index.html#title12It may seem a bit tricky but in practice it's very handy.

I hope this helps :)

--

Simon Giraudot, PhD

R&D Engineer

GeometryFactory -

http://geometryfactory.com/Le 01/07/2019 à 15:21, cisant a écrit :

> Oh God!! Thanks for the answer!! It works very well if I don't use any

> filter. But, if I execute some filter on my point set after read the file

> with the XYZ coordinates, I can't write the color correctly.

>

> How could I know the index of a point in order to compare with the archive

> that my program already read? Maybe searching by the index, I'll be able to

> write the right color for the point.

>

>

>

> --

> Sent from:

http://cgal-discuss.949826.n4.nabble.com/>

--

You are currently subscribed to cgal-discuss.

To unsubscribe or access the archives, go to

https://sympa.inria.fr/sympa/info/cgal-discuss