From fc5444435743ec226fc6e04c968b241f2fca6b42 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Thu, 11 Dec 2014 16:06:48 +0000 Subject: [PATCH] mesh default constructor --- libsrc/meshing/python_mesh.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index 9986f9b3..885d9622 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -94,7 +94,8 @@ void ExportNetgenMeshing() ; - bp::class_,boost::noncopyable>("Mesh") + bp::class_,boost::noncopyable>("Mesh", bp::no_init) + .def(bp::init<>("create empty mesh")) .def("__str__", &ToString) .def("Load", static_cast(&Mesh::Load)) .def("Save", static_cast(&Mesh::Save)) @@ -121,14 +122,17 @@ void ExportNetgenMeshing() { return self.AddPoint (Point3d(p)); })) + /* .def("__init__", bp::make_constructor (FunctionPointer ([]() { - auto tmp = new Mesh(); + cout << "create new mesh" << endl; + auto tmp = make_shared(); return tmp; })), "create empty mesh" ) + */ ;