STL_Import: import function for STL files
STL_Import is a tool designed to import into MATLAB both binary and ASCII STL files.
This script is mainly a collage between file exchange file id 22409 and 3642, plus some other features that can be considered new.
SYNOPSIS:
- mode 1 (default)
[p,t,tnorm]=STL_Import(filename,mode) - mode 2
[v,tnorm])=STL_Import(filename,mode)
input:
- filename: string representing the name of the file
mode:
- mode=1 (if omitted is automatically set to one)
set the the output to:
output=[p,t,tnorm]
where:
- p=points (unique) of the model nx3 array
- t=triangles indexes of the model
- tnorm= normals of triangles
- mode=2
set the the output to:
output=[v,tnorm]
where:
- v= vertex (not unique points) of the model nx3 array. Each trhee points we have a triangle in consecutive order.
- tnorm= normals of triangles
EXAMPLES:
[p,t,tnorm]=STL_Import('link1.stl',1);%MODE1
[pv,tnorm]=STL_Import('link1.stl',2);%MODE2
[pv,tnorm]=STL_Import('link1.stl',2);%MODE2
Author: Giaccari Luigi (giaccariluigi@msn.com)
Download Now
Popularity: 29% [?]


















































