Viewer for Arrangement 2D

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

Viewer for Arrangement 2D

jasmeet.singh
Hi,

I was in the process to develop the Arrangement 2D viewer (GSoC 2019). The
viewer would basically open a new window and show the elements (points,
edges, and faces) of the arrangement in it. I was facing some issues while
working on the viewer in this  branch
<https://github.com/CGAL/cgal-public-dev/tree/gsoc2019-add_basic_viewer_arrangement-jasmeet>
. The example I added is named 'draw_arrangement.cpp'.

I started simple and am able to view an arrangement for line segments.
However, when I tried to view an arrangement of circular segments (example
circular_arcs.cpp), I witnessed the following error(s):

//----------------------------------------------------------------------------------------------------
GraphicsView/include/CGAL/Buffer_for_vao.h:82: error: no type named
‘Point_2’ in ‘struct
CGAL::internal_kernel_traits::Dummy_kernel<CGAL::_One_root_point_2&lt;__gmp_expr&lt;__mpq_struct
[1], __mpq_struct [1]>, true> >’
     static Local_point get_local_point(const typename K::Point_2& p)
                        ^~~~~~~~~~~~~~~
/home/singh/gsoc/cgal-public-dev/GraphicsView/include/CGAL/Buffer_for_vao.h:87:
error: no type named ‘Weighted_point_2’ in ‘struct
CGAL::internal_kernel_traits::Dummy_kernel<CGAL::_One_root_point_2&lt;__gmp_expr&lt;__mpq_struct
[1], __mpq_struct [1]>, true> >’
     static Local_point get_local_point(const typename K::Weighted_point_2&
p)
                        ^~~~~~~~~~~~~~~
//----------------------------------------------------------------------------------------------------

and some more errors similar to these. ( Basically, Point_2 type defined in
the Arr_circle_segment_traits_2 class, Kernel_trait<P> is Dummy_kernel
instead of the kernel used.)

I tried to troubleshoot the problem by taking a leaf out of the Arrangement
2D Demo and using the following class structure for the Arrangement 2D
viewer-

//----------------------------------------------------------------------------------------------------

template <class Arrangement_2>
class SimpleArrangementViewerQtBase : public Basic_viewer_qt
{
// Base viewer class

// function that adds elements to the buffer
// so that they can be viewed
  compute_elements();
}

template <typename Arrangement_2>
class SimpleArrangementViewerQt
    : public SimpleArrangementViewerQtBase<Arrangement_2> {
public:
  SimpleArrangementViewerQt(QWidget *parent)
      : SimpleArrangementViewerQtBase<Arrangement_2>(parent) {}
};

template <typename Kernel_, typename Dcel>
    class SimpleArrangementViewerQt <
    CGAL::Arrangement_2<CGAL::Arr_segment_traits_2&lt;Kernel_>, Dcel>>
    : public SimpleArrangementViewerQtBase<
          CGAL::Arrangement_2<CGAL::Arr_segment_traits_2&lt;Kernel_>, Dcel>>
{

  typedef SimpleArrangementViewerQtBase<CGAL::Arrangement_2&lt;Traits,
Dcel>> Superclass;

public:
  SimpleArrangementViewerQt(QWidget *parent,
                            const Arrangement_2 &a_arr,
                            const char *title)
      : Superclass(parent, title), arr(a_arr)
  {
    compute_elements();
  }
}

//----------------------------------------------------------------------------------------------------


this worked for linear segments again but when I added a similar class for
Arrangement_2 CGAL::Arr_circle_segment_traits_2 (as below), it gave me the
same errors as before.

//----------------------------------------------------------------------------------------------------

template <typename CircularKernel, typename Dcel>
class SimpleArrangementViewerQt<
   
CGAL::Arrangement_2<CGAL::Arr_circle_segment_traits_2&lt;CircularKernel>,
Dcel>>
    : public SimpleArrangementViewerQtBase<CGAL::Arrangement_2&lt;
          CGAL::Arr_circle_segment_traits_2&lt;CircularKernel>, Dcel>>
//---------------------------------------------------------------------------------------------------

