File Exchange

image thumbnail

Function for importing and plotting STL files in MATLAB

version 1.0 (1.54 KB) by

This file will import and plot ASCII STL file in MATLAB.

27 Downloads

Updated

View License

The file may not be time and space efficient but i think its well documented and can be easily understood by beginners.To avoid complexity file does not consider normal vectors.

Comments and Ratings (2)

Ron Perrone

Unfortunately this function didn't work for me. Wouldn't read the file.

 Error in readSTL (line 4)
fid=fopen(Practice_epiphysis);

Open to suggestions?

Eric Ludlam

Eric Ludlam (view profile)

I like this simple reader which worked great for output from openSCAD.

I used this code snippet to convert the coordinate return value into something I could drop right onto a patch object:

    verts = reshape(coordinates,3,[])';
    tri = reshape(1:size(verts,1),3,[])';

MATLAB Release
MATLAB 8.0 (R2012b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video