rotation trafo

This commit is contained in:
Joachim Schoeberl 2021-08-02 09:50:54 +02:00
parent 62a0743e4e
commit 2422318162

View File

@ -375,6 +375,7 @@ DLL_HEADER void ExportNgOCC(py::module &m)
.def(py::init<>()) .def(py::init<>())
.def("SetMirror", [] (gp_Trsf & trafo, const gp_Ax1 & ax) { trafo.SetMirror(ax); return trafo; }) .def("SetMirror", [] (gp_Trsf & trafo, const gp_Ax1 & ax) { trafo.SetMirror(ax); return trafo; })
.def_static("Mirror", [] (const gp_Ax1 & ax) { gp_Trsf trafo; trafo.SetMirror(ax); 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("__call__", [] (gp_Trsf & trafo, const TopoDS_Shape & shape) { .def("__call__", [] (gp_Trsf & trafo, const TopoDS_Shape & shape) {
return BRepBuilderAPI_Transform(shape, trafo).Shape(); return BRepBuilderAPI_Transform(shape, trafo).Shape();
}) })