read_stl_file(name)

Version 1.0.0.0 (4.12 KB) by Eugenio
File for reading a stl file in MATLAB
500 Downloads
Updated 29 Oct 2015

View License

Get information in MATLAB about a STL file. Use it as,
[F, V, N] = read_stl_file('myfile.stl');

where F are "faces", V are "vertices" and N are "normals".

The object can be plotted with,

p = patch('Faces', F, 'Vertices', V, 'FaceColor', 'red', 'EdgeColor', 'none');

Cite As

Eugenio (2024). read_stl_file(name) (https://www.mathworks.com/matlabcentral/fileexchange/53736-read_stl_file-name), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Acknowledgements

Inspired: STL geometry cleanup

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