How to convert Arrangement_with_history_2 to Arrangement_2?

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

How to convert Arrangement_with_history_2 to Arrangement_2?

Morteza Manavi
Hi, I want to use Dual class to construct a dual graph of my arrangement, but I get the compile error :
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
and I think it's for Arrangement_with_history_2 that I use to define the arrangement in the code. Now I need to convert Arr_with_hist_2 to Arrangement_2 and I don't know how to do this?
my CGAL type definition :
typedef CGAL::Cartesian<CGAL::Exact_rational>                   Kernel;
typedef Kernel::Circle_2                                        Circle_2;
typedef Kernel::Segment_2                                       Segment_2;

typedef CGAL::Arr_circle_segment_traits_2<Kernel>         Circle_Segment_traits_2;
typedef std::string                                       Curve_Name;
typedef CGAL::Arr_consolidated_curve_data_traits_2
                   <Circle_Segment_traits_2, Curve_Name>  Traits_2;
typedef Traits_2::Point_2                                 TPoint_2;
typedef Traits_2::Curve_2                                 Curve_2;
typedef Traits_2::CoordNT                                 CoordNT;

typedef CGAL::Arr_face_extended_dcel<Traits_2 , unsigned int>   Dcel ;
typedef CGAL::Arrangement_with_history_2<Traits_2, Dcel>        Arr_with_hist_2;
typedef CGAL::Dual<Arr_with_hist_2>                             Dual_arrangement;
typedef CGAL::Arr_face_index_map<Arr_with_hist_2>               Face_index_map;
Reply | Threaded
Open this post in threaded view
|

Re: How to convert Arrangement_with_history_2 to Arrangement_2?

Efi Fogel
Hi Morteza,

If you really need to convert Arrangement_with_history_2 to Arrangement_2, then you would need to reconstruct Arrangement_2, but conceptually, everything you can do with Arrangement_2 you can also do with Arrangement_with_history_2.

Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?

Anyway, if you still have a problem, please paste a complete minimal program.

Efi
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sat, 25 Aug 2018 at 16:00, Morteza Manavi <[hidden email]> wrote:
Hi, I want to use Dual class to construct a dual graph of my arrangement, but I get the compile error :
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
and I think it's for Arrangement_with_history_2 that I use to define the arrangement in the code. Now I need to convert Arr_with_hist_2 to Arrangement_2 and I don't know how to do this?
my CGAL type definition :
typedef CGAL::Cartesian<CGAL::Exact_rational>                   Kernel;
typedef Kernel::Circle_2                                        Circle_2;
typedef Kernel::Segment_2                                       Segment_2;

typedef CGAL::Arr_circle_segment_traits_2<Kernel>         Circle_Segment_traits_2;
typedef std::string                                       Curve_Name;
typedef CGAL::Arr_consolidated_curve_data_traits_2
                   <Circle_Segment_traits_2, Curve_Name>  Traits_2;
typedef Traits_2::Point_2                                 TPoint_2;
typedef Traits_2::Curve_2                                 Curve_2;
typedef Traits_2::CoordNT                                 CoordNT;

typedef CGAL::Arr_face_extended_dcel<Traits_2 , unsigned int>   Dcel ;
typedef CGAL::Arrangement_with_history_2<Traits_2, Dcel>        Arr_with_hist_2;
typedef CGAL::Dual<Arr_with_hist_2>                             Dual_arrangement;
typedef CGAL::Arr_face_index_map<Arr_with_hist_2>               Face_index_map;
Reply | Threaded
Open this post in threaded view
|

Re: How to convert Arrangement_with_history_2 to Arrangement_2?

Morteza Manavi
Thank you Efi,
But I don't want to delete CGAL::Dual because I need to construct a dual graph representation of the arrangement, and on the other hand I need to have curve handler that it's possible with use of Arrangement_with_history_2 class.
Apparently the Dual class does not accept Arrangement_with_history_2 as input and according to your answer I can't directly convert Arrangement_with_history_2 to Arrangement_2. I think, I must write my own dual graph class that accept Arrangement_with_history_2 as input.

Morteza.

On Sun, Aug 26, 2018 at 1:50 AM Efi Fogel <[hidden email]> wrote:
Hi Morteza,

If you really need to convert Arrangement_with_history_2 to Arrangement_2, then you would need to reconstruct Arrangement_2, but conceptually, everything you can do with Arrangement_2 you can also do with Arrangement_with_history_2.

Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?

Anyway, if you still have a problem, please paste a complete minimal program.

Efi
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sat, 25 Aug 2018 at 16:00, Morteza Manavi <[hidden email]> wrote:
Hi, I want to use Dual class to construct a dual graph of my arrangement, but I get the compile error :
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
and I think it's for Arrangement_with_history_2 that I use to define the arrangement in the code. Now I need to convert Arr_with_hist_2 to Arrangement_2 and I don't know how to do this?
my CGAL type definition :
typedef CGAL::Cartesian<CGAL::Exact_rational>                   Kernel;
typedef Kernel::Circle_2                                        Circle_2;
typedef Kernel::Segment_2                                       Segment_2;

typedef CGAL::Arr_circle_segment_traits_2<Kernel>         Circle_Segment_traits_2;
typedef std::string                                       Curve_Name;
typedef CGAL::Arr_consolidated_curve_data_traits_2
                   <Circle_Segment_traits_2, Curve_Name>  Traits_2;
typedef Traits_2::Point_2                                 TPoint_2;
typedef Traits_2::Curve_2                                 Curve_2;
typedef Traits_2::CoordNT                                 CoordNT;

typedef CGAL::Arr_face_extended_dcel<Traits_2 , unsigned int>   Dcel ;
typedef CGAL::Arrangement_with_history_2<Traits_2, Dcel>        Arr_with_hist_2;
typedef CGAL::Dual<Arr_with_hist_2>                             Dual_arrangement;
typedef CGAL::Arr_face_index_map<Arr_with_hist_2>               Face_index_map;
Reply | Threaded
Open this post in threaded view
|

Re: How to convert Arrangement_with_history_2 to Arrangement_2?

Efi Fogel
What makes you think that the Dual class does not accept Arrangement_with_history_2?
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 12:15, Morteza Manavi <[hidden email]> wrote:
Thank you Efi,
But I don't want to delete CGAL::Dual because I need to construct a dual graph representation of the arrangement, and on the other hand I need to have curve handler that it's possible with use of Arrangement_with_history_2 class.
Apparently the Dual class does not accept Arrangement_with_history_2 as input and according to your answer I can't directly convert Arrangement_with_history_2 to Arrangement_2. I think, I must write my own dual graph class that accept Arrangement_with_history_2 as input.

Morteza.

On Sun, Aug 26, 2018 at 1:50 AM Efi Fogel <[hidden email]> wrote:
Hi Morteza,

If you really need to convert Arrangement_with_history_2 to Arrangement_2, then you would need to reconstruct Arrangement_2, but conceptually, everything you can do with Arrangement_2 you can also do with Arrangement_with_history_2.

Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?

Anyway, if you still have a problem, please paste a complete minimal program.

Efi
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sat, 25 Aug 2018 at 16:00, Morteza Manavi <[hidden email]> wrote:
Hi, I want to use Dual class to construct a dual graph of my arrangement, but I get the compile error :
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
and I think it's for Arrangement_with_history_2 that I use to define the arrangement in the code. Now I need to convert Arr_with_hist_2 to Arrangement_2 and I don't know how to do this?
my CGAL type definition :
typedef CGAL::Cartesian<CGAL::Exact_rational>                   Kernel;
typedef Kernel::Circle_2                                        Circle_2;
typedef Kernel::Segment_2                                       Segment_2;

typedef CGAL::Arr_circle_segment_traits_2<Kernel>         Circle_Segment_traits_2;
typedef std::string                                       Curve_Name;
typedef CGAL::Arr_consolidated_curve_data_traits_2
                   <Circle_Segment_traits_2, Curve_Name>  Traits_2;
typedef Traits_2::Point_2                                 TPoint_2;
typedef Traits_2::Curve_2                                 Curve_2;
typedef Traits_2::CoordNT                                 CoordNT;

typedef CGAL::Arr_face_extended_dcel<Traits_2 , unsigned int>   Dcel ;
typedef CGAL::Arrangement_with_history_2<Traits_2, Dcel>        Arr_with_hist_2;
typedef CGAL::Dual<Arr_with_hist_2>                             Dual_arrangement;
typedef CGAL::Arr_face_index_map<Arr_with_hist_2>               Face_index_map;
Reply | Threaded
Open this post in threaded view
|

Re: How to convert Arrangement_with_history_2 to Arrangement_2?

Morteza Manavi
Exactly, compiler give error:
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
C2440: 'initializing': cannot convert from 'Arr_with_hist_2' to 'int'
in line :
Dual_arrangement  dual(arr);
of my code.
(Notice that the error is not occur at runtime)


On Sun, Aug 26, 2018 at 2:47 PM Efi Fogel <[hidden email]> wrote:
What makes you think that the Dual class does not accept Arrangement_with_history_2?
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 12:15, Morteza Manavi <[hidden email]> wrote:
Thank you Efi,
But I don't want to delete CGAL::Dual because I need to construct a dual graph representation of the arrangement, and on the other hand I need to have curve handler that it's possible with use of Arrangement_with_history_2 class.
Apparently the Dual class does not accept Arrangement_with_history_2 as input and according to your answer I can't directly convert Arrangement_with_history_2 to Arrangement_2. I think, I must write my own dual graph class that accept Arrangement_with_history_2 as input.

Morteza.

On Sun, Aug 26, 2018 at 1:50 AM Efi Fogel <[hidden email]> wrote:
Hi Morteza,

If you really need to convert Arrangement_with_history_2 to Arrangement_2, then you would need to reconstruct Arrangement_2, but conceptually, everything you can do with Arrangement_2 you can also do with Arrangement_with_history_2.

Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?

Anyway, if you still have a problem, please paste a complete minimal program.

Efi
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sat, 25 Aug 2018 at 16:00, Morteza Manavi <[hidden email]> wrote:
Hi, I want to use Dual class to construct a dual graph of my arrangement, but I get the compile error :
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
and I think it's for Arrangement_with_history_2 that I use to define the arrangement in the code. Now I need to convert Arr_with_hist_2 to Arrangement_2 and I don't know how to do this?
my CGAL type definition :
typedef CGAL::Cartesian<CGAL::Exact_rational>                   Kernel;
typedef Kernel::Circle_2                                        Circle_2;
typedef Kernel::Segment_2                                       Segment_2;

typedef CGAL::Arr_circle_segment_traits_2<Kernel>         Circle_Segment_traits_2;
typedef std::string                                       Curve_Name;
typedef CGAL::Arr_consolidated_curve_data_traits_2
                   <Circle_Segment_traits_2, Curve_Name>  Traits_2;
typedef Traits_2::Point_2                                 TPoint_2;
typedef Traits_2::Curve_2                                 Curve_2;
typedef Traits_2::CoordNT                                 CoordNT;

typedef CGAL::Arr_face_extended_dcel<Traits_2 , unsigned int>   Dcel ;
typedef CGAL::Arrangement_with_history_2<Traits_2, Dcel>        Arr_with_hist_2;
typedef CGAL::Dual<Arr_with_hist_2>                             Dual_arrangement;
typedef CGAL::Arr_face_index_map<Arr_with_hist_2>               Face_index_map;
Reply | Threaded
Open this post in threaded view
|

Re: How to convert Arrangement_with_history_2 to Arrangement_2?

Efi Fogel
Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 14:19, Morteza Manavi <[hidden email]> wrote:
Exactly, compiler give error:
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
C2440: 'initializing': cannot convert from 'Arr_with_hist_2' to 'int'
in line :
Dual_arrangement  dual(arr);
of my code.
(Notice that the error is not occur at runtime)


On Sun, Aug 26, 2018 at 2:47 PM Efi Fogel <[hidden email]> wrote:
What makes you think that the Dual class does not accept Arrangement_with_history_2?
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 12:15, Morteza Manavi <[hidden email]> wrote:
Thank you Efi,
But I don't want to delete CGAL::Dual because I need to construct a dual graph representation of the arrangement, and on the other hand I need to have curve handler that it's possible with use of Arrangement_with_history_2 class.
Apparently the Dual class does not accept Arrangement_with_history_2 as input and according to your answer I can't directly convert Arrangement_with_history_2 to Arrangement_2. I think, I must write my own dual graph class that accept Arrangement_with_history_2 as input.

Morteza.

On Sun, Aug 26, 2018 at 1:50 AM Efi Fogel <[hidden email]> wrote:
Hi Morteza,

If you really need to convert Arrangement_with_history_2 to Arrangement_2, then you would need to reconstruct Arrangement_2, but conceptually, everything you can do with Arrangement_2 you can also do with Arrangement_with_history_2.

Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?

Anyway, if you still have a problem, please paste a complete minimal program.

Efi
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sat, 25 Aug 2018 at 16:00, Morteza Manavi <[hidden email]> wrote:
Hi, I want to use Dual class to construct a dual graph of my arrangement, but I get the compile error :
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
and I think it's for Arrangement_with_history_2 that I use to define the arrangement in the code. Now I need to convert Arr_with_hist_2 to Arrangement_2 and I don't know how to do this?
my CGAL type definition :
typedef CGAL::Cartesian<CGAL::Exact_rational>                   Kernel;
typedef Kernel::Circle_2                                        Circle_2;
typedef Kernel::Segment_2                                       Segment_2;

typedef CGAL::Arr_circle_segment_traits_2<Kernel>         Circle_Segment_traits_2;
typedef std::string                                       Curve_Name;
typedef CGAL::Arr_consolidated_curve_data_traits_2
                   <Circle_Segment_traits_2, Curve_Name>  Traits_2;
typedef Traits_2::Point_2                                 TPoint_2;
typedef Traits_2::Curve_2                                 Curve_2;
typedef Traits_2::CoordNT                                 CoordNT;

typedef CGAL::Arr_face_extended_dcel<Traits_2 , unsigned int>   Dcel ;
typedef CGAL::Arrangement_with_history_2<Traits_2, Dcel>        Arr_with_hist_2;
typedef CGAL::Dual<Arr_with_hist_2>                             Dual_arrangement;
typedef CGAL::Arr_face_index_map<Arr_with_hist_2>               Face_index_map;
Reply | Threaded
Open this post in threaded view
|

Re: How to convert Arrangement_with_history_2 to Arrangement_2?

Morteza Manavi
I looked, the header file was included.

On Sun, Aug 26, 2018 at 3:57 PM Efi Fogel <[hidden email]> wrote:
Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 14:19, Morteza Manavi <[hidden email]> wrote:
Exactly, compiler give error:
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
C2440: 'initializing': cannot convert from 'Arr_with_hist_2' to 'int'
in line :
Dual_arrangement  dual(arr);
of my code.
(Notice that the error is not occur at runtime)


On Sun, Aug 26, 2018 at 2:47 PM Efi Fogel <[hidden email]> wrote:
What makes you think that the Dual class does not accept Arrangement_with_history_2?
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 12:15, Morteza Manavi <[hidden email]> wrote:
Thank you Efi,
But I don't want to delete CGAL::Dual because I need to construct a dual graph representation of the arrangement, and on the other hand I need to have curve handler that it's possible with use of Arrangement_with_history_2 class.
Apparently the Dual class does not accept Arrangement_with_history_2 as input and according to your answer I can't directly convert Arrangement_with_history_2 to Arrangement_2. I think, I must write my own dual graph class that accept Arrangement_with_history_2 as input.

Morteza.

On Sun, Aug 26, 2018 at 1:50 AM Efi Fogel <[hidden email]> wrote:
Hi Morteza,

If you really need to convert Arrangement_with_history_2 to Arrangement_2, then you would need to reconstruct Arrangement_2, but conceptually, everything you can do with Arrangement_2 you can also do with Arrangement_with_history_2.

Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?

Anyway, if you still have a problem, please paste a complete minimal program.

Efi
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sat, 25 Aug 2018 at 16:00, Morteza Manavi <[hidden email]> wrote:
Hi, I want to use Dual class to construct a dual graph of my arrangement, but I get the compile error :
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
and I think it's for Arrangement_with_history_2 that I use to define the arrangement in the code. Now I need to convert Arr_with_hist_2 to Arrangement_2 and I don't know how to do this?
my CGAL type definition :
typedef CGAL::Cartesian<CGAL::Exact_rational>                   Kernel;
typedef Kernel::Circle_2                                        Circle_2;
typedef Kernel::Segment_2                                       Segment_2;

typedef CGAL::Arr_circle_segment_traits_2<Kernel>         Circle_Segment_traits_2;
typedef std::string                                       Curve_Name;
typedef CGAL::Arr_consolidated_curve_data_traits_2
                   <Circle_Segment_traits_2, Curve_Name>  Traits_2;
typedef Traits_2::Point_2                                 TPoint_2;
typedef Traits_2::Curve_2                                 Curve_2;
typedef Traits_2::CoordNT                                 CoordNT;

typedef CGAL::Arr_face_extended_dcel<Traits_2 , unsigned int>   Dcel ;
typedef CGAL::Arrangement_with_history_2<Traits_2, Dcel>        Arr_with_hist_2;
typedef CGAL::Dual<Arr_with_hist_2>                             Dual_arrangement;
typedef CGAL::Arr_face_index_map<Arr_with_hist_2>               Face_index_map;
Reply | Threaded
Open this post in threaded view
|

Re: How to convert Arrangement_with_history_2 to Arrangement_2?

Efi Fogel
Please attach a small program that reproduces the compilation error.
I was, by the way, able to compile the lines of code you have posted after adding the appropriate include statements.
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 14:37, Morteza Manavi <[hidden email]> wrote:
I looked, the header file was included.

On Sun, Aug 26, 2018 at 3:57 PM Efi Fogel <[hidden email]> wrote:
Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 14:19, Morteza Manavi <[hidden email]> wrote:
Exactly, compiler give error:
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
C2440: 'initializing': cannot convert from 'Arr_with_hist_2' to 'int'
in line :
Dual_arrangement  dual(arr);
of my code.
(Notice that the error is not occur at runtime)


On Sun, Aug 26, 2018 at 2:47 PM Efi Fogel <[hidden email]> wrote:
What makes you think that the Dual class does not accept Arrangement_with_history_2?
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 12:15, Morteza Manavi <[hidden email]> wrote:
Thank you Efi,
But I don't want to delete CGAL::Dual because I need to construct a dual graph representation of the arrangement, and on the other hand I need to have curve handler that it's possible with use of Arrangement_with_history_2 class.
Apparently the Dual class does not accept Arrangement_with_history_2 as input and according to your answer I can't directly convert Arrangement_with_history_2 to Arrangement_2. I think, I must write my own dual graph class that accept Arrangement_with_history_2 as input.

Morteza.

On Sun, Aug 26, 2018 at 1:50 AM Efi Fogel <[hidden email]> wrote:
Hi Morteza,

If you really need to convert Arrangement_with_history_2 to Arrangement_2, then you would need to reconstruct Arrangement_2, but conceptually, everything you can do with Arrangement_2 you can also do with Arrangement_with_history_2.

Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?

Anyway, if you still have a problem, please paste a complete minimal program.

Efi
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sat, 25 Aug 2018 at 16:00, Morteza Manavi <[hidden email]> wrote:
Hi, I want to use Dual class to construct a dual graph of my arrangement, but I get the compile error :
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
and I think it's for Arrangement_with_history_2 that I use to define the arrangement in the code. Now I need to convert Arr_with_hist_2 to Arrangement_2 and I don't know how to do this?
my CGAL type definition :
typedef CGAL::Cartesian<CGAL::Exact_rational>                   Kernel;
typedef Kernel::Circle_2                                        Circle_2;
typedef Kernel::Segment_2                                       Segment_2;

typedef CGAL::Arr_circle_segment_traits_2<Kernel>         Circle_Segment_traits_2;
typedef std::string                                       Curve_Name;
typedef CGAL::Arr_consolidated_curve_data_traits_2
                   <Circle_Segment_traits_2, Curve_Name>  Traits_2;
typedef Traits_2::Point_2                                 TPoint_2;
typedef Traits_2::Curve_2                                 Curve_2;
typedef Traits_2::CoordNT                                 CoordNT;

typedef CGAL::Arr_face_extended_dcel<Traits_2 , unsigned int>   Dcel ;
typedef CGAL::Arrangement_with_history_2<Traits_2, Dcel>        Arr_with_hist_2;
typedef CGAL::Dual<Arr_with_hist_2>                             Dual_arrangement;
typedef CGAL::Arr_face_index_map<Arr_with_hist_2>               Face_index_map;
Reply | Threaded
Open this post in threaded view
|

Re: How to convert Arrangement_with_history_2 to Arrangement_2?

Morteza Manavi
I attach a small program that reproduces the compilation error.
Please look at the " graph_traits_Dual_Arrangement_2.h " file, you will find that the CGAL::Arrangement_2 is used for calculations.
Maybe error is for that?

On Sun, Aug 26, 2018 at 4:23 PM Efi Fogel <[hidden email]> wrote:
Please attach a small program that reproduces the compilation error.
I was, by the way, able to compile the lines of code you have posted after adding the appropriate include statements.
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 14:37, Morteza Manavi <[hidden email]> wrote:
I looked, the header file was included.

On Sun, Aug 26, 2018 at 3:57 PM Efi Fogel <[hidden email]> wrote:
Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 14:19, Morteza Manavi <[hidden email]> wrote:
Exactly, compiler give error:
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
C2440: 'initializing': cannot convert from 'Arr_with_hist_2' to 'int'
in line :
Dual_arrangement  dual(arr);
of my code.
(Notice that the error is not occur at runtime)


On Sun, Aug 26, 2018 at 2:47 PM Efi Fogel <[hidden email]> wrote:
What makes you think that the Dual class does not accept Arrangement_with_history_2?
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 12:15, Morteza Manavi <[hidden email]> wrote:
Thank you Efi,
But I don't want to delete CGAL::Dual because I need to construct a dual graph representation of the arrangement, and on the other hand I need to have curve handler that it's possible with use of Arrangement_with_history_2 class.
Apparently the Dual class does not accept Arrangement_with_history_2 as input and according to your answer I can't directly convert Arrangement_with_history_2 to Arrangement_2. I think, I must write my own dual graph class that accept Arrangement_with_history_2 as input.

Morteza.

On Sun, Aug 26, 2018 at 1:50 AM Efi Fogel <[hidden email]> wrote:
Hi Morteza,

If you really need to convert Arrangement_with_history_2 to Arrangement_2, then you would need to reconstruct Arrangement_2, but conceptually, everything you can do with Arrangement_2 you can also do with Arrangement_with_history_2.

Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?

Anyway, if you still have a problem, please paste a complete minimal program.

Efi
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sat, 25 Aug 2018 at 16:00, Morteza Manavi <[hidden email]> wrote:
Hi, I want to use Dual class to construct a dual graph of my arrangement, but I get the compile error :
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
and I think it's for Arrangement_with_history_2 that I use to define the arrangement in the code. Now I need to convert Arr_with_hist_2 to Arrangement_2 and I don't know how to do this?
my CGAL type definition :
typedef CGAL::Cartesian<CGAL::Exact_rational>                   Kernel;
typedef Kernel::Circle_2                                        Circle_2;
typedef Kernel::Segment_2                                       Segment_2;

typedef CGAL::Arr_circle_segment_traits_2<Kernel>         Circle_Segment_traits_2;
typedef std::string                                       Curve_Name;
typedef CGAL::Arr_consolidated_curve_data_traits_2
                   <Circle_Segment_traits_2, Curve_Name>  Traits_2;
typedef Traits_2::Point_2                                 TPoint_2;
typedef Traits_2::Curve_2                                 Curve_2;
typedef Traits_2::CoordNT                                 CoordNT;

typedef CGAL::Arr_face_extended_dcel<Traits_2 , unsigned int>   Dcel ;
typedef CGAL::Arrangement_with_history_2<Traits_2, Dcel>        Arr_with_hist_2;
typedef CGAL::Dual<Arr_with_hist_2>                             Dual_arrangement;
typedef CGAL::Arr_face_index_map<Arr_with_hist_2>               Face_index_map;

dual_graph.rar (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to convert Arrangement_with_history_2 to Arrangement_2?

Efi Fogel
ok, you are correct. There is indeed a limitation.
Let me try to figure out what can be done, and come back to you; stay tuned.
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 15:27, Morteza Manavi <[hidden email]> wrote:
I attach a small program that reproduces the compilation error.
Please look at the " graph_traits_Dual_Arrangement_2.h " file, you will find that the CGAL::Arrangement_2 is used for calculations.
Maybe error is for that?

On Sun, Aug 26, 2018 at 4:23 PM Efi Fogel <[hidden email]> wrote:
Please attach a small program that reproduces the compilation error.
I was, by the way, able to compile the lines of code you have posted after adding the appropriate include statements.
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 14:37, Morteza Manavi <[hidden email]> wrote:
I looked, the header file was included.

On Sun, Aug 26, 2018 at 3:57 PM Efi Fogel <[hidden email]> wrote:
Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 14:19, Morteza Manavi <[hidden email]> wrote:
Exactly, compiler give error:
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
C2440: 'initializing': cannot convert from 'Arr_with_hist_2' to 'int'
in line :
Dual_arrangement  dual(arr);
of my code.
(Notice that the error is not occur at runtime)


On Sun, Aug 26, 2018 at 2:47 PM Efi Fogel <[hidden email]> wrote:
What makes you think that the Dual class does not accept Arrangement_with_history_2?
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sun, 26 Aug 2018 at 12:15, Morteza Manavi <[hidden email]> wrote:
Thank you Efi,
But I don't want to delete CGAL::Dual because I need to construct a dual graph representation of the arrangement, and on the other hand I need to have curve handler that it's possible with use of Arrangement_with_history_2 class.
Apparently the Dual class does not accept Arrangement_with_history_2 as input and according to your answer I can't directly convert Arrangement_with_history_2 to Arrangement_2. I think, I must write my own dual graph class that accept Arrangement_with_history_2 as input.

Morteza.

On Sun, Aug 26, 2018 at 1:50 AM Efi Fogel <[hidden email]> wrote:
Hi Morteza,

If you really need to convert Arrangement_with_history_2 to Arrangement_2, then you would need to reconstruct Arrangement_2, but conceptually, everything you can do with Arrangement_2 you can also do with Arrangement_with_history_2.

Is it possible that you simply forgot to include the header that contains the definition of CGAL::Dual, namely, <CGAL/graph_traits_Dual_Arrangement_2.h> ?

Anyway, if you still have a problem, please paste a complete minimal program.

Efi
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Sat, 25 Aug 2018 at 16:00, Morteza Manavi <[hidden email]> wrote:
Hi, I want to use Dual class to construct a dual graph of my arrangement, but I get the compile error :
C2079: 'dual' uses undefined class 'CGAL::Dual<Arr_with_hist_2>'
and I think it's for Arrangement_with_history_2 that I use to define the arrangement in the code. Now I need to convert Arr_with_hist_2 to Arrangement_2 and I don't know how to do this?
my CGAL type definition :
typedef CGAL::Cartesian<CGAL::Exact_rational>                   Kernel;
typedef Kernel::Circle_2                                        Circle_2;
typedef Kernel::Segment_2                                       Segment_2;

typedef CGAL::Arr_circle_segment_traits_2<Kernel>         Circle_Segment_traits_2;
typedef std::string                                       Curve_Name;
typedef CGAL::Arr_consolidated_curve_data_traits_2
                   <Circle_Segment_traits_2, Curve_Name>  Traits_2;
typedef Traits_2::Point_2                                 TPoint_2;
typedef Traits_2::Curve_2                                 Curve_2;
typedef Traits_2::CoordNT                                 CoordNT;

typedef CGAL::Arr_face_extended_dcel<Traits_2 , unsigned int>   Dcel ;
typedef CGAL::Arrangement_with_history_2<Traits_2, Dcel>        Arr_with_hist_2;
typedef CGAL::Dual<Arr_with_hist_2>                             Dual_arrangement;
typedef CGAL::Arr_face_index_map<Arr_with_hist_2>               Face_index_map;
Reply | Threaded
Open this post in threaded view
|

Re: How to convert Arrangement_with_history_2 to Arrangement_2?

Sebastien Loriot (GeometryFactory)
In reply to this post by Morteza Manavi
Could you try if the patch from this PR solves your issue?

Thanks,

Sebastien.


On 08/26/2018 02:26 PM, Morteza Manavi wrote:

> I attach a small program that reproduces the compilation error.
> Please look at the " graph_traits_Dual_Arrangement_2.h " file, you will
> find that the CGAL::Arrangement_2 is used for calculations.
> Maybe error is for that?
>
> On Sun, Aug 26, 2018 at 4:23 PM Efi Fogel <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Please attach a small program that reproduces the compilation error.
>     I was, by the way, able to compile the lines of code you have posted
>     after adding the appropriate include statements.
>         ____  _        ____             _
>        /_____/_) o    /__________  __  //
>       (____ (   (    (    (_/ (_/-(-'_(/
>                               _/
>
>
>
>
>     On Sun, 26 Aug 2018 at 14:37, Morteza Manavi <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>         I looked, the header file was included.
>
>         On Sun, Aug 26, 2018 at 3:57 PM Efi Fogel <[hidden email]
>         <mailto:[hidden email]>> wrote:
>
>             Is it possible that you simply forgot to include the header
>             that contains the definition of CGAL::Dual, namely,
>             <CGAL/graph_traits_Dual_Arrangement_2.h> ?
>                 ____  _        ____             _
>                /_____/_) o    /__________  __  //
>               (____ (   (    (    (_/ (_/-(-'_(/
>                                       _/
>
>
>
>
>             On Sun, 26 Aug 2018 at 14:19, Morteza Manavi
>             <[hidden email] <mailto:[hidden email]>> wrote:
>
>                 Exactly, compiler give error:
>                 C2079: 'dual' uses undefined class
>                 'CGAL::Dual<Arr_with_hist_2>'
>                 C2440: 'initializing': cannot convert from
>                 'Arr_with_hist_2' to 'int'
>                 in line :
>
>                 Dual_arrangement dual(arr);
>
>                 of my code.
>                 (Notice that the error is not occur at runtime)
>
>
>
>                 On Sun, Aug 26, 2018 at 2:47 PM Efi Fogel
>                 <[hidden email] <mailto:[hidden email]>> wrote:
>
>                     What makes you think that the Dual class does not
>                     accept Arrangement_with_history_2?
>                         ____  _        ____             _
>                        /_____/_) o    /__________  __  //
>                       (____ (   (    (    (_/ (_/-(-'_(/
>                                               _/
>
>
>
>
>                     On Sun, 26 Aug 2018 at 12:15, Morteza Manavi
>                     <[hidden email]
>                     <mailto:[hidden email]>> wrote:
>
>                         Thank you Efi,
>                         But I don't want to delete CGAL::Dual because I
>                         need to construct a dual graph representation of
>                         the arrangement, and on the other hand I need to
>                         have curve handler that it's possible with use
>                         of Arrangement_with_history_2 class.
>                         Apparently the Dual class does not accept
>                         Arrangement_with_history_2 as input and
>                         according to your answer I can't directly
>                         convert Arrangement_with_history_2 to
>                         Arrangement_2. I think, I must write my own dual
>                         graph class that accept
>                         Arrangement_with_history_2 as input.
>
>                         Morteza.
>
>                         On Sun, Aug 26, 2018 at 1:50 AM Efi Fogel
>                         <[hidden email] <mailto:[hidden email]>>
>                         wrote:
>
>                             Hi Morteza,
>
>                             If you really need to convert
>                             Arrangement_with_history_2 to Arrangement_2,
>                             then you would need to reconstruct
>                             Arrangement_2, but conceptually, everything
>                             you can do with Arrangement_2 you can also
>                             do with Arrangement_with_history_2.
>
>                             Is it possible that you simply forgot to
>                             include the header that contains the
>                             definition of CGAL::Dual, namely,
>                             <CGAL/graph_traits_Dual_Arrangement_2.h> ?
>
>                             Anyway, if you still have a problem, please
>                             paste a complete minimal program.
>
>                             Efi
>                                 ____  _        ____             _
>                                /_____/_) o    /__________  __  //
>                               (____ (   (    (    (_/ (_/-(-'_(/
>                                                       _/
>
>
>
>
>                             On Sat, 25 Aug 2018 at 16:00, Morteza Manavi
>                             <[hidden email]
>                             <mailto:[hidden email]>> wrote:
>
>                                 Hi, I want to use Dual class to
>                                 construct a dual graph of my
>                                 arrangement, but I get the compile error :
>                                 C2079: 'dual' uses undefined class
>                                 'CGAL::Dual<Arr_with_hist_2>'
>                                 and I think it's for
>                                 Arrangement_with_history_2 that I use to
>                                 define the arrangement in the code. Now
>                                 I need to convert Arr_with_hist_2 to
>                                 Arrangement_2 and I don't know how to do
>                                 this?
>                                 my CGAL type definition :
>
>                                 typedefCGAL::Cartesian<CGAL::Exact_rational>Kernel;
>
>                                 typedefKernel::Circle_2Circle_2;
>
>                                 typedefKernel::Segment_2Segment_2;
>
>
>                                 typedefCGAL::Arr_circle_segment_traits_2<Kernel>Circle_Segment_traits_2;
>
>                                 typedefstd::stringCurve_Name;
>
>                                 typedefCGAL::Arr_consolidated_curve_data_traits_2
>
>                                 <Circle_Segment_traits_2,Curve_Name>Traits_2;
>
>                                 typedefTraits_2::Point_2TPoint_2;
>
>                                 typedefTraits_2::Curve_2Curve_2;
>
>                                 typedefTraits_2::CoordNTCoordNT;
>
>
>                                 typedefCGAL::Arr_face_extended_dcel<Traits_2,unsignedint>Dcel;
>
>                                 typedefCGAL::Arrangement_with_history_2<Traits_2,Dcel>Arr_with_hist_2;
>                                 typedefCGAL::Dual<Arr_with_hist_2>Dual_arrangement;
>                                 typedefCGAL::Arr_face_index_map<Arr_with_hist_2>Face_index_map;
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: How to convert Arrangement_with_history_2 to Arrangement_2?

Sebastien Loriot (GeometryFactory)
and here is the link :)

https://github.com/CGAL/cgal/pull/3295

On 08/28/2018 10:39 AM, Sebastien Loriot (GeometryFactory) wrote:

> Could you try if the patch from this PR solves your issue?
>
> Thanks,
>
> Sebastien.
>
>
> On 08/26/2018 02:26 PM, Morteza Manavi wrote:
>> I attach a small program that reproduces the compilation error.
>> Please look at the " graph_traits_Dual_Arrangement_2.h " file, you
>> will find that the CGAL::Arrangement_2 is used for calculations.
>> Maybe error is for that?
>>
>> On Sun, Aug 26, 2018 at 4:23 PM Efi Fogel <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     Please attach a small program that reproduces the compilation error.
>>     I was, by the way, able to compile the lines of code you have posted
>>     after adding the appropriate include statements.
>>         ____  _        ____             _
>>        /_____/_) o    /__________  __  //
>>       (____ (   (    (    (_/ (_/-(-'_(/
>>                               _/
>>
>>
>>
>>
>>     On Sun, 26 Aug 2018 at 14:37, Morteza Manavi <[hidden email]
>>     <mailto:[hidden email]>> wrote:
>>
>>         I looked, the header file was included.
>>
>>         On Sun, Aug 26, 2018 at 3:57 PM Efi Fogel <[hidden email]
>>         <mailto:[hidden email]>> wrote:
>>
>>             Is it possible that you simply forgot to include the header
>>             that contains the definition of CGAL::Dual, namely,
>>             <CGAL/graph_traits_Dual_Arrangement_2.h> ?
>>                 ____  _        ____             _
>>                /_____/_) o    /__________  __  //
>>               (____ (   (    (    (_/ (_/-(-'_(/
>>                                       _/
>>
>>
>>
>>
>>             On Sun, 26 Aug 2018 at 14:19, Morteza Manavi
>>             <[hidden email] <mailto:[hidden email]>>
>> wrote:
>>
>>                 Exactly, compiler give error:
>>                 C2079: 'dual' uses undefined class
>>                 'CGAL::Dual<Arr_with_hist_2>'
>>                 C2440: 'initializing': cannot convert from
>>                 'Arr_with_hist_2' to 'int'
>>                 in line :
>>
>>                 Dual_arrangement dual(arr);
>>
>>                 of my code.
>>                 (Notice that the error is not occur at runtime)
>>
>>
>>
>>                 On Sun, Aug 26, 2018 at 2:47 PM Efi Fogel
>>                 <[hidden email] <mailto:[hidden email]>> wrote:
>>
>>                     What makes you think that the Dual class does not
>>                     accept Arrangement_with_history_2?
>>                         ____  _        ____             _
>>                        /_____/_) o    /__________  __  //
>>                       (____ (   (    (    (_/ (_/-(-'_(/
>>                                               _/
>>
>>
>>
>>
>>                     On Sun, 26 Aug 2018 at 12:15, Morteza Manavi
>>                     <[hidden email]
>>                     <mailto:[hidden email]>> wrote:
>>
>>                         Thank you Efi,
>>                         But I don't want to delete CGAL::Dual because I
>>                         need to construct a dual graph representation of
>>                         the arrangement, and on the other hand I need to
>>                         have curve handler that it's possible with use
>>                         of Arrangement_with_history_2 class.
>>                         Apparently the Dual class does not accept
>>                         Arrangement_with_history_2 as input and
>>                         according to your answer I can't directly
>>                         convert Arrangement_with_history_2 to
>>                         Arrangement_2. I think, I must write my own dual
>>                         graph class that accept
>>                         Arrangement_with_history_2 as input.
>>
>>                         Morteza.
>>
>>                         On Sun, Aug 26, 2018 at 1:50 AM Efi Fogel
>>                         <[hidden email] <mailto:[hidden email]>>
>>                         wrote:
>>
>>                             Hi Morteza,
>>
>>                             If you really need to convert
>>                             Arrangement_with_history_2 to Arrangement_2,
>>                             then you would need to reconstruct
>>                             Arrangement_2, but conceptually, everything
>>                             you can do with Arrangement_2 you can also
>>                             do with Arrangement_with_history_2.
>>
>>                             Is it possible that you simply forgot to
>>                             include the header that contains the
>>                             definition of CGAL::Dual, namely,
>>                             <CGAL/graph_traits_Dual_Arrangement_2.h> ?
>>
>>                             Anyway, if you still have a problem, please
>>                             paste a complete minimal program.
>>
>>                             Efi
>>                                 ____  _        ____             _
>>                                /_____/_) o    /__________  __  //
>>                               (____ (   (    (    (_/ (_/-(-'_(/
>>                                                       _/
>>
>>
>>
>>
>>                             On Sat, 25 Aug 2018 at 16:00, Morteza Manavi
>>                             <[hidden email]
>>                             <mailto:[hidden email]>> wrote:
>>
>>                                 Hi, I want to use Dual class to
>>                                 construct a dual graph of my
>>                                 arrangement, but I get the compile
>> error :
>>                                 C2079: 'dual' uses undefined class
>>                                 'CGAL::Dual<Arr_with_hist_2>'
>>                                 and I think it's for
>>                                 Arrangement_with_history_2 that I use to
>>                                 define the arrangement in the code. Now
>>                                 I need to convert Arr_with_hist_2 to
>>                                 Arrangement_2 and I don't know how to do
>>                                 this?
>>                                 my CGAL type definition :
>>
>>                                
>> typedefCGAL::Cartesian<CGAL::Exact_rational>Kernel;
>>
>>                                 typedefKernel::Circle_2Circle_2;
>>
>>                                 typedefKernel::Segment_2Segment_2;
>>
>>
>>                                
>> typedefCGAL::Arr_circle_segment_traits_2<Kernel>Circle_Segment_traits_2;
>>
>>                                 typedefstd::stringCurve_Name;
>>
>>                                
>> typedefCGAL::Arr_consolidated_curve_data_traits_2
>>
>>                                
>> <Circle_Segment_traits_2,Curve_Name>Traits_2;
>>
>>                                 typedefTraits_2::Point_2TPoint_2;
>>
>>                                 typedefTraits_2::Curve_2Curve_2;
>>
>>                                 typedefTraits_2::CoordNTCoordNT;
>>
>>
>>                                
>> typedefCGAL::Arr_face_extended_dcel<Traits_2,unsignedint>Dcel;
>>
>>                                
>> typedefCGAL::Arrangement_with_history_2<Traits_2,Dcel>Arr_with_hist_2;
>>                                
>> typedefCGAL::Dual<Arr_with_hist_2>Dual_arrangement;
>>                                
>> typedefCGAL::Arr_face_index_map<Arr_with_hist_2>Face_index_map;
>>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: How to convert Arrangement_with_history_2 to Arrangement_2?

Morteza Manavi
It's working for me.

Thanks.



On Tue, Aug 28, 2018 at 1:21 PM Sebastien Loriot (GeometryFactory) <[hidden email]> wrote:
and here is the link :)

https://github.com/CGAL/cgal/pull/3295

On 08/28/2018 10:39 AM, Sebastien Loriot (GeometryFactory) wrote:
> Could you try if the patch from this PR solves your issue?
>
> Thanks,
>
> Sebastien.
>
>
> On 08/26/2018 02:26 PM, Morteza Manavi wrote:
>> I attach a small program that reproduces the compilation error.
>> Please look at the " graph_traits_Dual_Arrangement_2.h " file, you
>> will find that the CGAL::Arrangement_2 is used for calculations.
>> Maybe error is for that?
>>
>> On Sun, Aug 26, 2018 at 4:23 PM Efi Fogel <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     Please attach a small program that reproduces the compilation error.
>>     I was, by the way, able to compile the lines of code you have posted
>>     after adding the appropriate include statements.
>>         ____  _        ____             _
>>        /_____/_) o    /__________  __  //
>>       (____ (   (    (    (_/ (_/-(-'_(/
>>                               _/
>>
>>
>>
>>
>>     On Sun, 26 Aug 2018 at 14:37, Morteza Manavi <[hidden email]
>>     <mailto:[hidden email]>> wrote:
>>
>>         I looked, the header file was included.
>>
>>         On Sun, Aug 26, 2018 at 3:57 PM Efi Fogel <[hidden email]
>>         <mailto:[hidden email]>> wrote:
>>
>>             Is it possible that you simply forgot to include the header
>>             that contains the definition of CGAL::Dual, namely,
>>             <CGAL/graph_traits_Dual_Arrangement_2.h> ?
>>                 ____  _        ____             _
>>                /_____/_) o    /__________  __  //
>>               (____ (   (    (    (_/ (_/-(-'_(/
>>                                       _/
>>
>>
>>
>>
>>             On Sun, 26 Aug 2018 at 14:19, Morteza Manavi
>>             <[hidden email] <mailto:[hidden email]>>
>> wrote:
>>
>>                 Exactly, compiler give error:
>>                 C2079: 'dual' uses undefined class
>>                 'CGAL::Dual<Arr_with_hist_2>'
>>                 C2440: 'initializing': cannot convert from
>>                 'Arr_with_hist_2' to 'int'
>>                 in line :
>>
>>                 Dual_arrangement dual(arr);
>>
>>                 of my code.
>>                 (Notice that the error is not occur at runtime)
>>
>>
>>
>>                 On Sun, Aug 26, 2018 at 2:47 PM Efi Fogel
>>                 <[hidden email] <mailto:[hidden email]>> wrote:
>>
>>                     What makes you think that the Dual class does not
>>                     accept Arrangement_with_history_2?
>>                         ____  _        ____             _
>>                        /_____/_) o    /__________  __  //
>>                       (____ (   (    (    (_/ (_/-(-'_(/
>>                                               _/
>>
>>
>>
>>
>>                     On Sun, 26 Aug 2018 at 12:15, Morteza Manavi
>>                     <[hidden email]
>>                     <mailto:[hidden email]>> wrote:
>>
>>                         Thank you Efi,
>>                         But I don't want to delete CGAL::Dual because I
>>                         need to construct a dual graph representation of
>>                         the arrangement, and on the other hand I need to
>>                         have curve handler that it's possible with use
>>                         of Arrangement_with_history_2 class.
>>                         Apparently the Dual class does not accept
>>                         Arrangement_with_history_2 as input and
>>                         according to your answer I can't directly
>>                         convert Arrangement_with_history_2 to
>>                         Arrangement_2. I think, I must write my own dual
>>                         graph class that accept
>>                         Arrangement_with_history_2 as input.
>>
>>                         Morteza.
>>
>>                         On Sun, Aug 26, 2018 at 1:50 AM Efi Fogel
>>                         <[hidden email] <mailto:[hidden email]>>
>>                         wrote:
>>
>>                             Hi Morteza,
>>
>>                             If you really need to convert
>>                             Arrangement_with_history_2 to Arrangement_2,
>>                             then you would need to reconstruct
>>                             Arrangement_2, but conceptually, everything
>>                             you can do with Arrangement_2 you can also
>>                             do with Arrangement_with_history_2.
>>
>>                             Is it possible that you simply forgot to
>>                             include the header that contains the
>>                             definition of CGAL::Dual, namely,
>>                             <CGAL/graph_traits_Dual_Arrangement_2.h> ?
>>
>>                             Anyway, if you still have a problem, please
>>                             paste a complete minimal program.
>>
>>                             Efi
>>                                 ____  _        ____             _
>>                                /_____/_) o    /__________  __  //
>>                               (____ (   (    (    (_/ (_/-(-'_(/
>>                                                       _/
>>
>>
>>
>>
>>                             On Sat, 25 Aug 2018 at 16:00, Morteza Manavi
>>                             <[hidden email]
>>                             <mailto:[hidden email]>> wrote:
>>
>>                                 Hi, I want to use Dual class to
>>                                 construct a dual graph of my
>>                                 arrangement, but I get the compile
>> error :
>>                                 C2079: 'dual' uses undefined class
>>                                 'CGAL::Dual<Arr_with_hist_2>'
>>                                 and I think it's for
>>                                 Arrangement_with_history_2 that I use to
>>                                 define the arrangement in the code. Now
>>                                 I need to convert Arr_with_hist_2 to
>>                                 Arrangement_2 and I don't know how to do
>>                                 this?
>>                                 my CGAL type definition :
>>
>>                                 
>> typedefCGAL::Cartesian<CGAL::Exact_rational>Kernel;
>>
>>                                 typedefKernel::Circle_2Circle_2;
>>
>>                                 typedefKernel::Segment_2Segment_2;
>>
>>
>>                                 
>> typedefCGAL::Arr_circle_segment_traits_2<Kernel>Circle_Segment_traits_2;
>>
>>                                 typedefstd::stringCurve_Name;
>>
>>                                 
>> typedefCGAL::Arr_consolidated_curve_data_traits_2
>>
>>                                 
>> <Circle_Segment_traits_2,Curve_Name>Traits_2;
>>
>>                                 typedefTraits_2::Point_2TPoint_2;
>>
>>                                 typedefTraits_2::Curve_2Curve_2;
>>
>>                                 typedefTraits_2::CoordNTCoordNT;
>>
>>
>>                                 
>> typedefCGAL::Arr_face_extended_dcel<Traits_2,unsignedint>Dcel;
>>
>>                                 
>> typedefCGAL::Arrangement_with_history_2<Traits_2,Dcel>Arr_with_hist_2;
>>                                 
>> typedefCGAL::Dual<Arr_with_hist_2>Dual_arrangement;
>>                                 
>> typedefCGAL::Arr_face_index_map<Arr_with_hist_2>Face_index_map;
>>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss