Fix printed face name on double click for 2d meshes

This commit is contained in:
Matthias Hochsteger 2023-10-24 15:03:54 +02:00
parent 93a76faca6
commit 6e6c23b05e

View File

@ -3448,7 +3448,13 @@ namespace netgen
cout << endl << "select element " << selelement
<< " on face " << sel.GetIndex();
// output face name
auto name = GetMesh()->GetFaceDescriptor(sel.GetIndex()).GetBCName();
auto mesh = GetMesh();
string name;
if(mesh->GetDimension() == 3)
name = mesh->GetFaceDescriptor(sel.GetIndex()).GetBCName();
else
name = mesh->GetMaterial(sel.GetIndex());
if(name != "")
cout << " with name " << name;
cout << endl;