How can I know the number of nodes and elements on a face?

Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 871
100 Answers 500 Comments 250 Likes First Anniversary
✭✭✭✭
edited June 2023 in Structures

How can I know the number of nodes and elements on a face that is selected in the UI?

Tagged:

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 871
    100 Answers 500 Comments 250 Likes First Anniversary
    ✭✭✭✭
    Answer ✓

    One can use:

    faceId = ExtAPI.SelectionManager.CurrentSelection.Ids[0] # Id of selected face in the UI
    meshData = ExtAPI.DataModel.Project.Model.Analyses[0].MeshData # reference meshData
    faceMesh = meshData.MeshRegionById(faceId) # get mesh data for face
    faceMesh.ElementCount # get number of elements on face
    faceMesh.NodeCount # get number of nodes