Converting a stl file to 3D image with coordinates

112 次查看(过去 30 天)
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 !

回答(1 个)

Cris LaPierre
Cris LaPierre 2019-4-4
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 个评论
Jun Jie Koh
Jun Jie Koh 2022-7-6
hi, do you know how to extract the stlread data to be displayed with volumeViewer App?
Cris LaPierre
Cris LaPierre 2022-7-6
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.

请先登录,再进行评论。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by