Merge branch 'add_getcd2name' into 'master'

cd2names to python export



See merge request !20
This commit is contained in:
Joachim Schöberl 2016-11-18 17:21:19 +01:00
commit 0d9980aa8d

View File

@ -401,6 +401,8 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
.def("FaceDescriptor", static_cast<FaceDescriptor&(Mesh::*)(int)> (&Mesh::GetFaceDescriptor),
py::return_value_policy::reference)
.def("GetNFaceDescriptors", &Mesh::GetNFD)
.def("GetNCD2Names", &Mesh::GetNCD2Names)
.def("__getitem__", FunctionPointer ([](const Mesh & self, PointIndex pi)
@ -445,6 +447,9 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
.def ("GetMaterial", FunctionPointer([](Mesh & self, int domnr)
{ return string(self.GetMaterial(domnr)); }))
.def ("GetCD2Name", &Mesh::GetCD2Name)
.def("SetCD2Name", &Mesh::SetCD2Name)
.def ("AddPointIdentification", [](Mesh & self, py::object pindex1, py::object pindex2, int identnr, int type)
{
if(py::extract<PointIndex>(pindex1).check() && py::extract<PointIndex>(pindex2).check())