optional name for WorkPlane.LineTo

This commit is contained in:
Joachim Schoeberl 2021-08-16 10:02:18 +02:00
parent 0c809f4d2b
commit a69eefa0db

View File

@ -1515,7 +1515,9 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
.def(py::init<gp_Ax3, gp_Ax2d>(), py::arg("axis")=gp_Ax3(), py::arg("pos")=gp_Ax2d()) .def(py::init<gp_Ax3, gp_Ax2d>(), py::arg("axis")=gp_Ax3(), py::arg("pos")=gp_Ax2d())
.def("MoveTo", &WorkPlane::MoveTo) .def("MoveTo", &WorkPlane::MoveTo)
.def("Direction", &WorkPlane::Direction) .def("Direction", &WorkPlane::Direction)
.def("LineTo", &WorkPlane::LineTo) // .def("LineTo", &WorkPlane::LineTo)
.def("LineTo", [](WorkPlane&wp, double x, double y, optional<string> name) { return wp.LineTo(x, y, name); },
py::arg("x"), py::arg("y"), py::arg("name")=nullopt)
.def("ArcTo", &WorkPlane::ArcTo) .def("ArcTo", &WorkPlane::ArcTo)
.def("Arc", &WorkPlane::Arc) .def("Arc", &WorkPlane::Arc)
.def("Rotate", &WorkPlane::Rotate) .def("Rotate", &WorkPlane::Rotate)