SHARE
TWEET

Untitled

a guest Jun 19th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CGAL_assertion((m_statusLine.size() == 0));
  2.      
  3. #include <CGAL/Cartesian.h>
  4. #include <CGAL/CORE_algebraic_number_traits.h>
  5. #include <CGAL/Arr_Bezier_curve_traits_2.h>
  6. #include <CGAL/Arrangement_2.h>
  7.  
  8. #include <sstream>
  9.  
  10. using NtTraits = CGAL::CORE_algebraic_number_traits;
  11. using Rational = NtTraits::Rational;
  12. using Algebraic = NtTraits::Algebraic;
  13. using RationalKernel = CGAL::Cartesian< Rational >;
  14. using AlgebraicKernel = CGAL::Cartesian< Algebraic >;
  15. using ArrTraits = CGAL::Arr_Bezier_curve_traits_2< RationalKernel,
  16. AlgebraicKernel, NtTraits >;
  17. using BezierCurve2 = ArrTraits::Curve_2;
  18. using Arrangement = CGAL::Arrangement_2< ArrTraits >;
  19.  
  20. int main()
  21. {
  22.     // Change 10.1 to 10 and problem goes away.
  23.     const std::string curvesData =
  24.                 "2            
  25.                 2 -10 0 10.1 0
  26.                 2 10 10 10 0 ";
  27.  
  28.     std::istringstream stream( curvesData );
  29.     std::vector< BezierCurve2 > curvesToInsert;
  30.     size_t numCurves = 0;
  31.     stream >> numCurves;
  32.     for( size_t i = 0; i < numCurves; i++ ) {
  33.         BezierCurve2 curve;
  34.         stream >> curve;
  35.         curvesToInsert.push_back( curve );
  36.     }
  37.  
  38.     Arrangement arr;
  39.     // Assertion violation here.
  40.     CGAL::insert( arr, curvesToInsert.begin(), curvesToInsert.end() );
  41.     return 0;
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top