-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Python bindings for the Dulcificum bot library
Python binding for Dulcificum bot library has been initialized. This includes necessary includes and setup in `pyDulcificum.cpp` file, modification in `CMakeLists.txt` for option to build with Python bindings, and updating the Conan file to include Python bindings option and requirements necessary for these bindings. This will allow Python scripts to directly use Dulcificum's bot commands and functionalities. Contributes to CURA-10561
- Loading branch information
1 parent
24c2f97
commit 3f593af
Showing
3 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include <dulcificum/miracle_jtp/mgjtp_command_to_json.h> | ||
#include <dulcificum/miracle_jtp/mgjtp_json_to_command.h> | ||
#include <pybind11/pybind11.h> | ||
|
||
namespace py = pybind11; | ||
|
||
PYBIND11_MODULE(pyDulcificum, module) | ||
{ | ||
module.doc() = R"pbdoc(exit | ||
pyDulcificum | ||
----------------------- | ||
.. currentmodule:: Python bindings for Dulcificum | ||
.. autosummary:: | ||
:toctree: _generate | ||
add | ||
subtract | ||
)pbdoc"; | ||
|
||
py::class_<dulcificum::botcmd::Move>(module, "Move") | ||
.def(py::init<>()) | ||
.def_readwrite("point", &dulcificum::botcmd::Move::point, "The point of the move command") | ||
.def_readwrite("feedrate", &dulcificum::botcmd::Move::feedrate, "The feedrate of the move command") | ||
.def_readwrite("is_point_relative", &dulcificum::botcmd::Move::is_point_relative, "Components of the point relative") | ||
; | ||
} |