Files
allwpilib/wpilibc/src/main/python/semiwrap/MechanismObject2d.yml
2025-11-07 23:09:21 -08:00

32 lines
926 B
YAML

extra_includes:
- wpi/smartdashboard/MechanismLigament2d.hpp
classes:
wpi::MechanismObject2d:
force_type_casters:
- wpi::units::degree_t
attributes:
m_mutex:
ignore: true
methods:
GetName:
Append:
ignore: true
MechanismObject2d:
ignore: true
UpdateEntries:
# keep this in sync with MechanismRoot2d.yml
inline_code: |-
cls_MechanismObject2d
.def("appendLigament", [](MechanismObject2d *self,
std::string_view name, double length, wpi::units::degree_t angle,
double lineWidth, const wpi::Color8Bit& color) {
return self->Append<MechanismLigament2d>(name, length, angle, lineWidth, color);
},
py::arg("name"), py::arg("length"), py::arg("angle"),
py::arg("lineWidth") = 6, py::arg("color") = wpi::Color8Bit{235, 137, 52},
"Append a ligament node",
py::return_value_policy::reference_internal)
;