diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index b54182cd..f87e4ed5 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -1639,7 +1640,15 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) }) ; - + m.def("HalfSpace", [] (gp_Pnt p, gp_Vec n) + { + gp_Pln plane(p, n); + BRepBuilderAPI_MakeFace bface(plane); + auto face = bface.Face(); + auto refpnt = p.Translated(-n); + BRepPrimAPI_MakeHalfSpace builder(face, refpnt); + return builder.Shape(); + }, py::arg("p"), py::arg("n"), "Create a half space threw point p normal to n"); m.def("Sphere", [] (gp_Pnt cc, double r) { return BRepPrimAPI_MakeSphere (cc, r).Solid(); }, py::arg("c"), py::arg("r"), "create sphere with center 'c' and radius 'r'");