Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] crop infinite edges of additive weighted voronoi diagram.

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] crop infinite edges of additive weighted voronoi diagram.


Chronological Thread 
  • From: Sebastien Loriot <>
  • To:
  • Subject: Re: [cgal-discuss] crop infinite edges of additive weighted voronoi diagram.
  • Date: Thu, 14 Jan 2021 13:15:34 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:oZgIJxY5+FN3Pkh23Jidwqb/LSx+4OfEezUN459isYplN5qZrsW6bnLW6fgltlLVR4KTs6sC17OH9fi4EjRaqdbZ6TZeKcMKD0dEwewt3CUYSPafDkP6KPO4JwcbJ+9lEGFfwnegLEJOE9z/bVCB6le77DoVBwmtfVEtfre9FYHdldm42P6v8JPPfQpImCC9YbRvJxmqsAndrMYbjZZmJ6or1hfFvnREd/hIyWh1IV6fgwvw6t2/8ZJ+8Slcoe4t+9JFXa7nY6k2ULtUASg8PWso/sPrrx7DTQWO5nsYTGoblwdDDhbG4h/nQJr/qzP2ueVh1iaUO832Vq00Vi+576h3Uh/oiTwIOCA//WrKl8F/lqNboBampxxi347ZZZyeOfRicq/Be94RWGxMVdtTWSNcGIOxd5YBAfQPPehYrIfzqVUBohS8CgawC+3i0SNIi33s0KEmz+gsHwPL0Qo9FNwOqnTUq9D1Ob8PX++r16bH1y7Db+9X2Tjj7ojDbxYvofaWXbJxdsrR1VQkGgTejlWUrozlJTKV1uMRs2SB6upgUfmii2Eiqw5rozivwt0ghZXOhoIQ013J8zhyz4kpK9OiUkF7fcKkH4VKtyGcL4Z7X8AvTW9otig1yLALt4O2cSoKxZko2xLSduCLfoeU7x79VOifITl1iXx4dbywmhu+7FStx+/yW8S0zFtEoCRIn9/RvX4D0BzT79KISvp7/kq51jaP1hzT6uFZIU8vj6bUN5khwrsompoVq0vMBTT5mEHog6OMakok/e2o5uL6abvlvp+RL5F4hh36P6g0mcGyAf40PhYQU2SG4+ix1LLu8VXnTLpQkvE6j6zUv47GKcsBo6O1HRNZ3psm5huxFTiqzsgUkHwaIF1bZB2Kj43kN0/VL/zkEfuyhk+jnCpryvzaO7DsApHAIWXNkLrnYL1z8VRTyBApwtBa/59UCq8OIPb0WkLpsdzXFB45Mwitz+fpEtVxy5oSWWyPD6KWKq/SvliI5uUgI+mIeoAZoiryK/8g5/L2jH85n0ESfbWx0JcJdHy1Gu5qLkaZbHb2nNsND3oGshA+QeHlkFGCVCRcZ3e2X6Iy/DE7D4emAJ/YRoCph7yBxia7HppKZmxcD1CMFWzld4qBW/gWaSKSJtVtnSADVbikU4Mhzw2htBfmy7p7KerZ4jEXtZ3529hx/uHciBAy9SdoAMSAyGGNVHp5nngIRj8zxKBwu1ZxylaF0ahigvxXD8Zf5/1TUlRyCZmJxONzD5X+WxnKY8ySYFegWNSvRz8rHfwrxNpbWEt3Es6+jx3Flw6tGb4Si/TfH5gz6KPbwz70I+5yzn/H0O8qiFxwEZgHDnGvmqMqr1ubPIXOiUjMz//2J5RZ5zbE8SK49UTLpFtRCVciXqDMXHRZbUzT/4yguxHyCoS2ALFiCTNvjM6PLqwQN4/shFRCAej5YZHQPj73lGC3ChKFgLiLadiyIjRP7GDmEEEB1jsr0zODPAk6CD2mpjuHXjNrHFPrJUjr9LsnpQ==

What I did here might be helpful:

https://github.com/sloriot/cgal-voronoi-cropping

It crops the entire Voronoi diagram to a bounding box.

Look at test/main.cpp for a c++ example.

Best,

Sebastien.

On 1/14/21 12:29 PM, VSav ( via cgal-discuss Mailing List) wrote:
Hi,
I want to create bounding boxes for each cell of AW-voronoi diagram. I am
able to retrieve the vertices of bounded cells using iterator and halfedges.
However, for unbounded cells I am not able to retrieve ubounded edge info
except for the source of the unbounded half edge. There was some discussion
related to this problem but the solution to that post does not solve my
problem. I tried this
for(Unbounded_faces_iterator f = VDA.unbounded_faces_begin(); f !=
VDA.unbounded_faces_end(); f++)
{
Ccb_halfedge_circulator ec_start = (f)->ccb();
Ccb_halfedge_circulator ec = ec_start;

do {
if(!ec->has_source() || !ec->has_target()){
* Kernel_Exact::Object_2 o = make_object(ec);
Kernel_Exact::Ray_2 r;
if(assign(r,o)){*
return true;
}
}while ( ++ec != ec_start );
}
when i try the above code the assign also returns false.
Is there any direct way to convert halfedge to a ray in case of Voronoi
adapter class or any other way i can receive the edge information that is
sufficient to convert it to ray.
If i can convert it to a ray then i can find its intersection with the
iso_rectangle and crop the unbounded edge.
Even a little direction towards the solution would be really helpful.

Thanks,
VSav




--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




Archive powered by MHonArc 2.6.19+.

Top of Page