Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2
Chronological Thread
- From: Chris Marsh <>
- To: <>
- Subject: Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2
- Date: Tue, 13 Nov 2018 10:31:19 -0600
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=Pass
- Ironport-phdr: 9a23:yotajhEGvNirKdQ5QreW6J1GYnF86YWxBRYc798ds5kLTJ7yoc+wAkXT6L1XgUPTWs2DsrQY07WQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmDiwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VDK/5KlpVRDokj8KODE38G7VisJ+gqFVrg+/qRNj2IPbep2ZOeBkc6/BYd8XR2xMVdtRWSxbBYO8apMCAvQBPeZCron9vEYFoxykCgm2H+PvyiJDi3jq0q06yeQhEBrG0BYlH90UqnTUt9X1ObwPUeCu1qbI1jbDY+lK1jjn8YXFdA0qr/+LXbJ1a8XRyE8vGhvDjlqKsoPqJDeV2foXv2eH6OpgUPqji28hqwFrozig3N0giofTho4NzlDL6zx1z50vKt2iU053e9ikH4VMty2CL4t5WNkiTHt2uCY71LIHt4S3fC8QyJQo3xLQd/OHfJKM4h75U+aROzh4iGp+eLKjnRm97UugyuriVsaqylZKoC5Fkt7Ct3wXyxPT7c2HRuNh8UehwzaP1hvT6uReLkAujqrbK4QtzaIqmZcVrE/NHTf2lV3rgKOIdUgo4Pak5urpb7n8uJOQKo95hhvgPqkhhsCzGfo0PhQKUmSB+umx1Kfv8VD4TbhLlPE6j6rUvI3cKM8GvKC2GRVV3Zwm6xunDzepztAYnX4fIVJAYh2HjozpN0vTIPDjF/i/mFesnC13yP/cJrHhA5PNIWbfkLr5YLpx9U1RxBAtwd1R6Z9YEK8NLO/zV0PrqtDVAQM1PxSxw+n9CdV90o0eWXiIAq+cKK7drV+I5vguI+mXfoMVvSzyK+I+5/7ulnI5hEQdcrOy3ZsUcny3Au5pL12DYXXwmtcBDXsKvg0mQeP2h12NSzpTa2+vUKI9/TE0FJ+mDZzYRo22m7yA3CK7HoVMaWxcC1CMF23od4SeVPsWZiKSOJwprzofSLL0S5M9zQr880jh2r9/J6zV/DcZvNTtzp9u9ujLnFYz8zJzSM+S2mXIQ2BvlX4TXGwK2/UrqkN0zhKP0LNznudDPd1V/fJAFAkgY83y1et/XvvyQAPaNvKAUk2mCoGtASswVZQ0ysUVY25gANy5jVbI1nz5UPcui7WXCclsoern1H/rKpMlkieU5Owal1AjB/B3Gyijj697+RLUAteRwViCnr2pM68VjneUqDWziFGWtUQdazZeFL3fVClHNFbNpM/6oEjLHef3VOYXdzBZwMvHEZNkL93kiVIfGaXmMdXaJX+qknyzQx2BlOqB
Hi,
I've never used the Qt functionality of CGAL, but I think you need to use just CGAL::draw(tri), as per
If I add
#include <CGAL/draw_triangulation_2.h>
<.. snip ..>
// Painter tool.
CGAL::draw (tri);
It compiles successfully. However, I get:
./src/bin/triangulation
Number of vertices = 3
Number of faces = 2
Impossible to draw because CGAL_USE_BASIC_VIEWER is not defined.
Number of vertices = 3
Number of faces = 2
Impossible to draw because CGAL_USE_BASIC_VIEWER is not defined.
I'm on MacOS and my Qt library through brew causes me nothing but problems, so it might be related to that. Otherwise this might solve it for you (didn't for me)
Everything I've read over the years suggests the viz in cgal is for quick and dirty visualization.
e.g.,
Depending
on what your needs are, you might want to consider writing to a format
that is easily visualized in another software. If you're interested in
visualizing simulation output, might I suggest writing to a Paraview (paraview.org)
format (vtu)? This approach has treated me very well. It's pretty
straightforward format to write to (VTK library does the hard part), and
Paraview is immensely useful for visualizing simulation outputs and
exploring a mesh. I can send you a paraview file that is an exported
CGAL mesh if you're interested.
Cheers
Hello everybody out there!
Well, I think I have been able to create a “CGAl::Triangulation_2” with
a given existing mesh (see the code attached to this message). Now, I am
still trying to draw it using “TriangulationGraphicsItem”, but I still
obtain a quite long compiling error. Here is the first line of error I get:
main.cpp:70:59: error: no matching function for call to
‘CGAL::Qt::TriangulationGraphicsItem<CGAL::Triangulation_2<CGAL::Epick,
CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<CGAL::Projection_traits_xy_3<CGAL::Epick>
>,
CGAL::Constrained_triangulation_face_base_2<CGAL::Projection_traits_xy_3<CGAL::Epick>
> > > >::TriangulationGraphicsItem(Triangulation&)’
CGAL::Qt::TriangulationGraphicsItem<Triangulation> p (tri);
^
The code attached is a minimal complete example, which shows how I try
to draw a mesh. Now, still, I cannot find a way to draw a mesh. Is there
any example available on how to draw a “Triangulation_2” using
“TriangulationGraphicsItem” anywhere? I cannot find any.
Best regards.
--
Yoann LE BARS
http://le-bars.net/yoann
*Diaspora :
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2, Yoann LE BARS, 11/12/2018
- Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2, Yoann LE BARS, 11/13/2018
- Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2, Yoann LE BARS, 11/13/2018
- Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2, Chris Marsh, 11/13/2018
- Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2, Yoann LE BARS, 11/14/2018
- Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2, Chris Marsh, 11/15/2018
- Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2, Yoann LE BARS, 11/15/2018
- Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2, Chris Marsh, 11/15/2018
- Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2, Yoann LE BARS, 11/14/2018
- Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2, Chris Marsh, 11/13/2018
- Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2, Yoann LE BARS, 11/13/2018
- Re: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2, Yoann LE BARS, 11/13/2018
Archive powered by MHonArc 2.6.18.