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: Pol Monsó Purtí <>
  • To:
  • Subject: Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2
  • Date: Tue, 19 Jul 2016 16:21:00 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:50isXh0gNeEKd4UBsmDT+DRfVm0co7zxezQtwd8ZsegfKvad9pjvdHbS+e9qxAeQG96Ks7QZ0qGJ6ejJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL2PbrnD61zMOABK3bVMzfbWtXNOLxJvtn8mJuLTrKz1SgzS8Zb4gZD6Xli728vcsvI15N6wqwQHIqHYbM85fxGdvOE7B102kvpT4r9Ze9T9Nsach69JYSve9OL8pSKRRSjUgKWE8osPx8gLSSBOGoXoaXGJRmRVBB03J7QrxQ4zq4Rf94+Fy0S3fMcztRq0vQhyj6b1qQVnmknQpLTk8pVnQjoRVi6RAO1qZugZjRsaAZIWIMvM4eKTDdPsVQGNAWoBaUCkXUdD0VJcGE+dUZbUQlIL6vVZb9RY=

Thanks Sebastien,

If I understood your example correctly, an alternative would be to use the voronoi's delaunay vd.dual() instead and traverse its edges to obtain the voronoi lines/rays/segments.

It isn't possible to do it directly with the voronoi? I already have the halfedge whose ray/line I want. They ray/line/segment should already be defined somehow.







On Tue, Jul 19, 2016 at 3:23 PM, Sebastien Loriot (GeometryFactory) <> wrote:
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





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






Archive powered by MHonArc 2.6.18.

Top of Page