translation

This commit is contained in:
Joachim Schoeberl 2021-08-03 14:29:57 +02:00
parent 8334dd7378
commit a43c3ed28c

View File

@ -409,6 +409,7 @@ DLL_HEADER void ExportNgOCC(py::module &m)
py::class_<gp_Trsf>(m, "gp_Trsf")
.def(py::init<>())
.def("SetMirror", [] (gp_Trsf & trafo, const gp_Ax1 & ax) { trafo.SetMirror(ax); return trafo; })
.def_static("Translation", [] (const gp_Vec & v) { gp_Trsf trafo; trafo.SetTranslation(v); return trafo; })
.def_static("Mirror", [] (const gp_Ax1 & ax) { gp_Trsf trafo; trafo.SetMirror(ax); return trafo; })
.def_static("Rotation", [] (const gp_Ax1 & ax, double ang) { gp_Trsf trafo; trafo.SetRotation(ax, ang); return trafo; })
.def_static("Transformation", [] (const gp_Ax3 & ax) { gp_Trsf trafo; trafo.SetTransformation(ax); return trafo; })