필터 지우기
필터 지우기

i want to export 3d stl format image into matlab and want to see in matlab

조회 수: 14 (최근 30일)
I am using the command
gm = importGeometry('Cute Dragon 2.stl');
pdegplot(gm);
but this is howing me only surface view and i need volume view.

채택된 답변

Star Strider
Star Strider 2023년 12월 24일
The stlread function is another option.

추가 답변 (1개)

DGM
DGM 2023년 12월 24일
편집: DGM 2023년 12월 24일
I've used STL Tools from the FEX before.
% needed to zip attachments for the forum
unzip things.zip
% read the file
fname = 'things/heaterductmount.stl';
[V,F,N,~] = stlReadAscii(fname);
% plot it
patch('faces',F,'vertices',V, ...
'facecolor',[1 1 1], ...
'edgecolor','none');
% set up lighting, etc
shapelighting(gca)
Star Strider's suggestion works too. T is a triangulation object, so you'll handle it differently.
% read the file
fname = 'things/heaterductmount.stl';
T = stlread(fname);
% plot it
trisurf(T, ...
'facecolor',[1 1 1], ...
'edgecolor','none');
% set up lighting, etc
shapelighting(gca)
  댓글 수: 8
DGM
DGM 2024년 1월 8일
I am not intimately familiar with all the various file formats, the degree to which the features of each one are supported within MATLAB, and I have no idea what your requirements are. From what I can tell, it's not clear why the format should have any bearing on whether the file can be encrypted. It's also not clear to me what sort of color information is expected, or whether it's necessary.
Reet
Reet 2024년 1월 8일
okk, thank you so much sir for your help.

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

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by