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

33 Ansichten (letzte 30 Tage)
lingfeng zhou
lingfeng zhou am 18 Nov. 2016
Bearbeitet: David am 14 Sep. 2022
I want to generate some solid models for 3D Printing. And the stl file is needed.

Antworten (2)

KSSV
KSSV am 18 Nov. 2016

David
David am 14 Sep. 2022
Bearbeitet: David am 14 Sep. 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)

Kategorien

Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by