diff --git a/libsrc/include/nginterface_v2_impl.hpp b/libsrc/include/nginterface_v2_impl.hpp index b7689b8a..7ffb837d 100644 --- a/libsrc/include/nginterface_v2_impl.hpp +++ b/libsrc/include/nginterface_v2_impl.hpp @@ -64,6 +64,10 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<1> (int nr) const Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); ret.index = el.si; + if (mesh->GetDimension() == 2) + ret.mat = mesh->GetBCNamePtr(el.si-1); + else + ret.mat = nullptr; ret.points.num = el.GetNP(); ret.points.ptr = (int*)&(el[0]);