1. Could you help me get around this problem?

2. To draw the various curves, the demo uses Qt5's various function defined
in qpainter.h, eg. drawArc, drawEllipse. However, the basic viewer doesn't
have support for drawing such curves. How can I draw the curves in the
arrangement without much duplication in the code? Should I write the draw
functionalities for circular arcs, bezier curves, etc. from scratch or can I
use it from somewhere?





--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
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: Viewer for Arrangement 2D

Guillaume Damiand
Hello;

The problem comes from CGAL::Kernel_traits, used to retrieve the kernel
given the type of a Point.

CGAL::Kernel_traits<Arr_circle_segment_traits_2<K>::Point_2>::Kernel is
Dummy_kernel

Is it a bug or is it normal ? I would like to obtain K.

Best
Guillaume





Le 30/07/2019 à 05:26, jasmeet.singh a écrit :

> Hi,
>
> I was in the process to develop the Arrangement 2D viewer (GSoC 2019). The
> viewer would basically open a new window and show the elements (points,
> edges, and faces) of the arrangement in it. I was facing some issues while
> working on the viewer in this  branch
> <https://github.com/CGAL/cgal-public-dev/tree/gsoc2019-add_basic_viewer_arrangement-jasmeet>
> . The example I added is named 'draw_arrangement.cpp'.
>
> I started simple and am able to view an arrangement for line segments.
> However, when I tried to view an arrangement of circular segments (example
> circular_arcs.cpp), I witnessed the following error(s):
>
> //----------------------------------------------------------------------------------------------------
> GraphicsView/include/CGAL/Buffer_for_vao.h:82: error: no type named
> ‘Point_2’ in ‘struct
> CGAL::internal_kernel_traits::Dummy_kernel<CGAL::_One_root_point_2&lt;__gmp_expr&lt;__mpq_struct
> [1], __mpq_struct [1]>, true> >’
>       static Local_point get_local_point(const typename K::Point_2& p)
>                          ^~~~~~~~~~~~~~~
> /home/singh/gsoc/cgal-public-dev/GraphicsView/include/CGAL/Buffer_for_vao.h:87:
> error: no type named ‘Weighted_point_2’ in ‘struct
> CGAL::internal_kernel_traits::Dummy_kernel<CGAL::_One_root_point_2&lt;__gmp_expr&lt;__mpq_struct
> [1], __mpq_struct [1]>, true> >’
>       static Local_point get_local_point(const typename K::Weighted_point_2&
> p)
>                          ^~~~~~~~~~~~~~~
> //----------------------------------------------------------------------------------------------------
>
> and some more errors similar to these. ( Basically, Point_2 type defined in
> the Arr_circle_segment_traits_2 class, Kernel_trait<P> is Dummy_kernel
> instead of the kernel used.)
>
> I tried to troubleshoot the problem by taking a leaf out of the Arrangement
> 2D Demo and using the following class structure for the Arrangement 2D
> viewer-
>
> //----------------------------------------------------------------------------------------------------
>
> template <class Arrangement_2>
> class SimpleArrangementViewerQtBase : public Basic_viewer_qt
> {
> // Base viewer class
>
> // function that adds elements to the buffer
> // so that they can be viewed
>    compute_elements();
> }
>
> template <typename Arrangement_2>
> class SimpleArrangementViewerQt
>      : public SimpleArrangementViewerQtBase<Arrangement_2> {
> public:
>    SimpleArrangementViewerQt(QWidget *parent)
>        : SimpleArrangementViewerQtBase<Arrangement_2>(parent) {}
> };
>
> template <typename Kernel_, typename Dcel>
>      class SimpleArrangementViewerQt <
>      CGAL::Arrangement_2<CGAL::Arr_segment_traits_2&lt;Kernel_>, Dcel>>
>      : public SimpleArrangementViewerQtBase<
>            CGAL::Arrangement_2<CGAL::Arr_segment_traits_2&lt;Kernel_>, Dcel>>
> {
>
>    typedef SimpleArrangementViewerQtBase<CGAL::Arrangement_2&lt;Traits,
> Dcel>> Superclass;
>
> public:
>    SimpleArrangementViewerQt(QWidget *parent,
>                              const Arrangement_2 &a_arr,
>                              const char *title)
>        : Superclass(parent, title), arr(a_arr)
>    {
>      compute_elements();
>    }
> }
>
> //----------------------------------------------------------------------------------------------------
>
>
> this worked for linear segments again but when I added a similar class for
> Arrangement_2 CGAL::Arr_circle_segment_traits_2 (as below), it gave me the
> same errors as before.
>
> //----------------------------------------------------------------------------------------------------
>
> template <typename CircularKernel, typename Dcel>
> class SimpleArrangementViewerQt<
>    
> CGAL::Arrangement_2<CGAL::Arr_circle_segment_traits_2&lt;CircularKernel>,
> Dcel>>
>      : public SimpleArrangementViewerQtBase<CGAL::Arrangement_2&lt;
>            CGAL::Arr_circle_segment_traits_2&lt;CircularKernel>, Dcel>>
> //---------------------------------------------------------------------------------------------------
>
> 1. Could you help me get around this problem?
>
> 2. To draw the various curves, the demo uses Qt5's various function defined
> in qpainter.h, eg. drawArc, drawEllipse. However, the basic viewer doesn't
> have support for drawing such curves. How can I draw the curves in the
> arrangement without much duplication in the code? Should I write the draw
> functionalities for circular arcs, bezier curves, etc. from scratch or can I
> use it from somewhere?
>
>
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>
--
===================================================================
Guillaume DAMIAND

