How to Extracting Only Surface Coordinates from a 3D STL File in MATLAB?
조회 수: 22 (최근 30일)
이전 댓글 표시
Hello MATLAB Community,
I've created a 3D model in SolidWorks and I'm currently trying to import it into MATLAB to extract the coordinates of points that lie only on the model's surface.
I've been utilizing the generateMesh function from the Partial Differential Equation Toolbox. However, this method seems to be including points from the interior of the model as well.
I have attached the STL file of my model. Could anyone guide me on how to modify my approach so that I only obtain the coordinates of the surface points?
Thanks!
댓글 수: 0
답변 (1개)
Star Strider
2024년 3월 21일
Uz = unzip('22G teardrop COMSOL.zip');
filename = Uz{:};
[TR,fileformat,attributes,solidID] = stlread(filename);
P = TR.Points;
T = TR.ConnectivityList;
Q = [P(1:10,:) T(1:10,:)];
figure
trisurf(T, P(:,1), P(:,2), P(:,3), 'EdgeColor','none')
colormap(turbo)
axis('equal')
view(120,45)
Ax = gca;
Ax.Visible = 'off';
.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!