read_binary_stl_fil​e(filename)

a very fast binary stl file reader.

You are now following this Submission

reads stl files in very short time. does not read color.
reads binary file and returns triangle nodes as n*3 matrix , vertices as 3n*3 matrix and normals as n*3 matrix
triangles can be plotted using trisurf or trimesh
trisurf(tri,v(:,1),v(:,2),v(:,3),'EdgeColor','red','FaceColor','green')

Cite As

Sunil Bhandari (2026). read_binary_stl_file(filename) (https://ch.mathworks.com/matlabcentral/fileexchange/62345-read_binary_stl_file-filename), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
2.0.0.0

function to plot large stl file faster is included

1.0.0.0

faster plot function added for plotting larger binary stl files