Importing and exporting mesh data between MATLAB and MeshLab

조회 수: 12 (최근 30일)
Evenor
Evenor 2017년 12월 26일
편집: DGM 2025년 7월 27일
Given a 2D surface embedded in 3D, I generate its Delaunay triangulation using MATLAB's delaunay and delaunayTriangulation methods. However, they do not produce good watertight results.
I save the triangulation mesh saved as list of vertices x in 3D and list of triangles T (each row is a triangle, in which there are 3 indices, refering to the vertices in x (e.g. T(i) = [3 7 15] is the triangle with vertices x(3), x(7) and x(15)).
I want to export this data to MeshLab, edit and fix it there, and then import the result from MeshLab back to MATLAB. Is it possible? Does MeshLab support in MATLAB? If so, how to import and export the data?
  댓글 수: 2
carlos daniel barrera manrique
carlos daniel barrera manrique 2021년 6월 17일
Hello, were you able to solve it in any way?
stefano Chiappini
stefano Chiappini 2022년 9월 23일
hI, i have the same problem. I want to export the output by mesh algorthim from Matlab to CloudCompare.
Did you solve the problem? if yes, can you show me the code?
Thank you so much.

댓글을 달려면 로그인하십시오.

채택된 답변

Evenor
Evenor 2017년 12월 27일
Using stlwrite one can write MATLAB triangulations into a STL file.
Using stlread one can read an STL file into a MATLAB triangulation.
  댓글 수: 1
DGM
DGM 2025년 7월 27일
편집: DGM 2025년 7월 27일
Since R2018b, MATLAB has built-in STL tools. You don't need to download anything.
For legacy versions needing third-party tools, I'd strongly recommend these tools over #22409. This explains why.
If you use #22409 or #20922 in a modern installation, you will shadow the inbuilt tools and likely cause problems for yourself unless you rename them.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Delaunay Triangulation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by