diff --git a/libsrc/csg/python_csg.cpp b/libsrc/csg/python_csg.cpp index a3c6b90d..375cd508 100644 --- a/libsrc/csg/python_csg.cpp +++ b/libsrc/csg/python_csg.cpp @@ -362,6 +362,21 @@ DLL_HEADER void ExportCSG() (bp::arg("self"), bp::arg("solid"), bp::arg("bcmod")=bp::list()) ) + .def("AddSurface", FunctionPointer + ([] (CSGeometry & self, shared_ptr surface, shared_ptr solid) + { + solid->AddSurfaces (self); + solid->GiveUpOwner(); + int tlonr = self.SetTopLevelObject (solid->GetSolid(), &surface->GetSolid()->GetPrimitive()->GetSurface()); + self.GetTopLevelObject(tlonr) -> SetMaterial(solid->GetMaterial()); + self.GetTopLevelObject(tlonr) -> SetRGB(solid->GetRed(),solid->GetGreen(),solid->GetBlue()); + self.GetTopLevelObject(tlonr)->SetTransparent(solid->IsTransparent()); + }), + (bp::arg("self"), bp::arg("surface"), bp::arg("solid")) + ) + + + .def("CloseSurfaces", FunctionPointer ([] (CSGeometry & self, shared_ptr s1, shared_ptr s2, bp::list aslices ) {