From 7cbeca147a46f15fe661224d0be0d11a68ac9e06 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Wed, 19 Aug 2020 16:25:54 +0200 Subject: [PATCH] fix windows build --- libsrc/geom2d/csg2d.hpp | 2 +- libsrc/geom2d/python_geom2d.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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<>())