Binary STL file reader

This binary STL file reader is much faster than the existing readers.
9.6K Downloads
Updated 4 Jan 2011

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

Cite As

Francis Esmonde-White (2024). Binary STL file reader (https://www.mathworks.com/matlabcentral/fileexchange/29906-binary-stl-file-reader), MATLAB Central File Exchange. Retrieved .

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0