function [VertexData,FVCD,isBinary]=stl2matlab(stlfile) % STL2MATLAB reads STL-file, ASCII or binary format, into Matlab % % Usage: % % [VertexData, FVCD]=stl2matlab(stlfile) % % Input: % % stlfile - STL-file % % Output: % % VertexData - Cellarray containing matrices with vertices % FVCD - FaceVertexColorData % isBinary - Flag with STL-file information % % To plot the STL-object use plotSTL(VertexData) or plotSTL(VertexData,FVCD) % % m-file can be downloaded at % http://www.mathworks.com/matlabcentral/fileexchange/13253-iges-toolbox % % written by Per Bergstrm 2012-01-09 % if nargin == 0 warning('No STL-file is specified'); end VertexData=cell(1,3); try % Try to read an STL ASCII file [VertexData{ 1}, VertexData{ 2}, VertexData{ 3}, FVCD] = stlAread(stlfile); isBinary=false; catch try % Try to read an STL binary file [VertexData{
如何用MATLAB读stl并显示点云文件
最新推荐文章于 2025-06-30 17:38:11 发布