I am trying to plot an stl file but it showing error

3 次查看(过去 30 天)
FV = stlread('Part2.stl');
disp(FV);
plot(FV);
Error using plot
Data must be numeric, datetime, duration or an array convertible to double.
Error in PART1 (line 3)
plot(FV);

回答(2 个)

Wan Ji
Wan Ji 2021-8-19
编辑:Wan Ji 2021-8-19
Use triplot
FV = stlread('Part2.stl');
triplot(FV)
  1 个评论
Wan Ji
Wan Ji 2021-8-19
Or you can use patch
patch('vertices', FV.Points, 'faces', FV.ConnectivityList, ...
'facevertexcdata',FV.Points(:,2),'facecolor','interp','facealpha',0.4 );
colormap(jet)

请先登录,再进行评论。


Simon Chan
Simon Chan 2021-8-19

function trimesh is another option

类别

Help CenterFile Exchange 中查找有关 Polygons 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by