Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] How to use Arr_curve_data_traits_2 with Arr_Bezier_curve_traits_2?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] How to use Arr_curve_data_traits_2 with Arr_Bezier_curve_traits_2?


Chronological Thread 
  • From: Eric Berberich <>
  • To:
  • Subject: Re: [cgal-discuss] How to use Arr_curve_data_traits_2 with Arr_Bezier_curve_traits_2?
  • Date: Mon, 17 Jan 2011 14:56:14 +0100

stzpz wrote:
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



Apply the following fix. We we solve the issue for the next public release.

eriC


Index: Arr_Bezier_curve_traits_2.h
===================================================================
--- Arr_Bezier_curve_traits_2.h (revision 60761)
+++ Arr_Bezier_curve_traits_2.h (working copy)
@@ -99,6 +99,9 @@
Nt_traits,
Bounding_traits> Point_2;

+ typedef unsigned int Multiplicity;
+
+





Archive powered by MHonArc 2.6.16.

Top of Page