Index: /issm/trunk-jpl/src/m/mesh/meshintersect3d.m
===================================================================
--- /issm/trunk-jpl/src/m/mesh/meshintersect3d.m	(revision 24765)
+++ /issm/trunk-jpl/src/m/mesh/meshintersect3d.m	(revision 24766)
@@ -28,5 +28,6 @@
 					hold on;plot3(x(s(j)),y(s(j)),z(s(j)),'c.','MarkerSize',40)
 				end
-				disp(['Vertex ' num2str(i) ' of input mesh coincides with vertices ' num2str(s) ' of output mesh']);
+				disp(['Vertex ' num2str(i) ' of input mesh coincides with the following output mesh vertices ']);
+				s
 				if force,
 					indices(i)=s(1);
@@ -37,29 +38,30 @@
 				indices(i)=s;
 			end
-		end
+		else
 
-		%we could not find a 0 distance, find the lowest tolerance that generates a find: 
-		count=1;
-		while isempty(s),
-			if count>1000,
-				disp(['could not find a vertex matching vertex ' num2str(i) ' of input mesh!']);
-				disp('Might think about changing tolerance increment');
+			%we could not find a 0 distance, find the lowest tolerance that generates a find: 
+			count=1;
+			while isempty(s),
+				if count>1000,
+					disp(['could not find a vertex matching vertex ' num2str(i) ' of input mesh!']);
+					disp('Might think about changing tolerance increment');
+					error('');
+				end
+				tolerance=tolerance+tolincrement;
+				s=find(distance<tolerance);
+				count=count+1;
+			end
+			if tolerance>maxtol, 
+				disp(['found matching vertices ' num2str(s) ' in output mesh for input mesh vertex ' num2str(i) ]);
+				disp(' however, these vertices are farther that the max tolerance allowed!');
 				error('');
 			end
-			tolerance=tolerance+tolincrement;
-			s=find(distance<tolerance);
-			count=count+1;
+
+			%recover minimum distance: 
+			sf=distance(s);
+			pos=find(sf==min(sf)); 
+			s=s(pos);
+			indices(i)=s;
 		end
-		if tolerance>maxtol, 
-			disp(['found matching vertices ' num2str(s) ' in output mesh for input mesh vertex ' num2str(i) ]);
-			disp(' however, these vertices are farther that the max tolerance allowed!');
-			error('');
-		end
-
-		%recover minimum distance: 
-		sf=distance(s);
-		pos=find(sf==min(sf)); 
-		s=s(pos);
-		indices(i)=s;
 	end
 
