Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] bugs in Arrangement_2 (was Arrangement_with_history_2: precondition failure and patches)
Chronological Thread
- From: Efi Fogel <>
- To:
- Subject: Re: [cgal-discuss] bugs in Arrangement_2 (was Arrangement_with_history_2: precondition failure and patches)
- Date: Thu, 03 Apr 2008 10:50:05 +0300
Hi David,
Thanks for pointing out all these issues and for the patches you keep sending.
I've quickly looked at the patch and it seems correct. I guess one can provide a more efficient implementation using the same idea of comparing the y-coordinate of a point in one curve and a segment in the other, but advancing in both curves in parallel in a controlled manner.
We saw your posting from last week regarding the IO problem in the Arrangement_2 package. We are looking into it, and we'll try to give you a detailed answer soon.
David Keller wrote:
Hi,
You find a patch to fix a bug in the equality-comparison of polyline-arrangements as reported in my post on 03/14: The problem is caused by the segment-wise comparison of polylines which does not take into account that polylines with different representation may share the same graph. Maybe someone is interested to check its validity or even give a more efficient implementation.
I tried to hunt down the bugs observed in IO of Arrangement_2 reported in my last post. There are seemingly different inconsistencies in the current implementation:
1. Unbounded faces are not read correctly. See my post from 03/28 for
a reproducer.
2. CGAL/Arr_accessor.h (1037) in function clear_all() : The call
p_arr->dcel.delete_all() removes DCEL-entries in the current
arrangement. This leads to dangling pointers in Arrangement_2,
i.e. the fictitious face and the vertices (un_face, v_br, v_bl,
v_tr, v_tl). The function is called from
CGAL/IO/Arrangement_2_reader.h (107). From my understanding these
pointer members in Arrangement_2 are not set when reading an
arrangement leading to an uncontrolled behavior of the
reconstructed arrangement.
3. An empty arrangement (result of default constructor of
Arrangement_2) contains one fictitious face (actually 2 DCEL
entries), 4 fictitious vertices and 4 fictitious edges. The
CGAL/IO/Arrangement_2_writer.h writes 0 fictitious vertices, 4
fictitious edges and 2 faces. It is not possible to read an empty
arrangement with the current implementation (comment Line 22 in
examples/Arrangement_2/io.cpp for a demonstration).
Can somebody sketch a solution to these problems?
Thanks and best regards
David Keller
--
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
- Re: [cgal-discuss] bugs in Arrangement_2 (was Arrangement_with_history_2: precondition failure and patches), David Keller, 04/02/2008
- Re: [cgal-discuss] bugs in Arrangement_2 (was Arrangement_with_history_2: precondition failure and patches), Efi Fogel, 04/03/2008
Archive powered by MHonArc 2.6.16.