How can I plot a 3D solid figure (not just 3d surface)

61 visualizaciones (últimos 30 días)
lingfeng zhou
lingfeng zhou el 18 de Nov. de 2016
Editada: David el 14 de Sept. de 2022
I want to generate some solid models for 3D Printing. And the stl file is needed.

Respuestas (2)

KSSV
KSSV el 18 de Nov. de 2016

David
David el 14 de Sept. de 2022
Editada: David el 14 de Sept. de 2022
I use surf2solid from https://www.mathworks.com/matlabcentral/fileexchange/42876-surf2solid-make-a-solid-volume-from-a-surface-for-3d-printing and Sven's stlwrite from https://www.mathworks.com/matlabcentral/fileexchange/20922-stlwrite-write-ascii-or-binary-stl-files -- not the Matlab 2018b stlwrite(). Then if I open the stl file in PrusaSlicer:
n = 30;
[X,Y] = meshgrid(linspace(0,1,2*n+1));
L = (40/51/0.9)*membrane(1,n);
figure, subplot(2,2,[1 3]), title 'Thin surface'
surf(X,Y,L,'EdgeColor','none'); colormap pink; axis image; camlight
subplot(2,2,2), title 'Block elevation'
[f,v] = surf2solid(X,Y,L,'elevation',min(L(:))-0.05); axis image; camlight; camlight
fv_block = struct('faces',f,'vertices',v);
subplot(2,2,4), title 'Thickness'
surf2solid(X,Y,L,'thickness',-0.1); axis image; camlight;
stlwriteSven('test.stl',fv_block)

Categorías

Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by