firststep and laststep as meshingparameters to be exported to python

This commit is contained in:
Christopher Lackner
2016-12-05 13:50:21 +01:00
parent 953bd13cf4
commit 7e4892a9e7
18 changed files with 69 additions and 74 deletions

View File

@@ -590,19 +590,23 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
py::class_<MP> (m, "MeshingParameters")
.def(py::init<>())
.def("__init__",
[](MP *instance, double maxh, bool quad_dominated, int optsteps2d, int optsteps3d)
[](MP *instance, double maxh, bool quad_dominated, int optsteps2d, int optsteps3d,
int perfstepsstart, int perfstepsend)
{
new (instance) MeshingParameters;
instance->maxh = maxh;
instance->quad = int(quad_dominated);
instance->optsteps2d = optsteps2d;
instance->optsteps3d = optsteps3d;
instance->perfstepsstart = perfstepsstart;
instance->perfstepsend = perfstepsend;
},
py::arg("maxh")=1000,
py::arg("quad_dominated")=false,
py::arg("optsteps2d") = 3,
py::arg("optsteps3d") = 3
,
py::arg("optsteps3d") = 3,
py::arg("perfstepsstart") = 0,
py::arg("perfstepsend") = 6,
"create meshing parameters"
)
.def("__str__", &ToString<MP>)