converting a .stl file of 3D polyhedron into a .mat file

조회 수: 5 (최근 30일)
Muhammad Salman Maqbool
Muhammad Salman Maqbool 2018년 4월 5일
편집: DGM 2025년 4월 4일
Hello everyone.
I have a .stl file of a solid 3D polyhedron object exported from solidworks. I want to eventually get it as a filled solid into matlab as a .mat file which can be resized using imresize().
I have read it using matlab by using the following link:
This gives me a structure having two variables namely faces and vertices.
Next I want to use this faces and vertices variables to make a .mat file of the 3D model which can be resized. I have been advised to use the vertices variable to create a wireframe, then to define everything inside the frame as 1 and outside the frame 0, and then finally save that as a .mat file.
Could anyone please advise a simpler way to do this? Please see that I am not an expert user of matlab, so an easyto understand approach is highly appreciated.
Thanks.
Salman
  댓글 수: 2
Durganshu
Durganshu 2020년 9월 21일
Were you able to solve this problem?
Rik
Rik 2020년 9월 21일
The faces and vertices already form a wire frame. I don't know a simpler way.
So Durganshu, I would suggest you try the same strategy. There is a submission on the FEX that will do that for you.

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

답변 (1개)

DGM
DGM 2025년 4월 4일
If the goal is to convert the object into a volumetric image, then:
The linked voxelization tool was available on the FEX at the time.

카테고리

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