CNRS - LIRIS UMR 5205
Université Claude Bernard
Bâtiment Nautibus (710)
43 Boulevard du 11 Novembre 1918
69622 Villeurbanne Cedex (France)
-------------------------------------------------------------------
Tél: +33 (0)4.72.43.14.34                 Fax: +33 (0)4.72.43.15.36
Mail: [hidden email]
Web: http://liris.cnrs.fr/guillaume.damiand/
===================================================================



smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Viewer for Arrangement 2D

Laurent Rineau (CGAL/GeometryFactory)
On Tuesday, July 30, 2019 9:29:10 AM CEST Guillaume Damiand wrote:
> Hello;
>
> The problem comes from CGAL::Kernel_traits, used to retrieve the kernel
> given the type of a Point.
>
> CGAL::Kernel_traits<Arr_circle_segment_traits_2<K>::Point_2>::Kernel is
> Dummy_kernel
>
> Is it a bug or is it normal ? I would like to obtain K.

That is strange. When `Kernel_traits` return `Dummy_kernel`, that means that
the type `Point_2` does not a nested `R` type. What is the kernel `K`, in your
example?

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/




--
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: Viewer for Arrangement 2D

MaelRL
Arr_circle_segment_traits_2 does not inherit K, and thus the typedef
will not be inherited anyway.

It could be just Arr_circle_segment_traits_2::Kernel.

On 30/07/2019 10:51, Laurent Rineau (CGAL/GeometryFactory) wrote:

> On Tuesday, July 30, 2019 9:29:10 AM CEST Guillaume Damiand wrote:
>> Hello;
>>
>> The problem comes from CGAL::Kernel_traits, used to retrieve the kernel
>> given the type of a Point.
>>
>> CGAL::Kernel_traits<Arr_circle_segment_traits_2<K>::Point_2>::Kernel is
>> Dummy_kernel
>>
>> Is it a bug or is it normal ? I would like to obtain K.
> That is strange. When `Kernel_traits` return `Dummy_kernel`, that means that
> the type `Point_2` does not a nested `R` type. What is the kernel `K`, in your
> example?
>

--
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: Viewer for Arrangement 2D

Laurent Rineau (CGAL/GeometryFactory)
In reply to this post by Laurent Rineau (CGAL/GeometryFactory)
On Tuesday, July 30, 2019 10:51:37 AM CEST Laurent Rineau (CGAL/
GeometryFactory) wrote:

