stlwrite - write ASCII or Binary STL files

Export a variety of inputs (patch, surface) to an STL triangular mesh

Download
Download

You are now following this Submission

Cite As

Sven (2026). stlwrite - write ASCII or Binary STL files (https://au.mathworks.com/matlabcentral/fileexchange/20922-stlwrite-write-ascii-or-binary-stl-files), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

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

Added input check for non-triangulated faces and fixed summary display to print correct face count

Download
1.8.0

Corrected face count printed output bug. Added example with coloured faces.

Download
1.7.0

Embedded version of Kevin's mesh2tri for convenience.

Download
1.6.0

Added faceColor implementation

Download
1.4.0

Huge speed improvements courtesy of Oliver Woodford. Reduction in write-time is proportional to file size.

Download
1.3.0

Allowed for more general input types, and added capability for more features to be written to STL file.

Download
1.1.0

Vectorised normal direction calculations and streamlined fprint/fwrite calls. 75% faster writing speeds.

Download
1.0.0

Download