MATLAB 도움말 센터
Find faces belonging to specified cells
Since R2021a
FaceID = cellFaces(g,RegionID)
FaceID = cellFaces(g,RegionID,FilterType)
FaceID = cellFaces(g,RegionID) finds faces belonging to the cells with ID numbers listed in RegionID.
FaceID
g
RegionID
example
FaceID = cellFaces(g,RegionID,FilterType) returns internal, external, or all faces belonging to the cells with ID numbers listed in RegionID.
FilterType
collapse all
Find faces belonging to two cuboids in a geometry consisting of four stacked cuboids.
Create a geometry that consists of four stacked cuboids.
gm = multicuboid(5,10,[1 2 3 4],"ZOffset",[0 1 3 6])
gm = DiscreteGeometry with properties: NumCells: 4 NumFaces: 21 NumEdges: 36 NumVertices: 20 Vertices: [20×3 double]
Plot the geometry with the cell labels.
pdegplot(gm,"CellLabels","on","FaceAlpha",0.2)
Find faces belonging to cells 1 and 3.
faceIDs = cellFaces(gm,[1 3])
faceIDs = 1×12 1 2 3 4 5 6 7 12 13 14 15 16
Plot the geometry with the face labels.
pdegplot(gm,"FaceLabels","on","FaceAlpha",0.2)
Find faces belonging to the outer cuboid in a geometry consisting of two nested cuboids.
Create a geometry that consists of two nested cuboids of the same height.
gm = multicuboid([2 5],[4 10],3)
gm = DiscreteGeometry with properties: NumCells: 2 NumFaces: 12 NumEdges: 24 NumVertices: 16 Vertices: [16×3 double]
Find all faces belonging to the outer cell.
faceIDs = cellFaces(gm,2)
faceIDs = 1×10 3 4 5 6 7 8 9 10 11 12
Find only the internal faces belonging to the outer cell. Internal faces are faces shared between multiple cells.
faceIDs_int = cellFaces(gm,2,"internal")
faceIDs_int = 1×4 3 4 5 6
Find only the external faces belonging to the outer cell.
faceIDs_ext = cellFaces(gm,2,"external")
faceIDs_ext = 1×6 7 8 9 10 11 12
fegeometry
DiscreteGeometry
3-D geometry, specified as an fegeometry object or a DiscreteGeometry object.
Cell ID, specified as a positive number or a vector of positive numbers. Each number represents a cell ID.
"all"
"internal"
"external"
Type of faces to return, specified as "internal", "external", or "all". Depending on this argument, cellFaces returns these types of faces:
cellFaces
"internal" — Internal faces, that is, faces shared between multiple cells.
"external" — External faces, that is, faces not shared between multiple cells.
"all" — All faces belonging to the specified cells.
IDs of faces belonging to the specified cells, returned as a positive number or a vector of positive numbers.
expand all
cellFaces now accepts geometries specified by fegeometry objects.
cellEdges
faceEdges
facesAttachedToEdges
nearestEdge
nearestFace
AnalyticGeometry
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의