diff --git a/Applications/Utils/MeshEdit/editMaterialID.cpp b/Applications/Utils/MeshEdit/editMaterialID.cpp index f9b533d3161d64724eff3dcb9e360c192d22d232..3a75c3adb1370e393765e2b50a41397c4844035e 100644 --- a/Applications/Utils/MeshEdit/editMaterialID.cpp +++ b/Applications/Utils/MeshEdit/editMaterialID.cpp @@ -98,7 +98,7 @@ int main (int argc, char* argv[]) const std::string eleTypeName(eleTypeArg.getValue()); const MeshElemType eleType = String2MeshElemType(eleTypeName); const unsigned newID = newIDArg.getValue(); - unsigned cnt = MeshLib::ElementValueModification::set(*mesh, eleType, newID); + unsigned cnt = MeshLib::ElementValueModification::setByElementType(*mesh, eleType, newID); INFO("updated %d elements", cnt); } diff --git a/MeshLib/MeshEditing/ElementValueModification.cpp b/MeshLib/MeshEditing/ElementValueModification.cpp index d6bb6c1c4d94f11b7cbbcd8e9e69daffc0a109d0..be2a76aabb11ca7b1cb4c0afb303740b0cb31210 100644 --- a/MeshLib/MeshEditing/ElementValueModification.cpp +++ b/MeshLib/MeshEditing/ElementValueModification.cpp @@ -91,7 +91,7 @@ unsigned ElementValueModification::condense(MeshLib::Mesh &mesh) return nValues; } -unsigned ElementValueModification::set(MeshLib::Mesh &mesh, MeshElemType ele_type, unsigned new_value) +unsigned ElementValueModification::setByElementType(MeshLib::Mesh &mesh, MeshElemType ele_type, unsigned new_value) { std::vector<MeshLib::Element*> elements (mesh.getElements()); unsigned nValues = 0; diff --git a/MeshLib/MeshEditing/ElementValueModification.h b/MeshLib/MeshEditing/ElementValueModification.h index 40fbf25dbf3d1b04be3be06cd4fb483d73d744c2..6d1b43744f05d950f26ae11b5710274aa2446cb0 100644 --- a/MeshLib/MeshEditing/ElementValueModification.h +++ b/MeshLib/MeshEditing/ElementValueModification.h @@ -16,6 +16,7 @@ #define MESHVALUEMODIFICATION_H #include <vector> + #include "MeshLib/MeshEnums.h" namespace MeshLib { @@ -37,7 +38,8 @@ public: static bool replace(MeshLib::Mesh &mesh, unsigned old_value, unsigned new_value, bool replace_if_exists = false); /// Sets new value for all elements having the given element type - static unsigned set(MeshLib::Mesh &mesh, MeshElemType ele_type, unsigned new_value); + /// Returns the number of elements having the given element type + static unsigned setByElementType(MeshLib::Mesh &mesh, MeshElemType ele_type, unsigned new_value); private: /// Returns the values of elements within the mesh