How to draw a Triangulation with Qt?

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

How to draw a Triangulation with Qt?

Tekel
Hello, I've been trying to follow this official example
<https://doc.cgal.org/4.13/Triangulation_2/index.html#Triangulation2Draw>
but no luck.  

How to set flags at compile time is my first problem, I don't know if
there'll be more after that.

I'd like to see the triangulation with that interface because is so simple
and pretty. My solution now is to plot using gnuplot but that envolves
writing files which at large input could be slow...I'd appreciate some help
to compile that example.

Thank you for your time.



--
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: How to draw a Triangulation with Qt?

Laurent Rineau (CGAL/GeometryFactory)
On Monday, August 13, 2018 7:08:32 PM CEST Tekel wrote:

> Hello, I've been trying to follow this official example
> <https://doc.cgal.org/4.13/Triangulation_2/index.html#Triangulation2Draw>
> but no luck.
>
> How to set flags at compile time is my first problem, I don't know if
> there'll be more after that.
>
> I'd like to see the triangulation with that interface because is so simple
> and pretty. My solution now is to plot using gnuplot but that envolves
> writing files which at large input could be slow...I'd appreciate some help
> to compile that example.
>
> Thank you for your time.

As said in the documentation, you need:

  1. to define the preprocessor macro `CGAL_USE_BASIC_VIEWER`, using the compilation flag `-DCGAL_USE_BASIC_VIEWER`, and,
  2. to link with the library CGAL_Qt5.

With CMake, you can use the following in the CMakeLists.txt, once the executable `draw_triangulation_2` is defined.

    target_compile_definitions(draw_triangulation_2 PRIVATE CGAL_USE_BASIC_VIEWER)
    target_link_libraries(draw_triangulation_2 PRIVATE CGAL::CGAL_Qt5)



--
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