stlread()
is a function for octave that takes in a binary (NOT ASCII) .stl'a and outputs the vertices and a list of each face's vertices.
stlread()
outputs 2 matrices that can be immediately ploted using patch()
Retrieving the vertices and faces is easy
%assuming you have a file "sample.stl"
[vertices, faces, c] = stlread('sample.stl');
In order to plot these you might follow with
patch( 'Faces', faces, 'Vertices', vertices );
Thanks to edits by @zmughal code runs ~100x faster now. most STLs <40 MB should be quick.
stlview() function is being tested. it may be incorporated into the stlread() function, or become an independent function.