> On Tuesday, July 30, 2019 9:29:10 AM CEST Guillaume Damiand wrote:
> > Hello;
> >
> > The problem comes from CGAL::Kernel_traits, used to retrieve the kernel
> > given the type of a Point.
> >
> > CGAL::Kernel_traits<Arr_circle_segment_traits_2<K>::Point_2>::Kernel is
> > Dummy_kernel
> >
> > Is it a bug or is it normal ? I would like to obtain K.
>
> That is strange. When `Kernel_traits` return `Dummy_kernel`, that means that
> the type `Point_2` does not a nested `R` type. What is the kernel `K`, in
> your example?

Actually, the issue is that `Arr_circle_segment_traits_2<K>::Point_2` is a
special class `_One_root_point_2<NT, Filter>` defined in `<CGAL/
Arr_geometry_traits/Circle_segment_2.h>` and not related to any kernel.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/




--
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: Viewer for Arrangement 2D

Efi Fogel
Without going too deep into the matter, the expression
CGAL::Kernel_traits<Arr_circle_segment_traits_2<K>::Point_2>::Kernel
does not make much sense.
Yes, there is a kernel involved, but in general, you do not know how, and in particular, the point type is not Kernel::Point_2.
The same holds for other traits.
In addition, a kernel may have state, so even if you obtain the type, it's not always wise, or even legal, to define a kernel object and use it. It should be up to the user to define and use a kernel.
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Tue, 30 Jul 2019 at 12:27, Laurent Rineau (CGAL/GeometryFactory) <[hidden email]> wrote:
On Tuesday, July 30, 2019 10:51:37 AM CEST Laurent Rineau (CGAL/
GeometryFactory) wrote:
> On Tuesday, July 30, 2019 9:29:10 AM CEST Guillaume Damiand wrote:
> > Hello;
> >
> > The problem comes from CGAL::Kernel_traits, used to retrieve the kernel
> > given the type of a Point.
> >
> > CGAL::Kernel_traits<Arr_circle_segment_traits_2<K>::Point_2>::Kernel is
> > Dummy_kernel
> >
> > Is it a bug or is it normal ? I would like to obtain K.
>
> That is strange. When `Kernel_traits` return `Dummy_kernel`, that means that
> the type `Point_2` does not a nested `R` type. What is the kernel `K`, in
> your example?

Actually, the issue is that `Arr_circle_segment_traits_2<K>::Point_2` is a
special class `_One_root_point_2<NT, Filter>` defined in `<CGAL/
Arr_geometry_traits/Circle_segment_2.h>` and not related to any kernel.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/




--
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: Viewer for Arrangement 2D

Guillaume Damiand
​Thanks for the answers.

Maybe it makes sense, but in the basic viewer, I need a specialized function for each possible type of point in CGAL.
Which types I can use for arrangement ?

Best
Guillaume


Le 30/07/2019 à 14:41, Efi Fogel a écrit :
Without going too deep into the matter, the expression
CGAL::Kernel_traits<Arr_circle_segment_traits_2<K>::Point_2>::Kernel
does not make much sense.
Yes, there is a kernel involved, but in general, you do not know how, and in particular, the point type is not Kernel::Point_2.
The same holds for other traits.
In addition, a kernel may have state, so even if you obtain the type, it's not always wise, or even legal, to define a kernel object and use it. It should be up to the user to define and use a kernel.
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Tue, 30 Jul 2019 at 12:27, Laurent Rineau (CGAL/GeometryFactory) <[hidden email]> wrote:
On Tuesday, July 30, 2019 10:51:37 AM CEST Laurent Rineau (CGAL/
GeometryFactory) wrote:
> On Tuesday, July 30, 2019 9:29:10 AM CEST Guillaume Damiand wrote:
> > Hello;
> >
> > The problem comes from CGAL::Kernel_traits, used to retrieve the kernel
> > given the type of a Point.
> >
> > CGAL::Kernel_traits<Arr_circle_segment_traits_2<K>::Point_2>::Kernel is
> > Dummy_kernel
> >
> > Is it a bug or is it normal ? I would like to obtain K.
>
> That is strange. When `Kernel_traits` return `Dummy_kernel`, that means that
> the type `Point_2` does not a nested `R` type. What is the kernel `K`, in
> your example?

