Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Arrangement_2: assertion violation in Arr_traits_2/Bezier_bounding_rational_traits.h

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Arrangement_2: assertion violation in Arr_traits_2/Bezier_bounding_rational_traits.h


Chronological Thread 
  • From: Efraim Fogel <>
  • To: , Ron Wein <>
  • Subject: Re: [cgal-discuss] Arrangement_2: assertion violation in Arr_traits_2/Bezier_bounding_rational_traits.h
  • Date: Mon, 17 Sep 2007 16:54:24 +0200

Again, the answer below is provided by Ron:

It is impossible to use the I/O operations of arrangements of Bezier
curves. While the Bezier curves supports operators >> and << (basically
reading and writing its sequence of *rational* control points), it is
difficult to output a point in a way that we can read and use afterwards
(well, we can approximate it, but we loose its algebraic representation,
if one was computed).

You already suspected that these operations are "likely not trivial to
add" for a point. Indeed they are.

David Keller wrote:
> Hi,
>
> I'm appending this here, even though it is not directly related to the
> above discussed issues:
> What is required for the stream-IO of Bezier-curve-arrangements?
>
> ____
>
> typedef CGAL::CORE_algebraic_number_traits nt_traits;
> typedef nt_traits::Rational rational;
> typedef nt_traits::Algebraic algebraic;
> typedef CGAL::Cartesian<rational> rational_kernel;
> typedef CGAL::Cartesian<algebraic> algebraic_kernel;
> typedef CGAL::Arr_Bezier_curve_traits_2<rational_kernel,
> algebraic_kernel, nt_traits> traits;
> typedef CGAL::Arrangement_with_history_2<traits> arrangement;
>
> ...
> arrangement a;
> ...
>
> std::ofstream outfile( "bezier.dat" );
> outfile << a ;
> ____
>
> For a first try I get stuck with some compile-time errors:
>
> /opt/CGAL-3.3.1/include/CGAL/IO/Arr_text_formatter.h: In member
> function ‘void
> CGAL::Arr_text_formatter<Arrangement_>::read_point(typename
> Arrangement_::Traits_2::Point_2&) [with Arrangement_ =
> CGAL::Arrangement_with_history_2<CGAL::Arr_Bezier_curve_traits_2<CGAL::Cartesian<CORE::BigRat>,
> CGAL::Cartesian<CORE::Expr>, CGAL::CORE_algebraic_number_traits,
> CGAL::Bezier_bounding_rational_traits<CGAL::Cartesian<CORE::BigRat> >
> >,
> CGAL::Arr_default_dcel<CGAL::Arr_Bezier_curve_traits_2<CGAL::Cartesian<CORE::BigRat>,
> CGAL::Cartesian<CORE::Expr>, CGAL::CORE_algebraic_number_traits,
> CGAL::Bezier_bounding_rational_traits<CGAL::Cartesian<CORE::BigRat> >
> > > >]’:
> libs/bspline/test/bezier_curve.cpp:391: instantiated from here
> /opt/CGAL-3.3.1/include/CGAL/IO/Arr_text_formatter.h:371: error: no
> match for ‘operator>>’ in ‘CGAL::Arr_text_formatter<Arrangement_>::in
> [with Arrangement_ =
> CGAL::Arrangement_with_history_2<CGAL::Arr_Bezier_curve_traits_2<CGAL::Cartesian<CORE::BigRat>,
> CGAL::Cartesian<CORE::Expr>, CGAL::CORE_algebraic_number_traits,
> CGAL::Bezier_bounding_rational_traits<CGAL::Cartesian<CORE::BigRat> >
> >,
> CGAL::Arr_default_dcel<CGAL::Arr_Bezier_curve_traits_2<CGAL::Cartesian<CORE::BigRat>,
> CGAL::Cartesian<CORE::Expr>, CGAL::CORE_algebraic_number_traits,
> CGAL::Bezier_bounding_rational_traits<CGAL::Cartesian<CORE::BigRat> >
> > > >]() >> p’
>
> When trying to hunt these down it seems _Bezier_point_2 is missing
> some operator>> and operator<<. I cannot find these in the
> distribution and they are likely not trivial to add from my point of
> view.
>
> Kind regards,
> David Keller
--
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/




Archive powered by MHonArc 2.6.16.

Top of Page