Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] How can I fetch the label value of a mesh vertices?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] How can I fetch the label value of a mesh vertices?


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] How can I fetch the label value of a mesh vertices?
  • Date: Mon, 9 Sep 2019 06:32:15 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:qz9IFxIb0v6UY2Uw8dmcpTZWNBhigK39O0sv0rFitYgfKvXxwZ3uMQTl6Ol3ixeRBMOHsqgC0rqL+PC8EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCejbb9oMRm7rgXcusYVjIZtN6081gbHrnxUdupM2GhmP0iTnxHy5sex+J5s7SFdsO8/+sBDTKv3Yb02QaRXAzo6PW814tbrtQTYQguU+nQcSGQWnQFWDAXD8Rr3Q43+sir+tup6xSmaIcj7Rq06VDi+86tmTgLjhSEaPDA77W7XkNR9gr9FrhKvpxJxwIDab4+aO/V8YqzTcsgXRXZDU8tLSyBNHo2xYokJAuEcPehYtY79p14WoBewGAejGvjgxSVThn/q3K01zeIhGhzA0gwnBdIOsXPUrMnoP6sWUO660q7IzTDdYPNKwzf86IjGfQo9rvGQWrJwa8rQxUwhGwjYiViQsojlPzSP1uQMtGib8/BsVeeri2M8pAFxpyKgxsYoioXTmo0VzVXE+Dx/zY0oK9O4T0t7bsSlEJtWryyaMZF5Tdg5TGFspik20KEJuZm+fCUM1Z8pxAbfZuSZf4SU5h/vTuWcLDdiiH54Zr6yhAy+/Eeux+HkSMW7ykpGojdAn9bSuH0A2Bne5daJSvZ84kis3CuD2g/I5e1YJE07i7fUJIAvz7M1iJYesUrOEyHzlUj4iKKZa0sk9+205Ov7Y7jpuJmRPJJuhA7kKKQhgMm/DPw4MgcQW2ib/vyx1Lj58k34RLVGl/M3kqzEvJzDK8QWqaC0DxVa0oYk7Ba/ADOm38oCkXYbK1JFfQqLj4nvO17QPPD1Femzj0ionTtxxP3LPqftDojTInXAirvscrhw51ZZyAUpzNBf45xUCqsGIPL2QkLxr9jYDhgjMwy1xObnFM9x1oYaWW+UDa+ZNbndsV6M5u41P+aMY4oVtC7nK/c5//7ukWM5mVgFcKa10psYcnS4Eu17LEWYenrjnsoBEXwRvgclV+zriFiCUSZJaHqoXqI84Cs7CIO8AovZSICtmu/J4CDuFZJfYiVKC0uHDGzzX4SCQfYFLiyIceF7lTlRH4OsQYY6yRCjskfezKBmKfacugIVspfuyMJkyeTYiRYo5H0+R5CG12aXTmZo2GYMbzAz1aF750d6zwHQguBDn/VEGIkLtLtyWQAgOMuElrAoO5XJQgvEO+yxZhO+WNz/WGM+S9swx5kFZEMvQ4zz3CCG5DKjBvour5LOAZU19qzG2H2ofpRyzn/H0O8qiFx0G5ISZ13jvbZ28k3oP6CMk0idkPz3J6EV3SqI62LaiGTS5wdXVwl/VaiDVncaNBPb

Should be: get(MAP, KEY) --> get(label, vd)

Sebastien.

On 9/7/19 8:54 PM, Shrabani Ghosh wrote:
Thank you for your reply.
I tried to do something like this. But it's not working.

#include <string>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
#include <boost/foreach.hpp>
#include <fstream>
#include <list>
#include <iostream>
#include <CGAL/Polyhedron_items_with_id_3.h>
#include <boost/graph/kruskal_min_spanning_tree.hpp>
#include <boost/property_map/property_map.hpp>


typedef CGAL::Simple_cartesian<double> K;
typedef CGAL::Surface_mesh<K::Point_3> Mesh;
typedef Mesh::Vertex_index vertex_descriptor;
typedef boost::graph_traits<Mesh>::vertex_iterator vertex_iterator;
typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
typedef Mesh::Face_index face_descriptor;
typedef boost::graph_traits<Mesh>::edge_descriptor edge_descriptor;
std::list<edge_descriptor> mst;

int main()
{


Mesh m;
std::ifstream is("../data/TwoBoxesEqualSideBySide_MM2M.off") ; is >> m ;
if (!CGAL::is_triangle_mesh(m)){
std::cerr << "Input geometry is not triangulated." << std::endl;
return EXIT_FAILURE;

}


// retrieve the point property for which exists a convenience function
Mesh::Property_map<vertex_descriptor, std::int> label;
BOOST_FOREACH( vertex_descriptor vd, m.vertices()) {
std::cout << get(vd, label) << std:: endl;
// std::cout << "point " << vd << " location " << location[vd] <<
std::endl;
}

return 0;
}



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




Archive powered by MHonArc 2.6.18.

Top of Page