How to get coordinates values X, Y, Z from the Meshed file in matlab?

조회 수: 10 (최근 30일)
SASIREKHA DURAISAMY
SASIREKHA DURAISAMY 2020년 6월 17일
댓글: DGM 2025년 7월 28일
I have a meshed bone model(stl file). I have to extract data points (X,Y, Z coordinates) from the model which has 4000 nodes.
Can anyone suggest some idea to proceed?

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 6월 18일
편집: Ameer Hamza 2020년 6월 19일
Something like this
TR = stlread('tristltext.stl');
x = TR.Points(:,1);
y = TR.Points(:,2);
z = TR.Points(:,3);
  댓글 수: 7
Ameer Hamza
Ameer Hamza 2020년 6월 19일
In this can, you can write
TR = stlread('tristltext.stl');
x = TR.vertices(:,1);
y = TR.vertices(:,2);
z = TR.vertices(:,3);
DGM
DGM 2025년 7월 28일
OP was using FEX #22409 or a related third-party decoder. It has limitations and is not necessary in R2019a.
Since R2018b, MATLAB has built-in STL tools as described in the initial answer.
For legacy versions needing third-party tools, I'd recommend these tools over #22409. This explains why.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by