From ee1ceda906be4efac8becfc6e3c1a35179984278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Thu, 19 Nov 2015 12:30:54 +0100 Subject: [PATCH] surface object --- libsrc/csg/python_csg.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 ) {