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);