Exporting a mesh plot from Matlab to CloudCompare
16 次查看(过去 30 天)
显示 更早的评论
Hi, i have obtained a mesh by alpha shape algorithm in matlab.
How can i export the figure in obj or tls type data from Matlab?
Thank you so much
ptCloud=pcread('Lugliotxt.ply');
pts=double(ptCloud.Location);
% Alpha Shape
shpINT=alphaShape(pts,1);
figure(3)
plot(shpINT)
VolAlphaShapeINT=volume(shpINT);
0 个评论
回答(1 个)
Sourav Karmakar
2022-1-27
Hey Stefano ,
As per my understanding, you want to export your mesh figure in MATLAB to obj or stl type of data. Exporting 3D graphics from MATLAB to the .obj or .stl file format is not directly supported. The concerned people are aware of this and might consider implementing it in any future release.
However, there is a third-party library Wavefront OBJ toolbox which has a function “write_wobj(OBJ,filename);” that can export 3D figure as an .obj file. As a workaround, there are submissions concerning STL format exports (for example stlwrite - write ASCII or Binary STL files or surf2stl) available from the MATLAB Central File Exchange.
These are one of the several submissions in MATLAB File Exchange on MATLAB Central which is a forum for our product users to interact, exchange information and knowledge, without MathWorks' involvement. Feel free to contact the author of this submission directly for specific questions, issues, or complaints about the implementation".
You can also refer to the following answers for more reference:
Hope this helps!
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!