From 0608eb1ee0eb119d5c4e75a81098d99a6b62bb07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Thu, 16 Mar 2017 20:56:57 +0100 Subject: [PATCH] set maxh for subdomains: geo.Add(solid, maxh=0.1) --- libsrc/csg/python_csg.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsrc/csg/python_csg.cpp b/libsrc/csg/python_csg.cpp index a59f6f1f..5c43e23e 100644 --- a/libsrc/csg/python_csg.cpp +++ b/libsrc/csg/python_csg.cpp @@ -374,7 +374,7 @@ DLL_HEADER void ExportCSG(py::module &m) self.Save (filename); })) .def("Add", - [] (CSGeometry & self, shared_ptr solid, py::list bcmod) + [] (CSGeometry & self, shared_ptr solid, py::list bcmod, double maxh) { solid->AddSurfaces (self); solid->GiveUpOwner(); @@ -382,6 +382,7 @@ DLL_HEADER void ExportCSG(py::module &m) self.GetTopLevelObject(tlonr) -> SetMaterial(solid->GetMaterial()); self.GetTopLevelObject(tlonr) -> SetRGB(solid->GetRed(),solid->GetGreen(),solid->GetBlue()); self.GetTopLevelObject(tlonr)->SetTransparent(solid->IsTransparent()); + self.GetTopLevelObject(tlonr)->SetMaxH(maxh); // bcmod is list of tuples ( solid, bcnr ) for (int i = 0; i < py::len(bcmod); i++) @@ -411,7 +412,7 @@ DLL_HEADER void ExportCSG(py::module &m) } return tlonr; }, - py::arg("solid"), py::arg("bcmod")=py::list() + py::arg("solid"), py::arg("bcmod")=py::list(), py::arg("maxh")=1e99 ) .def("AddSurface", FunctionPointer