Wrong number of Edges/Faces after .stl-Import with fegeometry

조회 수: 4 (최근 30일)
Tim
Tim 2025년 7월 22일
답변: Govind KM 2025년 7월 24일
When I create a femodel-Object from an existing .stl-file, some edges/faces get lost and I don't know how/why/where. My original 3D-model looks like this:
However, when I create the femodel with
geometryFile = 'Pilz.stl';
geometryFile = fegeometry(geometryFile);
the edges from two of the four opposite faces tangent to the clyinder part of the mushroom get lost, see below picture:
I need these four faces to apply a FaceLoad later on, but F3 in this case is not just the flat area but also the two rounded faces up to the edge of F1.
I'm guessing it is not a problem with the .stl-file itself, because I've varied the width of the flat areas up to the point where the cylinder part is basically a square, but MATLAB still only recognizes 4 faces around the circumference.
How do I get MATLAB or the fegeometry function to recognize the missing Faces like so:?
Thanks in advance!
  댓글 수: 2
Govind KM
Govind KM 2025년 7월 24일
Hi @Tim,
Could you share the STL file for me to try this out?
Tim
Tim 2025년 7월 24일
편집: Tim 2025년 7월 24일
@Govind KM I've updated the post to include the .stl-file

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

답변 (1개)

Govind KM
Govind KM 2025년 7월 24일
Hi @Tim,
Thanks for sharing the STL file. I was able to reproduce the observation at my end.
The detection of these faces depends on the "FeatureAngle" property of "fegeometry". This is the threshold value for the dihedral angle between two adjacent triangles, to indicate the edge and create two separate faces, i.e. if the angle between two adjacent triangles exceeds this threshold, then that edge becomes an edge separating two faces.
This angle seems to be the outer angle between the curved missing face and the plane of F3. Setting the "FeatureAngle" property" to anything below 25 allows MATLAB to detect these faces correctly.
gm = fegeometry("Pilz.stl","FeatureAngle",20);
pdegplot(gm,FaceLabels="on");
More information on the "FeatureAngle" property can be found in the following documentation link: https://www.mathworks.com/help/pde/ug/fegeometry.html#mw_31687d20-1c0b-4db5-a071-2f9ace8077f3
Hope this helps!

카테고리

Help CenterFile Exchange에서 Unified Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by