Export 3D MATLAB figure to EM Simulation Software (CST).
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Pratyush Swain
2024 年 3 月 15 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!