Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Arrangement_with_history_2: precondition failure and patches
Chronological Thread
- From: David Keller <>
- To:
- Subject: Re: [cgal-discuss] Arrangement_with_history_2: precondition failure and patches
- Date: Fri, 28 Mar 2008 20:28:26 +0100
Hi,
Thank you for the fast response. I have just discovered another problem with IO of Arrangement_2: Unbounded and fictitious faces are apparently not correctly reconstructed when read. The problem is illustrated on a slightly changed io.cpp from examples/Arrangement_2/io.cpp which you find attached to this mail.
Kind regards,
David Keller
wrote:
Hi David,
Thank you for all this. The first 2 patches have been already applied to the internal release and will be included in the next public release.
I was able to reproduce the problem in the 3rd item below with Exact_predicates_exact_constructions_kernel and even with arrangement (without history). We'll are looking into it.
Regarding your question, equal_2_object() should return true if and only if the graphs of the curves are the same. It's a good point, and we'll add it to the documentation.
Quoting David Keller
<>:
Hi,
I have some issues with Arrangement_with_history_2:
1. operator== in Arr_with_history_2_functions.h misses a return value
for the case of non-self-assignments. Attached is a patch
(arr_with_hist_return_value.patch) which fixes the problem for me.
2. If VERBOSE is defined there are several issues with
function-name-lookups in derived objects leading to compile-time
errors (at least for gcc 4.0 and later). Attached is a patch
(sweep_line_debug.patch) to fix this problem.
3. Inserting an overlapping but "not equal" curve in an
Arrangement_with_history_2 leads to a runtime-error (precondition
failure in Arrangement_2_functions.h at line 1579). Attached is a
reproducer (arr_with_history_overlapping_curves.cpp). What should
traits::equal_2_object() implement here: Equal graph or equal
representation? The case may actually be rare. However, I'm not
quite sure if the current implementation gives the desired
behavior. If so, it would possibly be a good choice to mention
this in the documentation.
Thanks and kind regards
David Keller
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
//! \file examples/Arrangement_2/ex_io.cpp // Using the arrangement I/O operators. #include "arr_rational_nt.h" #include <CGAL/Cartesian.h> #include <CGAL/Arr_segment_traits_2.h> #include <CGAL/Arrangement_2.h> #include <CGAL/IO/Arr_iostream.h> #include <fstream> #include "point_location_utils.h" typedef CGAL::Cartesian<Number_type> Kernel; typedef CGAL::Arr_segment_traits_2<Kernel> Traits_2; typedef CGAL::Arrangement_2<Traits_2> Arrangement_2; int main () { // Construct the arrangement. Arrangement_2 arr; construct_segments_arr (arr); std::cout << "Writing an arrangement of size:" << std::endl << " V = " << arr.number_of_vertices() << ", E = " << arr.number_of_edges() << ", F = " << arr.number_of_faces() << std::endl; // Write the arrangement to a file. std::ofstream out_file ("arr_ex_io.dat"); out_file << arr; out_file.close(); // Read the arrangement from the file. Arrangement_2 arr2; std::ifstream in_file ("arr_ex_io.dat"); in_file >> arr2; in_file.close(); std::cout << "Read an arrangement of size:" << std::endl << " V = " << arr2.number_of_vertices() << ", E = " << arr2.number_of_edges() << ", F = " << arr2.number_of_faces() << std::endl; if ( arr.number_of_unbounded_faces() != arr2.number_of_unbounded_faces() ) { std::cerr << "Number of unbounded faces is not equal" << std::endl; return (-1); } return (0); }
- Arrangement_with_history_2: precondition failure and patches, David Keller, 03/14/2008
- Re: [cgal-discuss] Arrangement_with_history_2: precondition failure and patches, efif, 03/15/2008
- Re: [cgal-discuss] Arrangement_with_history_2: precondition failure and patches, David Keller, 03/28/2008
- Re: [cgal-discuss] Arrangement_with_history_2: precondition failure and patches, efif, 03/15/2008
Archive powered by MHonArc 2.6.16.