READMESH_STL Read mesh data stored in STL format. [VERTICES, FACES] = readMesh_stl(FNAME) MESH = readMesh_stl(FNAME) Example readMesh_stl References Wrapper function for MATLAB's build-in stlread. See also meshes3d, readMesh, readMesh_off, readMesh_ply
0001 function varargout = readMesh_stl(fileName) 0002 %READMESH_STL Read mesh data stored in STL format. 0003 % 0004 % [VERTICES, FACES] = readMesh_stl(FNAME) 0005 % 0006 % MESH = readMesh_stl(FNAME) 0007 % 0008 % Example 0009 % readMesh_stl 0010 % 0011 % References 0012 % Wrapper function for MATLAB's build-in stlread. 0013 % 0014 % See also 0015 % meshes3d, readMesh, readMesh_off, readMesh_ply 0016 0017 % ------ 0018 % Author: oqilipo 0019 % Created: 2021-02-12, using Matlab 9.9.0.1538559 (R2020b) 0020 % Copyright 2021 0021 0022 TR = stlread(fileName); 0023 vertices = TR.Points; 0024 faces = TR.ConnectivityList; 0025 0026 varargout = formatMeshOutput(nargout, vertices, faces); 0027 0028 end