Actually, the issue is that `Arr_circle_segment_traits_2<K>::Point_2` is a
special class `_One_root_point_2<NT, Filter>` defined in `<CGAL/
Arr_geometry_traits/Circle_segment_2.h>` and not related to any kernel.

--



-- 
===================================================================
Guillaume DAMIAND

CNRS - LIRIS UMR 5205
Université Claude Bernard
Bâtiment Nautibus (710)
43 Boulevard du 11 Novembre 1918
69622 Villeurbanne Cedex (France)
-------------------------------------------------------------------
Tél: +33 (0)4.72.43.14.34                 Fax: +33 (0)4.72.43.15.36
Mail: [hidden email]
Web: http://liris.cnrs.fr/guillaume.damiand/
===================================================================

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Viewer for Arrangement 2D

Efi Fogel
In some traits there is no kernel, or at least, there is no retation between the point type of the traits and a kernel. BW, a traits defines 3 types:
Point_2,
X_monotone_curve_2, and
Curve_2
The later is defined only by some of the traits, depending on the concept. 

On Sat, Aug 3, 2019, 16:16 Guillaume Damiand <[hidden email]> wrote:
​Thanks for the answers.

Maybe it makes sense, but in the basic viewer, I need a specialized function for each possible type of point in CGAL.
Which types I can use for arrangement ?

Best
Guillaume


Le 30/07/2019 à 14:41, Efi Fogel a écrit :
Without going too deep into the matter, the expression
CGAL::Kernel_traits<Arr_circle_segment_traits_2<K>::Point_2>::Kernel
does not make much sense.
Yes, there is a kernel involved, but in general, you do not know how, and in particular, the point type is not Kernel::Point_2.
The same holds for other traits.
In addition, a kernel may have state, so even if you obtain the type, it's not always wise, or even legal, to define a kernel object and use it. It should be up to the user to define and use a kernel.
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Tue, 30 Jul 2019 at 12:27, Laurent Rineau (CGAL/GeometryFactory) <[hidden email]> wrote:
On Tuesday, July 30, 2019 10:51:37 AM CEST Laurent Rineau (CGAL/
GeometryFactory) wrote:
> On Tuesday, July 30, 2019 9:29:10 AM CEST Guillaume Damiand wrote:
> > Hello;
> >
> > The problem comes from CGAL::Kernel_traits, used to retrieve the kernel
> > given the type of a Point.
> >
> > CGAL::Kernel_traits<Arr_circle_segment_traits_2<K>::Point_2>::Kernel is
> > Dummy_kernel
> >
> > Is it a bug or is it normal ? I would like to obtain K.
>
> That is strange. When `Kernel_traits` return `Dummy_kernel`, that means that
> the type `Point_2` does not a nested `R` type. What is the kernel `K`, in
> your example?

Actually, the issue is that `Arr_circle_segment_traits_2<K>::Point_2` is a
special class `_One_root_point_2<NT, Filter>` defined in `<CGAL/
Arr_geometry_traits/Circle_segment_2.h>` and not related to any kernel.

--



-- 
===================================================================
Guillaume DAMIAND

CNRS - LIRIS UMR 5205
Université Claude Bernard
Bâtiment Nautibus (710)
43 Boulevard du 11 Novembre 1918
69622 Villeurbanne Cedex (France)
-------------------------------------------------------------------
Tél: +33 (0)4.72.43.14.34                 Fax: +33 (0)4.72.43.15.36
Mail: [hidden email]
Web: http://liris.cnrs.fr/guillaume.damiand/
===================================================================
Reply | Threaded
Open this post in threaded view
|

Re: Viewer for Arrangement 2D

jasmeet.singh
Thanks, everyone for the answers. I really appreciate it.

I do not think that I truly understand what exactly has to be done to solve
the root of the issue here. Getting the Kernel from the point type is not
the right way as pointed out earlier
(CGAL::Kernel_traits<Arr_circle_segment_traits_2&lt;K>::Point_2>::Kernel).
However, the Basic viewer currently imports everything into the buffer by
first converting the points into the Kernel -
CGAL::Exact_predicates_exact_constructions_kernel.

