File Exchange

image thumbnail

Binary STL file reader

version 1.0.0.0 (2.91 KB) by Grant Lohsen
Update of the stlread function by Francis Esmonde-White to properly implement color reading.

4 Downloads

Updated 18 May 2012

View License

This function is used for loading binary STL files.

There are already two stlread.m files available on the mathworks file exchange site. Harlev's version reads in the data and returns matrices with X/Y/Z formatted vertex data. Johnson's program reads in the data and returns Face/Vertex/Normal matrices.

This submission also exports Face/Vertex/Normal matrices, but runs about 30 times faster than Johnson's version and 13 times faster than Harlev's version (which doesn't export face normal data).

This submission will also properly read in color values (if present) and the STL file title.

For more info (including timing info) see: http://www.esmonde-white.com/home/diversions/matlab-program-for-loading-stl-files

Comments and Ratings (3)

Jimmy

Really easy and good to use, thanks a lot!

Anthony

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Binary STL file reader