Export 3D MATLAB figure to EM Simulation Software (CST).
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I would like to create a cone using a square mesh and export it to CST software. I am familiar with using the triangulation function to create an STL file for a triangular mesh, but I'm unsure how to proceed with a polygonal mesh. Could you please guide me on how to generate an OBJ file for a cone made of a square mesh that can be imported into CST software?
Here is a code for a cone I want to export:
clear all
clc
res=0.5;
x=-5:res:5;
y=-5:res:5;
Z0=10;
alpha=20;
[X,Y]=meshgrid(x,y);
R=sqrt(X.^2+Y.^2);
Z=Z0-R*cotd(alpha);
figure()
f=surf(X,Y,Z)
axis equal
Thank you in advance!
0 comentarios
Respuestas (1)
Pratyush Swain
el 15 de Mzo. de 2024
Hi Michael,
Exporting 3D MATLAB Figure to the .obj file format is not directly supported.Please refer to this third-party library from FILE Exchange on MATLAB Central: https://www.mathworks.com/matlabcentral/fileexchange/27982-wavefront-obj-toolbox which has a function “write_wobj(OBJ,filename)” that can export 3D figure as an .obj file.
Additionally you can also refer to following resources:
1 - https://www.mathworks.com/matlabcentral/fileexchange/72906-save-wavefront-obj-files-simple-or-colour
2- https://www.mathworks.com/matlabcentral/fileexchange/20922-stlwrite-write-ascii-or-binary-stl-files
Hope this helps.
0 comentarios
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!