diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index 07ea777b..cf99678f 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -7,6 +7,8 @@ #include #include #include <../interface/writeuser.hpp> +#include +#include using namespace netgen; @@ -298,6 +300,10 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) py::implicitly_convertible< int, PointIndex>(); + py::class_(m, "Ngx_Mesh") + .def(py::init>()) + .def_property_readonly("ngmesh", &Ngx_Mesh::GetMesh) + ; py::class_>(m, "Mesh") // .def(py::init<>("create empty mesh")) @@ -545,6 +551,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) )) ; + py::implicitly_convertible< shared_ptr, Ngx_Mesh >(); typedef MeshingParameters MP;