mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-15 18:38:33 +05:00
Merge remote-tracking branch 'origin/master' into boundarylayer_fixes
This commit is contained in:
commit
b1dd980403
@ -133,6 +133,12 @@ DLL_HEADER void ExportNgOCCBasic(py::module &m)
|
|||||||
})
|
})
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
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")
|
py::class_<gp_Ax1>(m, "Axis", "an OCC axis in 3d")
|
||||||
.def(py::init([](gp_Pnt p, gp_Dir d) {
|
.def(py::init([](gp_Pnt p, gp_Dir d) {
|
||||||
return gp_Ax1(p,d);
|
return gp_Ax1(p,d);
|
||||||
|
@ -740,6 +740,10 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
|||||||
return Mass(shape);
|
return Mass(shape);
|
||||||
}, "returns mass of shape, what is length, face, or volume")
|
}, "returns mass of shape, what is length, face, or volume")
|
||||||
|
|
||||||
|
.def_property_readonly("inertia", [](const TopoDS_Shape & shape) {
|
||||||
|
return Properties(shape).MatrixOfInertia();
|
||||||
|
}, "returns matrix of inertia of shape")
|
||||||
|
|
||||||
.def("Move", [](const TopoDS_Shape & shape, const gp_Vec v)
|
.def("Move", [](const TopoDS_Shape & shape, const gp_Vec v)
|
||||||
{
|
{
|
||||||
// which one to choose ?
|
// which one to choose ?
|
||||||
|
Loading…
Reference in New Issue
Block a user