alphashapes edges into file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

alphashapes edges into file

Andruit
Hello,
I have a set of points and use alphashapes to get the boundary of these points.

as.get_alpha_shape_edges(std::back_inserter(edges),
                           Alpha_shape_3::SINGULAR);

But how can I write the edges into a file that I can have look on them in grass
gis for example?


for(it = edges.begin(), it != edges.end(); ++it)
{
cout << *it << endl;
}

does not work.

Does anybody know how to do it??

Thanks

Andi
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Reply | Threaded
Open this post in threaded view
|

Re: alphashapes edges into file

Manuel Caroli
Hi Andi,

edges are represented as a triple of a cell and two indices determining
two vertices in this cell. Thus they don't contain any functionality on
their own.

The easiest solution that comes to my mind is to get the two points from
the edge:
Point p = (*it).first->vertex((*it).second)->point();
Point q = (*it).first->vertex((*it).third)->point();

and then output them in whatever format you want.

Hope this helps

Manuel


[hidden email] wrote:

> Hello,
> I have a set of points and use alphashapes to get the boundary of these points.
>
> as.get_alpha_shape_edges(std::back_inserter(edges),
>   Alpha_shape_3::SINGULAR);
>
> But how can I write the edges into a file that I can have look on them in grass
> gis for example?
>
>
> for(it = edges.begin(), it != edges.end(); ++it)
> {
> cout << *it << endl;
> }
>
> does not work.
>
> Does anybody know how to do it??
>
> Thanks
>
> Andi

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Reply | Threaded
Open this post in threaded view
|

Re: alphashapes edges into file

Andruit
In reply to this post by Andruit
Thanks a lot it worked, but I have a general question concerning alphashapes...

But  i think it s better to open a new thread.

Thanks

Andi
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss