From 468b0f162ac4ed8540e76fe073da67ee2e19bb62 Mon Sep 17 00:00:00 2001 From: Shai Hirsch Date: Tue, 3 Jul 2001 12:49:04 +0000 Subject: [PATCH] Bug fix by Yevgeni. --- .../include/CGAL/Arr_polyline_traits.h | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/Packages/Arrangement/include/CGAL/Arr_polyline_traits.h b/Packages/Arrangement/include/CGAL/Arr_polyline_traits.h index 7884d553778..14e386560cf 100644 --- a/Packages/Arrangement/include/CGAL/Arr_polyline_traits.h +++ b/Packages/Arrangement/include/CGAL/Arr_polyline_traits.h @@ -8,11 +8,12 @@ // // ---------------------------------------------------------------------- // -// release : -// release_date : 1999, October 13 +// release : $CGAL_Revision: CGAL-2.3-I-44 $ +// release_date : $CGAL_Date: 2001/03/09 $ // // file : include/CGAL/Arr_polyline_traits.h -// package : arr (1.03) +// package : Arrangement (1.77) +// maintainer : Eyal Flato // author(s) : Iddo Hanniel // coordinator : Tel-Aviv University (Dan Halperin ) // @@ -709,8 +710,18 @@ public: if (lexicographically_xy_larger (i_seg.source(),pt)) { p1=i_seg.source();} else { - p1=pt;} - + // p1=pt; + // Modified by Eug + // Performing vertical ray shooting from pt. + // Finding the intersection point. We know by now + // that there is exactly ONE point. Assinging this + // point to p1. + Point ap1( pt.x(), i_seg.source().y() ); + Point ap2( pt.x(), i_seg.target().y() ); + Segment_2 vertical_pt_x_base( ap1, ap2 ); + Object i_obj = intersection( vertical_pt_x_base, i_seg ); + assign( p1, i_obj ); + } found = true; } } @@ -762,8 +773,18 @@ public: if (lexicographically_xy_larger (i_seg.source(),pt)) { p1=i_seg.source();} else { - p1=pt;} - + // p1=pt; + // Modified by Eug + // Performing vertical ray shooting from pt. + // Finding the intersection point. We know by now + // that there is exactly ONE point. Assinging this + // point to p1. + Point ap1( pt.x(), i_seg.source().y() ); + Point ap2( pt.x(), i_seg.target().y() ); + Segment_2 vertical_pt_x_base( ap1, ap2 ); + Object i_obj = intersection( vertical_pt_x_base, i_seg ); + assign( p1, i_obj ); + } found = true; } }