Subject: CGAL users discussion list
List archive
- From: TONG FU <>
- To:
- Subject: Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths
- Date: Fri, 16 Jun 2017 16:54:36 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:oeCAQBYzO2JVjbk6QIcxtwj/LSx+4OfEezUN459isYplN5qZoMS9bnLW6fgltlLVR4KTs6sC0LuJ9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQtFiT6/bL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjE7/mHZisJ+gqFGrhy/uxNy2JTbbJ2POfdkYq/RYdEXSGxcVchRTSxBBYa8YpMRAeQYJehWrpT2qVsAohCjAgSsCv7vyiNPhn/w0q031+osHBrJ3AwlBd0OsXDUoM/pO6cVVOC41a/FxijNYfNR3Dfy8onIchY5rPGKR71/atHeyU0xGA/fklqQronlMyuU1uQLqWib7vBvWfihi249rQx6vzuhxt80h4XXmo4YzkrI+CZ5zYovO9G0VUF2bcSrHZZfsSyRKpF4Tdk4Q25yvSY30r0GtoC/fCgN0JknwgTQa/2Dc4SR4xLjSPqdLS52hH9qd7+znRmy8U+nyu3zUsm7zkxGoTZCktnJrnwN1hrT5dabSvZl4EutxTKC2xrQ5+xEO0w4i7fXJpE7zrM/mZcfqUHDETX3mEXygq+WbEIk+u2w5uTpf7XmupicN4l7igz6PKkjgcO/AeEiPQgPW2iX4/iz1Lrm/UHhWrVFkuU2krXFsJDdPckUuqG5DBVR0oo69hm/Diym38gFnXkcN1JIYwmHjojsO1HWOv/0F/a/g1K2kDdq3f/KJLPhAo+eZkXFi6rrKLZh91ZHmk101sFa/5sSC7cbIfu1VFW2r83dFhZ+Mgq6xKHsB9x5k48fQmmSGbTKDKSHulCB4qcjIvKHeZQOkDf7MfksofD03lEjnlpIQY6P8tM5VTjsEOl6JEOWMCHEjdIIEGNMtQ07Gr+5wGaeWCJeMi7hF5k34Ss2Xdqr
Sorry for my language.
I have some polylines on a triangulate surface. I want to find the shortest path between each two point of these polylines. So I use the package 'triangulated surface mesh shortest path'. I set all points on a polyline as a set of source points S. I have a target point t. If I want to find the shortest path between t and S(3), what should I do?
2017-06-16 16:32 GMT+02:00 Sebastien Loriot (GeometryFactory) <>:
Could you rephrase your question, because it is not clear to me what you
want to know.
Thanks,
Sebastien.
On 06/16/2017 04:11 PM, Tong wrote:
Hello,
I'm now working on the calculation of shortest path between two points. I
have a sequence of the source points. Is it possible to calculate the
shortest path between my target point and one of the source points (for
example, the third point in this sequence)?
Here is my solution. Since each time I remove a source point, the sequence
tree rebuilds. It takes to much time to get the resultat.
face_iterator fit, fit_end;
boost::tie(fit, fit_end) = faces(polyhedron);
std::vector<face_descriptor> face_vector(fit, fit_end);
const std::size_t nb_source_points = n_vertices;
Traits::Barycentric_coordinate face_location = {{0.25, 0.5, 0.25}};
std::vector<Face_location> faceLocations(nb_source_points,
Face_location(face_descriptor(), face_location));
for (j = 0; j < nb_source_points; ++j)
{
faceLocations[j].first=face_vector[boost::lexical_cast<int>(face_id[j])];
}
std::cout<<"construct a shortest path query object and add a range
of source points..."<<std::endl;
Surface_mesh_shortest_path shortest_paths(polyhedron);
shortest_paths.add_source_points(faceLocations.begin(),
faceLocations.end());
std::cout<<"add source points for one polyline
finished"<<std::endl;
shortest_paths.source_points_begin();
//calculate the shortest path bewteen two points
for(j = 0;j<n_vertices-1;j++){
shortest_paths.remove_source_point(shortest_paths.source_points_begin());
face_iterator face_it = faces(polyhedron).first;
std::advance(face_it,boost::lexical_cast<int>(face_id[j]));
// collect the sequence of simplicies crossed by the shortest
path
Sequence_collector sequence_collector;
shortest_paths.shortest_path_sequence_to_source_points(*face_it,
face_location, sequence_collector);
}
Thank you.
--
View this message in context: http://cgal-discuss.949826.n4.nabble.com/Triangulated-Surface-Mesh-Shortest-Paths-tp4662769.html
Sent from the cgal-discuss mailing list archive at 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
- [cgal-discuss] Triangulated Surface Mesh Shortest Paths, Tong, 06/16/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, Sebastien Loriot (GeometryFactory), 06/16/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, TONG FU, 06/16/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, TONG FU, 06/16/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, Sebastien Loriot (GeometryFactory), 06/16/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, TONG FU, 06/16/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, Sebastien Loriot (GeometryFactory), 06/19/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, TONG FU, 06/20/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, Julia Fischer, 06/21/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, TONG FU, 06/20/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, Sebastien Loriot (GeometryFactory), 06/19/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, TONG FU, 06/16/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, TONG FU, 06/16/2017
- Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths, Sebastien Loriot (GeometryFactory), 06/16/2017
Archive powered by MHonArc 2.6.18.