diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_curve_kernel_2/Curve_pair_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_curve_kernel_2/Curve_pair_analysis_2.h index 33df5cbfbef..5d05b9b86b3 100755 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_curve_kernel_2/Curve_pair_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_curve_kernel_2/Curve_pair_analysis_2.h @@ -234,19 +234,22 @@ public: Status_line_1 line(i, arcs, *this); CGAL_precondition_code( - int typo; - typename Status_line_1::Arc_pair pair; - for(int j = 0; j < slice.num_arcs(); j++) { - - pair = line.curves_at_event(j); - if(pair.first != -1 && pair.second != -1) - typo = 2; - else - typo = (pair.first != -1 ? 0 : 1); - /*std::cout << "[" << pair.first << "; " << pair.second << "] and " << - (int)(slice.arc_at_event(j).first) << "\n";*/ - CGAL_precondition(typo == slice.arc_at_event(j).first); - } + int typo; + typename Status_line_1::Arc_pair pair; + for (int j = 0; j < slice.num_arcs(); j++) { + pair = line.curves_at_event(j); + if (pair.first != -1 && pair.second != -1) { + typo = 2; + } else { + typo = (pair.first != -1 ? 0 : 1); + if (this->ptr()->_m_swapped) { + typo = 1 - typo; + } + } + /*std::cout << "[" << pair.first << "; " << pair.second << "] and " << + (int)(slice.arc_at_event(j).first) << "\n";*/ + CGAL_precondition(typo == slice.arc_at_event(j).first); + } ); return line; #endif // CGAL_ACK_2_USE_STATUS_LINES @@ -277,15 +280,18 @@ public: Status_line_1 line(i, arcs, *this); CGAL_precondition_code( - int typo; - typename Status_line_1::Arc_pair pair; - for(int j = 0; j < slice.num_arcs(); j++) { - - pair = line.curves_at_event(j); - typo = (pair.first != -1 ? 0 : 1); - CGAL_precondition(typo == slice.arc_at_interval(j)); - } ); - + int typo; + typename Status_line_1::Arc_pair pair; + for (int j = 0; j < slice.num_arcs(); j++) { + pair = line.curves_at_event(j); + typo = (pair.first != -1 ? 0 : 1); + if (this->ptr()->_m_swapped) { + typo = 1 - typo; + } + CGAL_precondition(typo == slice.arc_at_interval(j)); + } + ); + return line; #endif // CGAL_ACK_2_USE_STATUS_LINES }