Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2

Subject: CGAL users discussion list

List archive

[cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2


Chronological Thread 
  • From: Yoann LE BARS <>
  • To:
  • Subject: [cgal-discuss] Plotting a mesh: Geom_traits with Triangulation_data_structure_2
  • Date: Mon, 12 Nov 2018 14:06:13 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=Pass
  • Ironport-phdr: 9a23:wEe0pxx4iKE0oaPXCy+O+j09IxM/srCxBDY+r6Qd1OwRIJqq85mqBkHD//Il1AaPAd2Eraocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HRbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRH2iCkJKj03/m/ZhcN/kK1VrwmspwB8zoPOfI2ZKPRzc6HbcNgHRWRBRMFRVylZD4y+aIsAFewBPeBFpIf7qFUFsAazCBWwCu3y1zRFgX/33aog3OQnFwHLxwggEMwXvHvPttr1LrwSXfqzzKbW0TXOdvVb0irz5ojPdxAuu/CMXbRofMrV10YjDhjKgU+KqYz+JT+V0PoCs3SD4+V8WuKgkWonpxt2oji1ycchjJTCiIENyl3c6yl13YQ4KcelREN4f9KoCphduiGAO4drXs8vR3lktDs+x7AGo5K3YjYGxIk9yxLBafGLaYmF7xblWe2MOzl3nmhld6i6hxuq8Uiv1On8Vs6s3VZPtCVFk93MtnEL1xPP7siHTeZ98Vq71TmT0ADT7/lIIUEylaXFN54s2qA8mocRvEjZAyP7m1v6gLWVe0gk4OSk9vjrb7H+qp+ZLYB0iwX+Mqo0msy4BOQ1KggPX2+B9uS60r3u5kn5T6tTgvItiKbZqovaKd4dpqGnHw9Zypwj5AqnDze6zNQYmmEKI05KeB2di4jlIkzBIPHjDfijnlSsiyxryuvdPrzhB5XNNmLMnK3gfbZ78U5cyRA8wcpR55JOWfk9J6f4VUb18dDZFRQkKBecwuD9Cdw72JlNd3iIB/qoN6rUtxesy6oFCtO3LNsEvz/7LdAh6rvkhGUi31kQYf/6jtMsdHmkE6E+cA2ian32j4JZSDZYjk8FVOXvzWa6f3tWbne2Ubg742hgWoarSI3KXJvrhrGdjn/iQs9mI1teA1XJKk/GMp2eUq5XOiafZ8VoiCdCU7W9Gdd4iEOe8TTiwr8iFdL6vy0VsZW6i4pw7uzXlBc58TtpA4KW1GTfFmw=


Hello everybody out there!

Well, I have yet another problem. Thanks to Chris Marsh (thread from
October 8th to October 9th on this mailing list), I have been able to
load a 2D mesh with CGAL, actually making it a 3D mesh with z component
set to 0. Now, I need to plot it and as the code I am working on use Qt
(version 5), I try to use “CGAL::Qt::TriangulationGraphicsItem”.

Here are the definitions I use:

/// \brief Allows for using 2D algorithms on the 3D points.
typedef CGAL::Projection_traits_xy_3<K> Gt;
/// \brief Vertex class.
typedef CGAL::Triangulation_vertex_base_2<Gt> Vb;
/// \brief Custom face class, use default face and vertex as required.
typedef CGAL::Constrained_triangulation_face_base_2<Gt> Fb;
/// \brief Type for 2D triangulation with CGAL.
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Triangulation;

I try to create a “TriangulationGraphicsItem”:

p = new CGAL::Qt::TriangulationGraphicsItem<Triangulation> (mesh);

The “mesh” object being an instantiation of “Triangulation”.

But I obtain this error while compiling:

/usr/include/CGAL/Qt/TriangulationGraphicsItem.h:44:35: error: no type
named ‘Geom_traits’ in ‘class
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>
> >’

So it turned out the classes I use do not have a “Geom_traits” type.
In
a way or another, I need to provide this type. I cannot find more clue
on the documentation: maybe should I use some other classes? Does anyone
have some documentation for drawing with CGAL and Qt5, beside the
following, which did not gave me enough information to solve my problem?

https://doc.cgal.org/latest/GraphicsView/index.html

Best regards.

--
Yoann LE BARS
http://le-bars.net/yoann
*Diaspora :




Archive powered by MHonArc 2.6.18.

Top of Page