Import file .stl - parameters

조회 수: 15 (최근 30일)
Alberto Acri
Alberto Acri 2020년 11월 14일
댓글: Alberto Acri 2020년 11월 17일
I would like to import an .stl file. I proceeded like this:
fv = stlread('EXAMPLE.stl');
patch(fv,'FaceColor', [0.8 0.8 1.0], ...
'EdgeColor', 'none', ...
'FaceLighting', 'gouraud', ...
'AmbientStrength', 0.15);
grid off
hold on
axis equal
But I wanted to get a figure with the outline. What should I change?

답변 (1개)

Pratheek Punchathody
Pratheek Punchathody 2020년 11월 17일
Look into the following code which imports the sample .stl file into MATLAB and adds the geometry to the PDE model.
In the pdegplot()” function change the parameter FaceAlpha to "0" so that only edges are shown from the geometry present in the .stl file
model = createpde;
importGeometry(model,'cube.stl');
pdegplot(model,'FaceLabel','on', 'FaceAlpha',0)
Results of the about code with the sample cube geometry is as shown below.
With “FaceAlpha = 1”
Results of the about code with the sample cube geometry is as shown below.
With “FaceAlpha = 0”
Refer this "Link" for further information on importing the .stl file and changing the parameters.
  댓글 수: 1
Alberto Acri
Alberto Acri 2020년 11월 17일
Thanks, but I had already seen that link. Using the createpde command I can't get what I want because the stl object is characterized by a mesh.

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

카테고리

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