Is there is a way to export mesh in figure to stl or obj???

22 ビュー (過去 30 日間)
muhammad farttoos
muhammad farttoos 2017 年 6 月 13 日
回答済み: Young Dae 2018 年 9 月 14 日
Hello I have a matlab code as i below that result 3d mesh, I wonder is there is any simple way that give me an option to export it to 3D object as stl or obj or any else 3d extension
if true
% Img = imread('MK2.jpg');
Img=double(Img(:,:,1));
sigma=1.5;
G=fspecial('gaussian',15,sigma);
Img_smooth=conv2(Img,G,'same');
[Ix,Iy]=gradient(Img_smooth);
f=Ix.^2+Iy.^2;
g=1./(1+f);
c0=2;
initialfunc=c0*ones(size(Img));
initialfunc(10:95, 8:100)=-c0;
phi=initialLSF;
figure(1);
mesh(-phi);
hold on; contour(phi, [0,0], 'r','LineWidth',2);
title('M1');
view([-80 35]);
imagesc(Img,[0, 255]); axis off; axis equal; colormap(gray); hold on; contour(phi, [0,0], 'r');
end
end
alfa=0;
iter_refine = 10;
.
.
.
figure;
mesh(-finalLSF);
hold on; contour(phi, [0,0], 'r','LineWidth',2);
str=['Final level set function, ', num2str(iter_outer*iter_inner+iter_refine), ' iterations'];
title(str);
axis off;
end
end

回答 (2 件)

Young Dae
Young Dae 2018 年 9 月 14 日

Walter Roberson
Walter Roberson 2017 年 12 月 27 日
Note: mesh are surf that have face color turned off.

カテゴリ

Help Center および File ExchangeSTL (STereoLithography) についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by