Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CGAL_assertion((m_statusLine.size() == 0));
- #include <CGAL/Cartesian.h>
- #include <CGAL/CORE_algebraic_number_traits.h>
- #include <CGAL/Arr_Bezier_curve_traits_2.h>
- #include <CGAL/Arrangement_2.h>
- #include <sstream>
- using NtTraits = CGAL::CORE_algebraic_number_traits;
- using Rational = NtTraits::Rational;
- using Algebraic = NtTraits::Algebraic;
- using RationalKernel = CGAL::Cartesian< Rational >;
- using AlgebraicKernel = CGAL::Cartesian< Algebraic >;
- using ArrTraits = CGAL::Arr_Bezier_curve_traits_2< RationalKernel,
- AlgebraicKernel, NtTraits >;
- using BezierCurve2 = ArrTraits::Curve_2;
- using Arrangement = CGAL::Arrangement_2< ArrTraits >;
- int main()
- {
- // Change 10.1 to 10 and problem goes away.
- const std::string curvesData =
- "2
- 2 -10 0 10.1 0
- 2 10 10 10 0 ";
- std::istringstream stream( curvesData );
- std::vector< BezierCurve2 > curvesToInsert;
- size_t numCurves = 0;
- stream >> numCurves;
- for( size_t i = 0; i < numCurves; i++ ) {
- BezierCurve2 curve;
- stream >> curve;
- curvesToInsert.push_back( curve );
- }
- Arrangement arr;
- // Assertion violation here.
- CGAL::insert( arr, curvesToInsert.begin(), curvesToInsert.end() );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement