From 4eb7a6bcde0729cf9d14f67d848ac9629f80710e Mon Sep 17 00:00:00 2001 From: Tobias Reiter Date: Fri, 14 Jun 2024 16:01:21 +0200 Subject: [PATCH] Fix bindings --- include/viennals/lsBooleanOperation.hpp | 2 +- include/viennals/lsCalculateNormalVectors.hpp | 2 +- python/pyWrap.cpp | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/viennals/lsBooleanOperation.hpp b/include/viennals/lsBooleanOperation.hpp index 89e54856..eea20122 100644 --- a/include/viennals/lsBooleanOperation.hpp +++ b/include/viennals/lsBooleanOperation.hpp @@ -168,7 +168,7 @@ template class BooleanOperation { // vectors for (unsigned i = 0; i < AData.getVectorDataSize(); ++i) { auto vectorDataLabel = AData.getVectorDataLabel(i); - auto BPointer = BData.getVectorData(vectorDataLabel); + auto BPointer = BData.getVectorData(vectorDataLabel, true); if (BPointer != nullptr) { auto APointer = AData.getVectorData(i); // copy all data into the new vectorData diff --git a/include/viennals/lsCalculateNormalVectors.hpp b/include/viennals/lsCalculateNormalVectors.hpp index 7681c4ca..b8703bbd 100644 --- a/include/viennals/lsCalculateNormalVectors.hpp +++ b/include/viennals/lsCalculateNormalVectors.hpp @@ -142,7 +142,7 @@ template class CalculateNormalVectors { // insert into pointData of levelSet auto &pointData = levelSet->getPointData(); - auto vectorDataPointer = pointData.getVectorData(normalVectorsLabel); + auto vectorDataPointer = pointData.getVectorData(normalVectorsLabel, true); // if it does not exist, insert new normals vector if (vectorDataPointer == nullptr) { pointData.insertNextVectorData(normalVectorsVector[0], diff --git a/python/pyWrap.cpp b/python/pyWrap.cpp index 5a1e2967..714dff14 100644 --- a/python/pyWrap.cpp +++ b/python/pyWrap.cpp @@ -764,16 +764,16 @@ PYBIND11_MODULE(VIENNALS_MODULE_NAME, module) { .def("getScalarData", (PointData::ScalarDataType * (PointData::*)(int)) & PointData::getScalarData) - .def("getScalarData", - (PointData::ScalarDataType * (PointData::*)(std::string)) & - PointData::getScalarData) + .def("getScalarData", (PointData::ScalarDataType * + (PointData::*)(std::string, bool)) & + PointData::getScalarData) .def("getScalarDataLabel", &PointData::getScalarDataLabel) .def("getVectorData", (PointData::VectorDataType * (PointData::*)(int)) & PointData::getVectorData) - .def("getVectorData", - (PointData::VectorDataType * (PointData::*)(std::string)) & - PointData::getVectorData) + .def("getVectorData", (PointData::VectorDataType * + (PointData::*)(std::string, bool)) & + PointData::getVectorData) .def("getVectorDataLabel", &PointData::getVectorDataLabel); // MaterialMap