diff --git a/src/bindings/bnd_extensions.cpp b/src/bindings/bnd_extensions.cpp index 7fbf6eaa..46604f82 100644 --- a/src/bindings/bnd_extensions.cpp +++ b/src/bindings/bnd_extensions.cpp @@ -432,6 +432,13 @@ BND_UUID BND_ONXModel_ObjectTable::AddPoint1(double x, double y, double z) return ON_UUID_to_Binding(rc); } +BND_UUID BND_ONXModel_ObjectTable::AddPoint6(double x, double y, double z, const BND_3dmObjectAttributes* attributes) +{ + ON_Point point_geometry(x,y,z); + ON_UUID rc = Internal_ONX_Model_AddModelGeometry(m_model.get(), &point_geometry, attributes); + return ON_UUID_to_Binding(rc); +} + BND_UUID BND_ONXModel_ObjectTable::AddPointCloud(const BND_PointCloud& cloud, const BND_3dmObjectAttributes* attributes) { const ON_Geometry* g = cloud.GeometryPointer(); @@ -1705,8 +1712,11 @@ void initExtensionsBindings(rh3dmpymodule& m) .def("__iter__", [](py::object s) { return PyBNDIterator(s.cast(), s); }) #endif .def("AddPoint", &BND_ONXModel_ObjectTable::AddPoint1, py::arg("x"), py::arg("y"), py::arg("z")) + .def("AddPoint", &BND_ONXModel_ObjectTable::AddPoint6, py::arg("x"), py::arg("y"), py::arg("z"), py::arg("attributes")) .def("AddPoint", &BND_ONXModel_ObjectTable::AddPoint2, py::arg("point")) + .def("AddPoint", &BND_ONXModel_ObjectTable::AddPoint3, py::arg("point"), py::arg("attributes")) .def("AddPoint", &BND_ONXModel_ObjectTable::AddPoint4, py::arg("point")) + .def("AddPoint", &BND_ONXModel_ObjectTable::AddPoint5, py::arg("point"), py::arg("attributes")) .def("AddPointCloud", &BND_ONXModel_ObjectTable::AddPointCloud, py::arg("cloud"), py::arg("attributes")=nullptr) .def("AddLine", &BND_ONXModel_ObjectTable::AddLine1, py::arg("from"), py::arg("to")) .def("AddPolyline", &BND_ONXModel_ObjectTable::AddPolyline1, py::arg("polyline"), py::arg("attributes")=nullptr) diff --git a/src/bindings/bnd_extensions.h b/src/bindings/bnd_extensions.h index e8d0d484..73d797d6 100644 --- a/src/bindings/bnd_extensions.h +++ b/src/bindings/bnd_extensions.h @@ -29,10 +29,11 @@ class BND_ONXModel_ObjectTable public: BND_ONXModel_ObjectTable(std::shared_ptr m) { m_model = m; } BND_UUID AddPoint1(double x, double y, double z); + BND_UUID AddPoint6(double x, double y, double z, const class BND_3dmObjectAttributes* attributes); BND_UUID AddPoint2(const ON_3dPoint& point) { return AddPoint1(point.x, point.y, point.z); } - //Guid AddPoint3(Point3d point, DocObjects.ObjectAttributes attributes) + BND_UUID AddPoint3(const ON_3dPoint& point, const class BND_3dmObjectAttributes* attributes) { return AddPoint6(point.x, point.y, point.z, attributes); } BND_UUID AddPoint4(const ON_3fPoint& point) { return AddPoint1(point.x, point.y, point.z); } - //Guid AddPoint5(Point3f point, DocObjects.ObjectAttributes attributes) + BND_UUID AddPoint5(const ON_3fPoint& point, const class BND_3dmObjectAttributes* attributes) { return AddPoint6(point.x, point.y, point.z, attributes); } //Guid[] AddPoints1(IEnumerable points) //Guid[] AddPoints2(IEnumerable points, DocObjects.ObjectAttributes attributes) //Guid[] AddPoints3(IEnumerable points)