Index: /issm/trunk/src/m/utils/Mesh/ProfileProjectOntoMesh.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/ProfileProjectOntoMesh.m	(revision 3734)
+++ /issm/trunk/src/m/utils/Mesh/ProfileProjectOntoMesh.m	(revision 3735)
@@ -14,4 +14,9 @@
 %[x0,y0] = intersections(profile.x,profile.y,x,y,1);
 [x0,y0,indices,j] = intersections(profile.x,profile.y,x,y);
+%  sort intersections to create segments in order and continuous along profile
+[indices,isort]=sort(indices);
+j =j (isort);
+x0=x0(isort);
+y0=y0(isort);
 
 %process x0,y0 so they do not include profile.x or profile.y
