Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2
  • Date: Tue, 19 Jul 2016 15:23:40 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:UXzMZxDqcvH4QXE1SSCGUyQJP3N1i/DPJgcQr6AfoPdwSP7+r8bcNUDSrc9gkEXOFd2CrakV06yL6uu9BiQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd+KyZnunL3ts7ToICxwzAKnZr1zKBjk5S7wjeIxxbVYF6Aq1xHSqWFJcekFjUlhJFaUggqurpzopM0roGxsvKcq+MdEFKn7ZK8lVqdwDTI8Mmlz6te4mwPESF7F3XYWW34KkxdOSyzC9hD9Qt+xnSb9s+dhwji0NMbqSqolGH7qu7xvTwXpjztBMjoR/2Tei8g2h6Ve9kHy7ydjypLZNdnGfMF1ebnQKIsX
  • Organization: GeometryFactory

This function should do what you want:

http://doc.cgal.org/latest/Triangulation_2/classCGAL_1_1Delaunay__triangulation__2.html#a0f9dc798a43693e646e166718a0a0a82

here is how it is used in Delaunay_triangulation_2::draw_dual()

Finite_edges_iterator eit= this->finite_edges_begin();
for (; eit != this->finite_edges_end(); ++eit) {
Object o = dual(eit);
typename Geom_traits::Line_2 l;
typename Geom_traits::Ray_2 r;
Segment s;
if (CGAL::assign(s,o)) ps << s;
if (CGAL::assign(r,o)) ps << r;
if (CGAL::assign(l,o)) ps << l;
}
return ps;

Sebastien.

On 07/19/2016 03:05 PM, Pol Monsó Purtí wrote:
Dear all,

How should I convert a voronoi is_ray() to ray_2 ?

I've found this old topic
<http://cgal-discuss.949826.n4.nabble.com/Question-about-method-of-dealing-with-the-unbounded-half-edge-in-Voronoi-diagram-2-td2019585.html>
but the links have rot, and it suggests a better alternative than
buildling it up from the top-bottom sites.

Cheers!

Pol







Archive powered by MHonArc 2.6.18.

Top of Page