From 9a58654055159546a79371f7e6434ea62e250208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Wed, 25 Nov 2015 11:25:03 +0100 Subject: [PATCH] quad-dominated wrapped to python --- libsrc/meshing/python_mesh.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index 404d4b09..1919f7b5 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -485,16 +485,20 @@ DLL_HEADER void ExportNetgenMeshing() typedef MeshingParameters MP; bp::class_ ("MeshingParameters", bp::init<>()) .def("__init__", bp::make_constructor - (FunctionPointer ([](double maxh) + (FunctionPointer ([](double maxh, bool quad_dominated) { auto tmp = new MeshingParameters; tmp->maxh = maxh; + tmp->quad = int(quad_dominated); return tmp; }), bp::default_call_policies(), // need it to use arguments - (bp::arg("maxh")=1000)), + ( + bp::arg("maxh")=1000, + bp::arg("quad_dominated")=false + )), "create meshing parameters" - ) + ) .def("__str__", &ToString) .add_property("maxh", FunctionPointer ([](const MP & mp ) { return mp.maxh; }),