Patchslim is used when loading matrices with stlread to reduce the vertex matrix size.
Surface meshes often have duplicate vertices listed. This function parses the list of points and finds all vertices with duplicate entries in the 'v' (vertices) matrix. These points are removed and the 'f' (faces) matrix indices are set accordingly.
This reduces the size of patch matrices, often by quite a bit. This program can take quite a while to run on very large meshes. I use this to shrink surface mesh sizes after loading them in with 'stlread.m', at http://www.mathworks.com/matlabcentral/fileexchange/29906-binary-stl-file-reader .
USAGE: [v, f]=patchslim(v, f)
For more info, see: