Subject: CGAL users discussion list
List archive
- From: Pol Monsó Purtí <>
- To:
- Subject: Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2
- Date: Tue, 19 Jul 2016 16:34:14 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:l8KRRRcjXbaqE0A8l6RVPhOnlGMj4u6mDksu8pMizoh2WeGdxc++Zx7h7PlgxGXEQZ/co6odzbGH6+a9ACdfvN6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQAbFhi3DwdpPOO9QteU1JXvkb3rsMKOKyxzxxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Loc8dVdW/D6Y7ggVu4fSy83Nng8osztrxjKCwWVoWANV30f1RtODQ+C5x7zWtL9szDxq/FmixScJtD8GLAoRSy5veAsUw7tkC5BNjgj8WiRhNY3l7NeuBvmphpxxMnfb4iRcfZ/ZajAZshJeW0UVclYU2lNA5i3cpAUJ+sHJ+dR6Yfn9HUUqh7rPQ6oTMbozCTTzkfrx7G/m7AlFRzA1UomGMwHmHvRpdTxcqwVVLbmn+Hz0TzfYqYOin/G44/Sf0V5rA==
Thanks!
I've got it:CGAL::Object o = vd.dual().dual(e.dual());
K::Ray_2 r;
if(CGAL::assign(r,o))
std::cout << "assigned" << std::endl;
On Tue, Jul 19, 2016 at 4:25 PM, Sebastien Loriot (GeometryFactory) <> wrote:
The halfedge has a dual method that will gives you the Delaunay_edge you need to call the function I mentioned.
http://doc.cgal.org/latest/Voronoi_diagram_2/classCGAL_1_1Voronoi__diagram__2_1_1Halfedge.html#a55c12984864f6e688bc775220633ec63
Note you can access the underlying triangulation by calling Voronoi_diagram_2::dual();
http://doc.cgal.org/latest/Voronoi_diagram_2/classCGAL_1_1Voronoi__diagram__2.html#acd0aca0a4b4666c615e2902f71134cd1
Sebastien.
On 07/19/2016 04:21 PM, Pol Monsó Purtí wrote:
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)< <mailto:>> 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
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Voronoi unbounded halfedge to ray_2, Pol Monsó Purtí, 07/19/2016
- Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2, Sebastien Loriot (GeometryFactory), 07/19/2016
- Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2, Pol Monsó Purtí, 07/19/2016
- Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2, Sebastien Loriot (GeometryFactory), 07/19/2016
- Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2, Pol Monsó Purtí, 07/19/2016
- Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2, Pol Monsó Purtí, 07/19/2016
- Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2, Pol Monsó Purtí, 07/19/2016
- Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2, Sebastien Loriot (GeometryFactory), 07/19/2016
- Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2, Pol Monsó Purtí, 07/19/2016
- Re: [cgal-discuss] Voronoi unbounded halfedge to ray_2, Sebastien Loriot (GeometryFactory), 07/19/2016
Archive powered by MHonArc 2.6.18.