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

11 views (last 30 days)
Jan Nabo on 22 Aug 2019
Answered: Jan Nabo on 2 Sep 2019
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.

Show 1 older comment
Jan Nabo on 22 Aug 2019
where does my stl file saved ? i can't wrote that like that way.
didn't work :(
darova on 22 Aug 2019
Did you create a surface?
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

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