diff --git a/libsrc/geom2d/csg2d.hpp b/libsrc/geom2d/csg2d.hpp index 0adc1216..210c3d81 100644 --- a/libsrc/geom2d/csg2d.hpp +++ b/libsrc/geom2d/csg2d.hpp @@ -574,7 +574,7 @@ class CSG2d }; Solid2d Circle(double x, double y, double r, string name="", string bc=""); -Solid2d Rectangle(double x0, double x1, double y0, double y1, string name="", string bc=""); +Solid2d Rectangle(double x0, double x1, double y0, double y1, string name, string bc); Solid2d AddIntersectionPoints ( Solid2d s1, Solid2d s2 ); Solid2d ClipSolids ( Solid2d s1, Solid2d s2, bool intersect=true ); diff --git a/libsrc/geom2d/python_geom2d.cpp b/libsrc/geom2d/python_geom2d.cpp index f3f83f57..1875f6ba 100644 --- a/libsrc/geom2d/python_geom2d.cpp +++ b/libsrc/geom2d/python_geom2d.cpp @@ -418,8 +418,11 @@ DLL_HEADER void ExportGeom2d(py::module &m) ; - m.def("Rectangle", &Rectangle); - m.def("Circle", &Circle); + m.def("Rectangle", [](double x0, double x1, double y0, double y1, string bc, string mat) + { return Rectangle(x0,x1,y0,y1,bc,mat); }, + py::arg("x0"), py::arg("x1"), py::arg("y0"), py::arg("y1"), py::arg("bc")="", py::arg("mat")="" + ); + m.def("Circle", Circle, py::arg("x"), py::arg("y"), py::arg("r"), py::arg("bc")="", py::arg("mat")=""); py::class_(m, "CSG2d") .def(py::init<>())