Subject: CGAL users discussion list
List archive
[cgal-discuss] How to use Arr_curve_data_traits_2 with Arr_Bezier_curve_traits_2?
Chronological Thread
- From: stzpz <>
- To:
- Subject: [cgal-discuss] How to use Arr_curve_data_traits_2 with Arr_Bezier_curve_traits_2?
- Date: Mon, 17 Jan 2011 04:55:45 -0800 (PST)
Hello all,
I want to use Arr_Bezier_curve_traits_2 arrangement with an auxiliary data
attached to each Bezier curve, so I use Arr_curve_data_traits_2 for that
with the following code:
// ==== Code begin ====
#include <CGAL/basic.h>
#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 <CGAL/Arr_curve_data_traits_2.h>
typedef CGAL::CORE_algebraic_number_traits Nt_traits;
typedef Nt_traits::Rational NT;
typedef Nt_traits::Rational Rational;
typedef Nt_traits::Algebraic Algebraic;
typedef CGAL::Cartesian<Rational> Rat_kernel;
typedef CGAL::Cartesian<Algebraic> Alg_kernel;
typedef CGAL::Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel, Nt_traits>
Traits_org_2;
typedef CGAL::Arr_curve_data_traits_2<Traits_org_2, unsigned int>
Traits_2;
// *** Compile error on the following line ***
typedef Traits_2::Curve_2 Bezier_curve_num_2;
// *** Compile error on the above line ***
typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
int main()
{
return 0;
}
// ==== Code end ====
But this simple program can not compile successfully with the following
message:
/home/stzpz/testcgal/test.cpp:19: instantiated from here
/usr/include/CGAL/Arr_curve_data_traits_2.h:86: error: no type named
'Multiplicity' in 'class
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> > >'
I think the problem is caused by the following line,
typedef Traits_2::Curve_2
Bezier_curve_num_2;
but I don't know how to fix it.
Is there any suggestion?
Thanks!
Stzpz
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/How-to-use-Arr-curve-data-traits-2-with-Arr-Bezier-curve-traits-2-tp3221167p3221167.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] How to use Arr_curve_data_traits_2 with Arr_Bezier_curve_traits_2?, stzpz, 01/17/2011
- Re: [cgal-discuss] How to use Arr_curve_data_traits_2 with Arr_Bezier_curve_traits_2?, Eric Berberich, 01/17/2011
Archive powered by MHonArc 2.6.16.