Exporting a mesh plot from Matlab to CloudCompare

17 次查看(过去 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);

回答(1 个)

Sourav Karmakar
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!

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by