How to read 3D mesh STL file

8 ビュー (過去 30 日間)
Muhammad Adil
Muhammad Adil 2019 年 10 月 22 日
編集済み: DGM 2025 年 10 月 3 日 9:54
Hello Everyone,
I created a 3D model in Solidworks and improt this model into Netgen mesh generator to creat a 3D volume mesh.
And now I am trying to import and read that 3D volum mesh into MATLAB. I want to extract the vertices and elements of the mesh.
Please help me to read the .stl file and then extract the vertices and elements.
Thanks
  2 件のコメント
karim botros
karim botros 2020 年 2 月 28 日
編集済み: DGM 2025 年 4 月 4 日
Can you explain more ? what have you tried and what doesn't work ?
you can try to import stl mesh to matlab by
fv = stlread('femur.stl');
source :
Aldo Caraceto
Aldo Caraceto 2020 年 5 月 15 日
編集済み: DGM 2025 年 4 月 4 日
I believe you should use importGeometry from Partial Differential Equation Toolbox.
Best,
Aldo

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

回答 (1 件)

DGM
DGM 2025 年 4 月 4 日
編集済み: DGM 2025 年 10 月 3 日 9:54
If your goal is to create a DiscreteGeometry object (for the PDE toolbox), then importGeometry() is what you'd use, but otherwise it's not necessary for general STL reading.
Use stlread() in any MATLAB version from R2018b to present. It will return a triangulation object containing the face and vertex data.
Unless you're a time traveller trapped in 2011, there's no good reason to use FEX #22409. It has problems, and there are better legacy tools on the FEX. See FEX #182013, which is fully featured and should be compatible with older versions.

カテゴリ

Help Center および File ExchangeSTL (STereoLithography) についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by