From a69eefa0db1d374b344b236ab8b6db3630ec1b04 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Mon, 16 Aug 2021 10:02:18 +0200 Subject: [PATCH] optional name for WorkPlane.LineTo --- libsrc/occ/python_occ_shapes.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index 2d0f6775..7abb41d8 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -1515,7 +1515,9 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) .def(py::init(), py::arg("axis")=gp_Ax3(), py::arg("pos")=gp_Ax2d()) .def("MoveTo", &WorkPlane::MoveTo) .def("Direction", &WorkPlane::Direction) - .def("LineTo", &WorkPlane::LineTo) + // .def("LineTo", &WorkPlane::LineTo) + .def("LineTo", [](WorkPlane&wp, double x, double y, optional name) { return wp.LineTo(x, y, name); }, + py::arg("x"), py::arg("y"), py::arg("name")=nullopt) .def("ArcTo", &WorkPlane::ArcTo) .def("Arc", &WorkPlane::Arc) .def("Rotate", &WorkPlane::Rotate)