Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Triangulated Surface Mesh Shortest Paths
  • Date: Fri, 16 Jun 2017 17:14:23 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:pqwdaxCVYcBBrgxm8dJ2UyQJP3N1i/DPJgcQr6AfoPdwSPX6ocbcNUDSrc9gkEXOFd2CrakV1KyO6+jJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fdbghMhjexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfOpWxWJsJV2Nmhv3+9m98p1+/SlOovwt78FPX7n0cKQ+VrxYES8pM3sp683xtBnMVhWA630BWWgLiBVIAgzF7BbnXpfttybxq+Rw1DWGMcDwULs5Xymp4aV2Rx/ykCoJKiA38G/XhMx3j6xVrhyuqBN9zIHIb4+YL+Z+c6HHcN8GWWZMUMRcWipcCY28dYsPCO8BMP5Wo4fguVQBtgGxBRKwBOPu1DBIgGL906s90+Q7EAHG2xAgFM8KvHrVstr1M6ISXv6pzKnSzTTNb+lZ1ivh6IjPaBAgofSAUbxtesfW0kkvEwTFjk+RqYziIzOZzOENs2yA4upvUOKgkW8nqwVrrjezwccsj5DEi4QIwV7K8iV5xZw6Jdy+SENjZ96rCoBfuDqeN4RoWM8tX2ZouCMixr0Hv567ZikKx449yx7RcfyKdZWD7BH7VOuJIzp1i2hpdK+hixuy60StyfPwWtO03VtEtiZIkNrBumoT2xHc68WLUOZx80Ov1DqV1Q3e6udJKl0um6XBMZ4u2Lswm4ITsUvdGi/2n137jKqMeUUl/uik8urmYrD6qpOFOY95ig/zPr4hmsy4BuQ4PQwOUHaB9eug073j+FX1QLRMjvIojqnUqJLXKMsBqqKkHQNY0pwv5hWhAzu80NkVk2ELLFdfdxKGi4jpNUvOIPf9DfqnmFSslDBrx+rHPr3mHpXBNH3DkLP6cLZy7k5T0gszzdRF651IDbEBJer/WlXtu9zAEh85Lwu0zv77B9VyzIweXXuDDbKYMKPJrVCI+/kvI/KXaY8OuDf9LuAl6OT0gX84n18dZ6ip0oENZHC2BPQ1a3ifemfm19cdDX8R7E15V/3vkFTEUDhJZn/0Ubh7/SA+EIvhDIHNQcemj7WFmSu6BZZLfXsVNlfZGnjhc8CIWuwHdTmJCs5niD0NE7a7GKE70hT7/jT3wbN8MuvZ/GU8soji08Q9p8LekhQ/6SZlIc2Wz2aXXiA+1jcTQzgs3adj50l54liG2Kl8xfdfEIoAtLtyTg4mOMuEnKRBANfoV1eZcw==
  • Organization: GeometryFactory

Let me rephrase to see if I got your question right:
You have an ordered sequence of points on a triangle mesh
(defining a polyline) and you would like to get the polyline
"segments" on the surface mesh between each consecutive pair of points.

Am I right?

Sebastien.


On 06/16/2017 04:54 PM, TONG FU wrote:
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)
<

<mailto:>>:

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&lt;&lt;&quot;add source points for one polyline
finished&quot;&lt;&lt;std::endl;
shortest_paths.source_points_begin();

//calculate the shortest path bewteen two points
for(j = 0;j&lt;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&lt;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

<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
<https://sympa.inria.fr/sympa/info/cgal-discuss>







Archive powered by MHonArc 2.6.18.

Top of Page