wrap inertia of occ-shape to Python

This commit is contained in:
Joachim Schoeberl
2024-03-07 12:39:56 +01:00
parent 486c7d9bcb
commit 43b707bcfb
3 changed files with 11 additions and 1 deletions

View File

@@ -132,6 +132,12 @@ DLL_HEADER void ExportNgOCCBasic(py::module &m)
return str.str();
})
;
py::class_<gp_Mat>(m, "gp_Mat", "3d OCC matrix")
.def("__getitem__", [](const gp_Mat& mat, tuple<int,int> index)
{ return mat.Row(get<0>(index)+1).Coord(get<1>(index)+1); })
;
py::class_<gp_Ax1>(m, "Axis", "an OCC axis in 3d")
.def(py::init([](gp_Pnt p, gp_Dir d) {