Change Face Labels at geometryFromMesh
이전 댓글 표시
I want to solve a pde with solvepde. For that I create a geometry from a point cloud with geometryFromMesh. The next step is to create the boundary conditions and I need the face labels for that. The geometry is a simple cylinder. The problem is that every time I change the radius of the cylinder the face labels change. So sometimes the upper end is called F1 and sometimes the other end. This is the code:
r=1; %radius
l=200; %length
[x,y,z]=cylinder(r);
z(2,:)=l;
x=x(:);
y=y(:);
z=z(:);
P=[x y z];
shp=alphaShape(P(:,1),P(:,2),P(:,3),l+1);
[elements,nodes]=boundaryFacets(shp);
nodes=nodes';
elements=elements';
model=createpde();
geometryFromMesh(model,nodes,elements);
h=pdegplot(model,'FaceLabels','on');
h(1).FaceAlpha=0.5;
Is it possible to rename the faces so that the names are the same every time irrespective of the radius? Or maybe to define the names before creating the geometry is build?
답변 (1개)
Alan Weiss
2017년 2월 7일
0 개 추천
I am sorry, but I don't think that there is a way to keep the labels fixed when you generate a new geometry. I will enter an enhancement request into our tracking database.
Alan Weiss
MATLAB mathematical toolbox documentation
카테고리
도움말 센터 및 File Exchange에서 Geometry and Mesh에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!