Changeset 24766
- Timestamp:
- 04/30/20 12:39:47 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/mesh/meshintersect3d.m
r24155 r24766 28 28 hold on;plot3(x(s(j)),y(s(j)),z(s(j)),'c.','MarkerSize',40) 29 29 end 30 disp(['Vertex ' num2str(i) ' of input mesh coincides with vertices ' num2str(s) ' of output mesh']); 30 disp(['Vertex ' num2str(i) ' of input mesh coincides with the following output mesh vertices ']); 31 s 31 32 if force, 32 33 indices(i)=s(1); … … 37 38 indices(i)=s; 38 39 end 39 e nd40 else 40 41 41 %we could not find a 0 distance, find the lowest tolerance that generates a find: 42 count=1; 43 while isempty(s), 44 if count>1000, 45 disp(['could not find a vertex matching vertex ' num2str(i) ' of input mesh!']); 46 disp('Might think about changing tolerance increment'); 42 %we could not find a 0 distance, find the lowest tolerance that generates a find: 43 count=1; 44 while isempty(s), 45 if count>1000, 46 disp(['could not find a vertex matching vertex ' num2str(i) ' of input mesh!']); 47 disp('Might think about changing tolerance increment'); 48 error(''); 49 end 50 tolerance=tolerance+tolincrement; 51 s=find(distance<tolerance); 52 count=count+1; 53 end 54 if tolerance>maxtol, 55 disp(['found matching vertices ' num2str(s) ' in output mesh for input mesh vertex ' num2str(i) ]); 56 disp(' however, these vertices are farther that the max tolerance allowed!'); 47 57 error(''); 48 58 end 49 tolerance=tolerance+tolincrement; 50 s=find(distance<tolerance); 51 count=count+1; 59 60 %recover minimum distance: 61 sf=distance(s); 62 pos=find(sf==min(sf)); 63 s=s(pos); 64 indices(i)=s; 52 65 end 53 if tolerance>maxtol,54 disp(['found matching vertices ' num2str(s) ' in output mesh for input mesh vertex ' num2str(i) ]);55 disp(' however, these vertices are farther that the max tolerance allowed!');56 error('');57 end58 59 %recover minimum distance:60 sf=distance(s);61 pos=find(sf==min(sf));62 s=s(pos);63 indices(i)=s;64 66 end 65 67
Note:
See TracChangeset
for help on using the changeset viewer.