I am trying to select a simple element (type C3D10) from Gmsh mesh for changing the material solely to the selected element.
Using the mouse, in the Selection View I can click and check the following elements (e.g.)
SimpleBox.FEMMeshGmsh.Elem0F1 (FEMMeshGmsh)
SimpleBox.FEMMeshGmsh.Elem42F1 (FEMMeshGmsh)
SimpleBox.FEMMeshGmsh.Elem42F2 (FEMMeshGmsh)
SimpleBox.FEMMeshGmsh.Elem39F4 (FEMMeshGmsh)
Then using the following python API:
Code: Select all
sel=Gui.Selection.getSelectionEx()
Code: Select all
sel[0].SubElementNames[0]
Code: Select all
Elem0F1
best regards,
Ekaitz.
EDIT: Typing the following in python API, I can print my elements
Code: Select all
sel[0].Object.FemMesh.Volumes
(37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L)
However, I still do not know which element is identified with the selected ones.