fixes thanks to etromme

This commit is contained in:
Joachim Schöberl 2017-09-14 13:50:20 +02:00
parent 977c358d7b
commit 924edbb3ad
2 changed files with 8 additions and 1 deletions

View File

@ -81,7 +81,7 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<1> (size_t nr) const
if (mesh->GetDimension() == 3)
ret.mat = mesh->GetCD2NamePtr(el.edgenr-1);
else
ret.mat = nullptr;
ret.mat = mesh->GetMaterialPtr(el.si);
}
ret.points.num = el.GetNP();

View File

@ -213,6 +213,13 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
instance->SetIndex(index);
}
else if (py::len(vertices) == 5)
{
new (instance) Element(PYRAMID);
for (int i = 0; i < 5; i++)
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
instance->SetIndex(index);
}
else if (py::len(vertices) == 6)
{
new (instance) Element(PRISM);