image thumbnail


version (4.12 KB) by Eugenio
File for reading a stl file in MATLAB


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 (2022). 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

Inspired: STL geometry cleanup

Community Treasure Hunt

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

Start Hunting!