Export Ngx_Mesh to Python

This commit is contained in:
Matthias Hochsteger 2016-11-09 17:18:01 +01:00
parent dd7f8814ee
commit 9b235b4388

View File

@ -7,6 +7,8 @@
#include <csg.hpp>
#include <geometry2d.hpp>
#include <../interface/writeuser.hpp>
#include <nginterface.h>
#include <nginterface_v2.hpp>
using namespace netgen;
@ -298,6 +300,10 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
py::implicitly_convertible< int, PointIndex>();
py::class_<Ngx_Mesh>(m, "Ngx_Mesh")
.def(py::init<shared_ptr<Mesh>>())
.def_property_readonly("ngmesh", &Ngx_Mesh::GetMesh)
;
py::class_<Mesh,shared_ptr<Mesh>>(m, "Mesh")
// .def(py::init<>("create empty mesh"))
@ -545,6 +551,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
))
;
py::implicitly_convertible< shared_ptr<Mesh>, Ngx_Mesh >();
typedef MeshingParameters MP;