Code covered by the BSD License  

Highlights from
STL File Reader

4.22222

4.2 | 10 ratings Rate this file 166 Downloads (last 30 days) File Size: 1.6 MB File ID: #22409
image thumbnail

STL File Reader

by Eric Johnson

 

11 Dec 2008 (Updated 20 Jul 2011)

STLREAD imports geometry from a binary stereolithography (STL) file into MATLAB.

| Watch this File

File Information
Description

In addition to the STLREAD import function, this submission also includes a small demo that loads an STL model of a human femur bone.

FV = STLREAD(FILENAME) imports triangular faces from the binary STL file
indicated by FILENAME, and returns the patch struct FV, with fields 'faces'
and 'vertices'.

[F,V] = STLREAD(FILENAME) returns the faces F and vertices V separately.

[F,V,N] = STLREAD(FILENAME) also returns the face normal vectors.

The faces and vertices are arranged in the format used by the PATCH plot
object.

Acknowledgements

This file inspired Binary Stl File Reader.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File  
Everyone's Tags
cad(2), data export, data import(2), faces, geometry(2), load stl, patch, read stl, stereolithography, stl, triangle mesh(2), vertices
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (12)
08 Apr 2013 Christian Kotz

Great! fast and easy to use.

23 Dec 2012 Héctor Corte

Wonderful submision. I used it to make some geek gif in my blog.
http://thebrickinthesky.wordpress.com/2012/12/23/my-own-death-star/

08 Jun 2012 Patrick

Very helpful

23 Dec 2011 Santosh ARS

i think this gives wrong faces? Please confirm.

15 Dec 2011 Robert

Thanks for your submittal. What units is the model in once I've read the stl file with Matlab. I am using NextEngine's 3D scanner and they are telling me that the units are defined by the reader utility.

12 Dec 2011 Morteza Shahpari  
11 Dec 2011 Morteza Shahpari

Very nice and useful.
Thanks

05 Jan 2011 Francis Esmonde-White

I have re-written this function to be much faster.

See:
http://www.mathworks.com/matlabcentral/fileexchange/29906-binary-stl-file-reader

04 Jan 2010 By ?

very good

22 Jan 2009 Luigi Giaccari

Very useful for binary filesl but do not support ascii format

16 Jan 2009 Jveer

very useful!

can the vertices and faces be arranged such that they can be used with surf??

textures cannot be applied to patch objects. surf is more useful.

12 Dec 2008 alain boyer  
Updates
31 Dec 2009

None

20 Jul 2011

Updated submission with example script and 3D model.

Contact us