//
-------------------------------------------------------------------------------------
  // Structs to transform any CGAL point/vector into a
Local_point/Local_vector
  template<typename K>
  struct Geom_utils
  {
    static Local_point get_local_point(const typename K::Point_2& p)
    {
      CGAL::Cartesian_converter<K, Local_kernel> converter;
      return Local_point(converter(p.x()), 0, converter(p.y()));
    }
    static Local_point get_local_point(const typename K::Weighted_point_2&
p)
    {
      typename K::Point_2 lp(p);
      return Geom_utils<K>::get_local_point(lp);
    }
    static Local_point get_local_point(const typename K::Point_3& p)
    {
      CGAL::Cartesian_converter<K, Local_kernel> converter;
      return converter(p);
    }
    static Local_point get_local_point(const typename K::Weighted_point_3&
p)
    {
      typename K::Point_3 lp(p);
      return Geom_utils<K>::get_local_point(lp);
    }
    static Local_vector get_local_vector(const typename K::Vector_2& v)
    {
      CGAL::Cartesian_converter<K, Local_kernel> converter;
      return Local_vector(converter(v.x()), 0, converter(v.y()));
    }
    static Local_vector get_local_vector(const typename K::Vector_3& v)
    {
      CGAL::Cartesian_converter<K, Local_kernel> converter;
      return converter(v);
    }
    static Local_ray get_local_ray(const typename K::Ray_2& r)
    {
      CGAL::Cartesian_converter<K, Local_kernel> converter;
      return converter(r);
    }
  };

  // Specialization for Local_kernel, because there is no need of conversion
here.
  template<>
  struct Geom_utils<Local_kernel>
  {
    static Local_point get_local_point(const Local_kernel::Point_2& p)
    { return Local_point(p.x(), 0, p.y()); }
    static Local_point get_local_point(const Local_kernel::Weighted_point_2&
p)
    { return Local_point(p.point().x(), 0, p.point().y());}
    static const Local_point & get_local_point(const Local_kernel::Point_3&
p)
    { return p; }
    static Local_point get_local_point(const Local_kernel::Weighted_point_3&
p)
    { return Local_point(p);}
    static Local_vector get_local_vector(const Local_kernel::Vector_2& v)
    { return Local_vector(v.x(), 0, v.y()); }
    static const Local_vector& get_local_vector(const
Local_kernel::Vector_3& v)
    { return v; }
  };    

  ////////////////////////////////////////////////////////////////
  // Global function to simplify function calls.
  template<typename KPoint>
  Local_point get_local_point(const KPoint& p)
  {
    return Geom_utils<typename CGAL::Kernel_traits<KPoint>::Kernel>::
      get_local_point(p);
  }
  template<typename KVector>
  Local_vector get_local_vector(const KVector& v)
  {
    return Geom_utils<typename CGAL::Kernel_traits<KVector>::Kernel>::
      get_local_vector(v);
  }
//
-------------------------------------------------------------------------------------

After trying several methods, I found a method to bypass the conversion of
the point type. I make a call to the add_point() method in circular segment
viewer after converting the point to the kernel used in the buffer of the
basic viewer.

//
-------------------------------------------------------------------------------------
typedef CGAL::Exact_predicates_exact_constructions_kernel Viewer_kernel;
Viewer_kernel::Point_3 p(to_double(vit->point().x()), 0,
                               to_double(vit->point().y()));
this->add_point(p);
//
-------------------------------------------------------------------------------------

This way the code compiles just fine and the points can be viewed in the
viewer window. I know this is probably not the best method to deal with the
problem at hand but it works for the viewer's purposes. Kindly let me know
if you can suggest doing something better.

Also, can you comment on the second part of my doubt:

2. To draw the various curves, the demo uses Qt5's various function defined
in qpainter.h, eg. drawArc, drawEllipse. However, the basic viewer doesn't
have support for drawing such curves. How can I draw the curves in the
arrangement without much duplication in the code? Should I write the draw
functionalities for circular arcs, bezier curves, etc. from scratch or can I
use it from somewhere?






--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

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