필터 지우기
필터 지우기

How to convert a figure of a minimal surface into an STL or OBJ file?

조회 수: 8 (최근 30일)
Joanna Medela
Joanna Medela 2023년 1월 26일
답변: Supraja 2023년 3월 12일
Hi, I've got this code for making a Schwartz D structure in MATLAB (credits to https://github.com/pttrsnv2/Minimal_Surfaces_Visualization_Code/blob/master/Minimal_Surfaces_Code_Upload_V2.m).
How could I make this into an STL or OBJ file? I need anything I could put into solidworks or fusion 360. I've tried to go through a ton of mathworks answers regarding this, but I can't seem to make stlwrite work no matter what I try.
f_sd = @(x,y,z) sin(x).*sin(y).*sin(z) + sin(x).*cos(y).*cos(z)+cos(x).*sin(y).*cos(z)...
+ cos(x).*cos(y).*sin(z);
% The limits for a 3-D plot
x_sd_l = 0;
x_sd_u = 2*pi;
y_sd_l = 0;
y_sd_u = 2*pi;
z_sd_l = 0;
z_sd_u = pi;
% Mesh density
MD_sd = 50; % Change as needed
% Face color
C_sd = 'red'; % Change as needed
figure
fimplicit3(f_sd, [x_sd_l x_sd_u y_sd_l y_sd_u z_sd_l z_sd_u], 'meshdensity',MD_sd,'facecolor',C_sd)
title('Schwarz D Plot')
xlabel('X')
ylabel('Y')
zlabel('Z')

답변 (1개)

Supraja
Supraja 2023년 3월 12일
The github link you mentioned in the question is unfortunately not working. But assuming you want to convert your file into .stl or .obj file, I am attaching the documentation links below which would help you to achieve your goal.
Conversion to .stl file:
Conversion to .obj file:

카테고리

Help CenterFile Exchange에서 STL (STereoLithography)에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by