mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-15 02:18:33 +05:00
Merge branch 'occ_vec_from_dir' into 'master'
convert gp_Dir to gp_Vec See merge request ngsolve/netgen!679
This commit is contained in:
commit
ce3f627e36
@ -73,6 +73,7 @@ DLL_HEADER void ExportNgOCCBasic(py::module &m)
|
||||
.def(py::init([] (double x, double y, double z) {
|
||||
return gp_Vec(x, y, z);
|
||||
}), py::arg("x"), py::arg("y"), py::arg("z"))
|
||||
.def(py::init([](gp_Dir d) { return gp_Vec(d); }))
|
||||
.def_property("x", [](gp_Vec&p) { return p.X(); }, [](gp_Vec&p,double x) { p.SetX(x); })
|
||||
.def_property("y", [](gp_Vec&p) { return p.Y(); }, [](gp_Vec&p,double y) { p.SetY(y); })
|
||||
.def_property("z", [](gp_Vec&p) { return p.Z(); }, [](gp_Vec&p,double z) { p.SetZ(z); })
|
||||
@ -368,7 +369,8 @@ DLL_HEADER void ExportNgOCCBasic(py::module &m)
|
||||
py::implicitly_convertible<py::tuple, gp_Pnt>();
|
||||
py::implicitly_convertible<py::tuple, gp_Vec>();
|
||||
py::implicitly_convertible<py::tuple, gp_Dir>();
|
||||
py::implicitly_convertible<gp_Vec, gp_Dir>();
|
||||
py::implicitly_convertible<gp_Vec, gp_Dir>();
|
||||
py::implicitly_convertible<gp_Dir, gp_Vec>();
|
||||
py::implicitly_convertible<py::tuple, gp_Pnt2d>();
|
||||
py::implicitly_convertible<py::tuple, gp_Vec2d>();
|
||||
py::implicitly_convertible<py::tuple, gp_Dir2d>();
|
||||
|
Loading…
Reference in New Issue
Block a user