suf2stl: a program fore converting .surf files to .stl files?

2 ビュー (過去 30 日間)
Richard Russell
Richard Russell 2020 年 11 月 11 日
編集済み: DGM 2025 年 7 月 13 日
I want to convert .surf surface files to STL files. There is a surf2stl program, but it produces errors. Any help abailable? I am using Matlab online. The link to surf2stl follows: can you tell me how to use it properly?
Thanks, Rick Russell
rick-russell@sbcglobal.net
https://www.mathworks.com/matlabcentral/fileexchange/4512-surf2stl
  2 件のコメント
Durganshu
Durganshu 2020 年 11 月 12 日
What is the error that you're getting?
DGM
DGM 2025 年 7 月 13 日
編集済み: DGM 2025 年 7 月 13 日
The surf2stl() function is for converting simple gridded data (as would be used with the surf() function) to an STL file.
It doesn't have anything specifically to do with 3D-XplorMath .surf files. I don't know of any decoders for importing such a file, though I found a format description.
Either way, these appear to be open, self-intersecting surfaces. Converting it to an STL isn't going to be enough to make it printable.

サインインしてコメントする。

回答 (2 件)

Richard Russell
Richard Russell 2020 年 11 月 22 日
Hi, Deeds,
Sorry for the delay in responding, and thank you for answering! I'm so inexperienced with Matlab that I can't really describe the errors. It's best if I give you the link to the Surf2STL script and the .surf file. That file was sent me by the mathematician who developed the 4-soliton model, visible Here:
That model is something I'd like to print in 3D via my Shapeways "shop":
I have attached the .surf file that Hermann, the mathematician who created it, has sent me. Please respond to me at rick-russell@sbcglobal.net, if you have tthe time,check that email address daily.. If you should have suggestions, or can convert the surf file into an STL file foor me, I'd be very grateful: I'm stumped!
Thank you so much for your help!
Yours, Rick Russell

ConanTaieb
ConanTaieb 2021 年 2 月 8 日
Hello,
I have a 3D plot and I want convert it to stl file. I tried the “stlwrite” but stlwrite eliminates repeated data points “Duplicate data points have been detected and removed” .
Please, could you help me?
Thank you
[x,y] = meshgrid(0:1:10,0:1:10);
z = 0*x;
S=x;
k=linspace(6,10,11);
for n=1:11
S(:,n)=k(n);
end
X=[x,10*ones(11,11),x];
Y=[z,x,S];
Z=[y,y,y];
surf(X,Y,Z)
stlwrite('TEST.stl',X,Y,Z)
  2 件のコメント
darova
darova 2021 年 2 月 21 日
Convert your surface to patch and write
h = surf(X,Y,Z);
p = surf2patch(h,'triangles');
stlwrite(p,'TEST.stl')
DGM
DGM 2025 年 7 月 13 日
Either way, an STL file of a triangulated surface contains three vertices for every face. No more, no less. Vertices are only defined within the context of a face, so unreferenced vertices do not exist either.
It's an informational warning. It's not an error.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by