Question about STL file

조회 수: 9 (최근 30일)
Ano
Ano 2018년 12월 4일
편집: DGM 2025년 9월 27일 2:44
Hello!
I have an STL file which contains the facets and vertices. My concern is about the way the facets are saved because I have noticed that the facets don't seem to have any common nodes with each other which is not obvious for me, so it would be very much appreciated if anyone can tell if this is normal or I am having some problem in my file!
Note: I have attached a screenshot of the STL file
Thank you and best regards!facets_stl.png
  댓글 수: 3
Ano
Ano 2018년 12월 4일
Thank you for you reply.
yes I agree that they should by they are not sharing nodes and the model seems to be correct!
Any ideas?!
Note: Please find attached the STL file and the facets and the nodes .
Thank you and best regards!
DGM
DGM 2025년 9월 27일 2:41
편집: DGM 2025년 9월 27일 2:44
This is to be expected when using FEX #22409, or any other STL decoder which does not properly prune duplicate vertex data. It's a consequence of the way an STL file is structured. The vertex list will be exactly 3x as long as the face list. It will be full of redundant entries, and no two faces will share any vertices or edges.
The fix is simple. Don't use those old buggy decoders. It was understandable in late 2018, which was when the built-in tools were introduced. Today, almost everyone will be running a new enough version to have adequate STL tools. If you have an old copy of #22409 or another FEX download with the same name "stlread", find it, delete it, and adapt your usage to conform to the expectations of stlread().

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

채택된 답변

Cris LaPierre
Cris LaPierre 2018년 12월 5일
편집: Cris LaPierre 2018년 12월 5일
How are you reading the file into MATLAB? If I follow the example on the stlread documentation, I can import and plot the mesh.
data = stlread('femur.stl');
trimesh(data,'FaceColor','none','EdgeColor','k')
The interesting thing is the numbers from the various files are different.
  • stlread imports 33332x3 points and 66670x3 ConnectivityList
  • Your screenshot shows the values similar to what I see in ConnectivityList, but 178726x3 of them.
  • fv contains 66674x3 faces and 200022x3 vertices. How were faces and vertices created?
  댓글 수: 9
Poornima Jayamani
Poornima Jayamani 2019년 10월 15일
Hi, Cris your suggestions worked well in my case. i am trying to calculate the volume of a triangular meshed left atrium using divergence theorem. However, when i try to iterate through 1 to number of triangles , the loop picking the same point as a first and third point after 16th iteration . i am not sure what could be wrong with my code.
Cris LaPierre
Cris LaPierre 2019년 10월 18일
Hard to say without seeing your file, but it sounds like you might need to clean up your stl file first. How was it generated?
Consider checking to see if the file is 3D printable. Also consider running it through an stl repair routine (many available online) just in case.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 STL (STereoLithography)에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by