How can i transform a surface from mathlab into a 3D-printable file or to get the view in a 3D programm?

1 view (last 30 days)
i have just some points from a file, just x and y.
I try to make a surface with those points but the problem is, how can i make that in a 3D File to print a object in 3D-Printer.
The hight from the surface is not clear but the main problem is converting or the information to open that in Blender or 3D-Slicer.
dft.jpg
  4 Comments
Jan  Nabo
Jan Nabo on 22 Aug 2019
yeah like that in the picture, its just x and y points and i have the hight of 1 cm -> so i want to create first of all a 3D-figure -> after that i want to put it in a 3D-printable file but i have to research more

Sign in to comment.

Accepted Answer

Jan  Nabo
Jan Nabo on 2 Sep 2019
clear
name='010010_XBlock';
blockdistance=67.2;
blockhoehe=5;
info=dicominfo(name);
sz=size(info.BeamSequence.Item_1.BlockSequence.Item_1.BlockData,1);
b(:,1)=info.BeamSequence.Item_1.BlockSequence.Item_1.BlockData(1:2:sz)/10;
b(:,2)=info.BeamSequence.Item_1.BlockSequence.Item_1.BlockData(2:2:sz)/10;
kx = -10:.1:10;
ky = -10:.1:10;
kz = blockdistance:-0.1:blockdistance-blockhoehe;
sz_x=size(kx,2);
sz_y=size(ky,2);
sz_z=size(kz,2);
bin=nan(sz_y,sz_x,sz_z);
[X,Y] = meshgrid(kx,ky);
for i=1:sz_z
x=kz(i)*b(:,1)/100;
y=kz(i)*b(:,2)/100;
bin(:,:,i)=inpolygon (X,Y,x,y);
end
it works
make_STL_of_Array('test.stl',bin,0.1,0.1,0.1);
only problem is i want to smooth and refine my 3D Object
2Dto3D Object.png

More Answers (1)

Chidvi Modala
Chidvi Modala on 27 Aug 2019
surf2solid takes a surface (a function z of (x,y) or (theta,r)) and convert this into a solid, much as meshz does, but a little more useful for outputting as an STL for fabrication in a 3D printer.

Categories

Find more on DICOM Format in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!