Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] small problem with "Circle_2"

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] small problem with "Circle_2"


Chronological Thread 
  • From: Mahmood Naderan <>
  • To:
  • Subject: Re: [cgal-discuss] small problem with "Circle_2"
  • Date: Sat, 19 Apr 2008 02:30:02 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=jm004Zs3QFbmX9olHY6A/NAPFNy7vG7EU6SgClqxQ0WeKXSio5fWM+bVi/XSpZOYqhGoEy1pDmljNWSjzm+CZhd/gT472PoJiVy4MlL5dwXHks0tT2sPyjB5w12g4G8Tqz8E+KeYfXE9IRKUx36GAAvptHhBdLaXIXwDH2MFkDg=;

>Maybe try the following instead ?
>Circ2 = Circle_2( Point_2(cx, cy), r2 );
Yes. You are right. After that I added a conic_arc_2 definition:    typedef
CGAL::Cartesian<double>                            Rep;
    typedef Rep::Point_2                                              Point_2;

    typedef CGAL::CORE_algebraic_number_traits          Nt_traits;           
// !!!!!!!!!
    typedef CGAL::Arr_conic_traits_2<Rep, Rep, Nt_traits>  Traits_2;
    typedef Traits_2::Curve_2                                       
Conic_arc_2;
with a definition like:
    Conic_arc_2 con;
    Circ2 = Circle_2( Point_2(cx, cy), r2 );
    Point_2 s = Point_2( x1, y1 );
    Point_2 e = Point_2( x2, y2 );
    con = Conic_arc_2 (Circ2, CGAL::COUNTERCLOCKWISE, s, e);        // EE RR
RR OO RR
I get 10 errors!!. One of them is:
error C2440: 'initializing' : cannot convert from
'CGAL::CORE_algebraic_number_traits::Algebraic' to 'const
CGAL::_Conic_arc_2<Rat_kernel_,Alg_kernel_,Nt_traits_>::Algebraic'
        with
        [
           
Rat_kernel_=CGAL::Arr_conic_traits_2<Rep,Rep,Nt_traits>::Rat_kernel,
           
Alg_kernel_=CGAL::Arr_conic_traits_2<Rep,Rep,Nt_traits>::Alg_kernel,
            Nt_traits_=CGAL::Arr_conic_traits_2<Rep,Rep,Nt_traits>::Nt_traits
        ]

Other errors are the same I think. So If this error get corrected, others
will be solved.

-------------------
Mahmood Naderan
http://ce.sharif.edu/~m_naderan




----- Original Message ----
From: Sylvain Pion
<>
To:

Sent: Saturday, April 19, 2008 11:41:21 AM
Subject: Re: [cgal-discuss] small problem with "Circle_2"

Mahmood Naderan a écrit :
> Hello,
> Consider this simple declaration:
>    typedef CGAL::Cartesian<double>                            Rep;
>    typedef Rep::Point_2                                             
>Point_2;
>    typedef Rep::Segment_2                                        Segment;
>    typedef Rep::Circle_2                                             
>Circle_2;
>    typedef CGAL::CORE_algebraic_number_traits          Nt_traits;
>    typedef CGAL::Arr_conic_traits_2<Rep, Rep, Nt_traits>  Traits_2;
>    typedef Traits_2::Curve_2                                       
>Conic_arc_2;
> In the main function I have:
>    double x, y;
>    double cx, cy, x1, y1, x2, y2;
>    Circle_2 Circ2;
>
>    fin >> cx >> cy;
>    fin >> x1 >> y1 >> x2 >> y2;
>    double r2 = pow(x2 - cx, 2) + pow(y2 - cy, 2);
>    Circ2( Point_2(cx, cy), r2 );        // EE RR RR OO RR

Maybe try the following instead ?

Circ2 = Circle_2( Point_2(cx, cy), r2 );

> I got this error at last line:
> error C2064: term does not evaluate to a function taking 2 arguments
> Where did I wrong?




--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



  • Re: [cgal-discuss] small problem with "Circle_2", Mahmood Naderan, 04/19/2008

Archive powered by MHonArc 2.6.16.

Top of Page