From ed4240b9c60bf295a1d6a4631ce99a6bb4094444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Thu, 10 Jan 2019 09:41:42 +0100 Subject: [PATCH] singular face --- libsrc/csg/python_csg.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libsrc/csg/python_csg.cpp b/libsrc/csg/python_csg.cpp index 0db96e6d..665a7392 100644 --- a/libsrc/csg/python_csg.cpp +++ b/libsrc/csg/python_csg.cpp @@ -469,6 +469,17 @@ However, when r = 0, the top part becomes a point(tip) and meshing fails! self.AddSplineSurface(surf); }), py::arg("SplineSurface")) + .def("SingularFace", [] (CSGeometry & self, shared_ptr sol, shared_ptr surfaces, double factor) + { + int tlonum = -1; + for (int i = 0; i < self.GetNTopLevelObjects(); i++) + if (self.GetTopLevelObject(i)->GetSolid() == sol->GetSolid()) + tlonum = i; + if (tlonum == -1) throw NgException("not a top-level-object"); + if (!surfaces) surfaces = sol; + auto singface = new SingularFace(tlonum, surfaces->GetSolid(), factor); + self.singfaces.Append(singface); + }, py::arg("solid"), py::arg("surfaces")=nullptr, py::arg("factor")=0.25) .def("SingularEdge", [] (CSGeometry & self, shared_ptr s1,shared_ptr s2, double factor) { auto singedge = new SingularEdge(1, -1, self, s1->GetSolid(), s2->GetSolid(), factor);