From afcded0ffe94e36ce31a11b2f18d1815723fcf7d Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Sat, 6 Dec 2003 04:59:22 +0000 Subject: [PATCH] added some preconditions in the do_intersect method; these preconditions make sure that I don't have data for which I haven't written the code yet --- .../include/CGAL/Segment_Voronoi_diagram_2.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Packages/Segment_Voronoi_diagram_2/include/CGAL/Segment_Voronoi_diagram_2.h b/Packages/Segment_Voronoi_diagram_2/include/CGAL/Segment_Voronoi_diagram_2.h index 9cac23f649a..a968b3bc940 100644 --- a/Packages/Segment_Voronoi_diagram_2/include/CGAL/Segment_Voronoi_diagram_2.h +++ b/Packages/Segment_Voronoi_diagram_2/include/CGAL/Segment_Voronoi_diagram_2.h @@ -687,7 +687,24 @@ protected: { std::pair res = geom_traits().do_intersect_2_object()(p, q); + +#if 1 + CGAL_assertion( res.first <= 4 && res.second <= 4 ); + + if ( res.first == 2 ) { + CGAL_assertion( res.second == 2 ); + } else if ( res.second == 2 ) { + CGAL_assertion( res.first == 2 ); + } + + if ( res.first == 3 ) { + CGAL_assertion( res.second == 3 ); + } else if ( res.second == 3 ) { + CGAL_assertion( res.first == 3 ); + } +#endif if ( res.first < 2 && res.second < 2 ) { return false; } + return (res.first != 3); }