mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
fix init of splinesurface
This commit is contained in:
parent
86b391cb04
commit
8a1cf75c5e
@ -1 +1 @@
|
|||||||
Subproject commit 2b92a49115657712c7dd924248df2286e6143b8d
|
Subproject commit 030d10e826b87f8cdf0816aa36b9a515fb7d064d
|
@ -275,7 +275,7 @@ DLL_HEADER void ExportCSG(py::module &m)
|
|||||||
|
|
||||||
py::class_<SplineSurface, shared_ptr<SplineSurface>> (m, "SplineSurface",
|
py::class_<SplineSurface, shared_ptr<SplineSurface>> (m, "SplineSurface",
|
||||||
"A surface for co dim 2 integrals on the splines")
|
"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 primitive = dynamic_cast<OneSurfacePrimitive*> (base->GetSolid()->GetPrimitive());
|
||||||
auto acuts = new Array<OneSurfacePrimitive*>();
|
auto acuts = new Array<OneSurfacePrimitive*>();
|
||||||
@ -292,8 +292,8 @@ DLL_HEADER void ExportCSG(py::module &m)
|
|||||||
}
|
}
|
||||||
if(!primitive)
|
if(!primitive)
|
||||||
throw NgException("Base is not a SurfacePrimitive in constructor of SplineSurface!");
|
throw NgException("Base is not a SurfacePrimitive in constructor of SplineSurface!");
|
||||||
return make_shared<SplineSurface>(primitive,acuts);
|
new (instance) SplineSurface(primitive,acuts);
|
||||||
}),(py::arg("base"), py::arg("cuts")=py::list()))
|
}),py::arg("base"), py::arg("cuts")=py::list())
|
||||||
.def("AddPoint", FunctionPointer
|
.def("AddPoint", FunctionPointer
|
||||||
([] (SplineSurface & self, double x, double y, double z, bool hpref)
|
([] (SplineSurface & self, double x, double y, double z, bool hpref)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user