Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Load a mesh in Gmsh format

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Load a mesh in Gmsh format


Chronological Thread 
  • From: Yoann LE BARS <>
  • To:
  • Subject: Re: [cgal-discuss] Load a mesh in Gmsh format
  • Date: Fri, 9 Nov 2018 12:10:45 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=Pass
  • Ironport-phdr: 9a23:Fsc6dhUhdEGaMxP9P/sY6yQT2LPV8LGtZVwlr6E/grcLSJyIuqrYYxOGt8tkgFKBZ4jH8fUM07OQ7/i/HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba9wIRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KptVRTmijoINyQh/W/KlMJwgqJVrhGvqRNxzIHbYp2aOvVlc6PBft4XX3ZNUtpfWiFDBI63cosBD/AGPeZdt4TypVwOogG4BQmqGejhzDBGjWLr0KAmz+ovDBzN0QsgHtIJqnvUqtP1ObwWUe+r1aXH1i/Mb+lN2Tvn7ojHbAwhrOiKULltf8TRzkwvGBnEjlWWsYHlOy2a2v0WvGeB9epgTviji2g5pAFtujSg2t8sipHTioIV1F/E7zt2zYAoLtO7UE52ecCoHIZSui2AKod7Qd0uT3trtSs60LEKpIK3cSwSxJg6wxPSa+aLf5aW7h7+TuqdPzV1iGhkdb++gRu57FKuxffmVsau1VZHtipFncfItnAKzxHT79KISvp5/keg3zaAywTT6uZZIU8pj6bUN5khwrsompoSt0TMADP2lV3ogKOLdEgo4PWk5uf5brn8pZKRN5V4hhziPqkqgsC/BP43MgkKX2iV4+S807jj8FX5QbVNlPI2lK/ZvYveJcsFv6K2GBVa0pw46xqlCTepzsgYkWEdLF1ZYBKHk5TpO1bWLf/kAvewmVCsnC52yPDHJb3uHojNLmPYkLr6ZrZ860tcyBIpwtxF5pJUDKsBIPPpVUPrutzYFExxDwvhyOnuDJBx15gVRHmUKq6fKqLb91GStcw1JOzZVYgcvjC1D9VtzdfUtjdtiFgUe6+B2ZZSYnmiBbJgLlnPMimkucsIDWpf5ll2d+ftklDXCWcCNUb3ZLo143QAMKzjCI7CQo63h7nYh3W/E9hcb3pdTFaBDSWwLtnWa7I3cCuXZ/RZvHkcT7H4EN0l2FSkvRXhjbxqMriMo3BKhdfYzNFwotbru1Qy+DhzVpvP1miMS2BylWcPWjNw16d68xVw


Hello everybody out there!

On 2018/11/09 at 04:28 am, Chris Marsh wrote:
> I'm sorry to hear this is being so problematic. I've attached the code
> and cmake file to this email -- I hope the list doesn't strip it out.
> I've cc'd you on this email just to be sure.
> This code correctly compiles and runs for me.

Well, I have received it anyway, thank you.

I have been able to compile and run it (I just add “#include
<iostream>” at the beginning of “main.cpp”). Here is the result of the run:

$ ./main
#veterx=3
#faces=1

The result is the one expected.

Still, I have this compilation error on my own code:

/home/lebarsy/Codes/UWWatch-test/src/gmsh.cpp:131:27: error:
‘__gnu_cxx::__alloc_traits<std::allocator<CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<CGAL::Projection_traits_xy_3<CGAL::Epick>,
CGAL::Triangulation_ds_vertex_base_2<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>
> > > >, CGAL::Default, CGAL::Default, CGAL::Default>, false> >
>::value_type {aka class
CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<CGAL::Projection_traits_xy_3<CGAL::Epick>,
CGAL::Triangulation_ds_vertex_base_2<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>
> > > >, CGAL::Default, CGAL::Default, CGAL::Default>, false>}’ has no
member named ‘set_point’

I am investigating it, but I have not found what is wrong yet.

Just to let you know, here are my definitions:

/// \brief Type for CGAL mesh kernel.
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
/// \brief CGAL 2D points type.
typedef K::Point_2 Point;
/// \brief CGAL 3D points type.
typedef K::Point_3 Point3;
/// \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;
/// \brief Mesh vertex type.
typedef Triangulation::Vertex_handle Vertex;

And here are the lines that cannot be compiled:

// Mesh vertices set.
std::vector<Vertex> vertex (x.size());
for (std::size_t i = 0; i < x.size(); ++i) {
// Current point coordinates.
const Point p (x[i], y[i]);
vertex[i] = mesh.create_vertex();
vertex[i].set_point(p);
}

I have already tested without using “const” when creating “p” and
using
“Point3” rather “Point”, the error is still the same.

Well, as I have a running example, I should be able to solve the
problem.

Best regards.

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




Archive powered by MHonArc 2.6.18.

Top of Page