| 58 | } |
| 59 | |
| 60 | void AddPointsToPython(pybind11::module& m) |
| 61 | { |
| 62 | namespace py = pybind11; |
| 63 | |
| 64 | py::class_<Point, Point::Pointer, array_1d<double,3> >(m,"Point") //WARNING: this was previously called Point3D |
| 65 | .def(py::init<double, double, double>()) |
| 66 | .def(py::init<vector_expression<Vector> >()) |
| 67 | .def(py::init<array_1d<double,3>>()) |
| 68 | .def_property("X", PointGetX<Point >, PointSetX<Point >) |
| 69 | .def_property("Y", PointGetY<Point >, PointSetY<Point >) |
| 70 | .def_property("Z", PointGetZ<Point >, PointSetZ<Point >) |
| 71 | .def("__str__", PrintObject<Point>) |
| 72 | ; |
| 73 | } |
| 74 | |
| 75 | } // namespace Kratos::Python. |
| 76 | |