fix init of splinesurface

This commit is contained in:
Christopher Lackner 2016-11-09 16:10:04 +01:00
parent 86b391cb04
commit 8a1cf75c5e
2 changed files with 4 additions and 4 deletions

@ -1 +1 @@
Subproject commit 2b92a49115657712c7dd924248df2286e6143b8d
Subproject commit 030d10e826b87f8cdf0816aa36b9a515fb7d064d

View File

@ -275,7 +275,7 @@ DLL_HEADER void ExportCSG(py::module &m)
py::class_<SplineSurface, shared_ptr<SplineSurface>> (m, "SplineSurface",
"A surface for co dim 2 integrals on the splines")
.def("__init__", FunctionPointer ([](const shared_ptr<SPSolid> base, py::list cuts)
.def("__init__", FunctionPointer ([](SplineSurface* instance, shared_ptr<SPSolid> base, py::list cuts)
{
auto primitive = dynamic_cast<OneSurfacePrimitive*> (base->GetSolid()->GetPrimitive());
auto acuts = new Array<OneSurfacePrimitive*>();
@ -292,8 +292,8 @@ DLL_HEADER void ExportCSG(py::module &m)
}
if(!primitive)
throw NgException("Base is not a SurfacePrimitive in constructor of SplineSurface!");
return make_shared<SplineSurface>(primitive,acuts);
}),(py::arg("base"), py::arg("cuts")=py::list()))
new (instance) SplineSurface(primitive,acuts);
}),py::arg("base"), py::arg("cuts")=py::list())
.def("AddPoint", FunctionPointer
([] (SplineSurface & self, double x, double y, double z, bool hpref)
{