Converting a stl file to 3D image with coordinates

112 views (last 30 days)
I used a stlTool (https://www.mathworks.com/matlabcentral/fileexchange/51200-stltools?focused=71cf4e4a-1612-df59-cbe4-75d6b8243681&tab=function) to get coordinates from a stl file. How can I use these coordinates to plot an accurate 3D image?
It just has to be accurate and 3D. Thanks in advance !

Answers (1)

Cris LaPierre
Cris LaPierre on 4 Apr 2019
You don't need to use stltools (nothing against it). Use the built-in stlread and trimesh. See this post for more.
data = stlread('model.stl');
trimesh(data,'FaceColor','none','EdgeColor','k')
  2 Comments
Jun Jie Koh
Jun Jie Koh on 6 Jul 2022
hi, do you know how to extract the stlread data to be displayed with volumeViewer App?
Cris LaPierre
Cris LaPierre on 6 Jul 2022
Sorry, I do not know a good way to do this. The volume viewer app expects an MxNxP array while stl files just contain point coordinates and a connectivity list.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!