diff --git a/MeshLib/MeshSurfaceExtraction.cpp b/MeshLib/MeshSurfaceExtraction.cpp index 7165d20665cc927ee7799994163d01428318be41..6188f52d4ba5ecf943d434d595c26d462f464b74 100644 --- a/MeshLib/MeshSurfaceExtraction.cpp +++ b/MeshLib/MeshSurfaceExtraction.cpp @@ -63,7 +63,7 @@ void MeshSurfaceExtraction::getSurfaceAreaForNodes(const MeshLib::Mesh &mesh, st ERR ("Error in MeshSurfaceExtraction::getSurfaceAreaForNodes() - Given mesh is no surface mesh (dimension != 2)."); } -MeshLib::Mesh* MeshSurfaceExtraction::getMeshSurface(const MeshLib::Mesh &mesh, const MathLib::Vector3 &dir, bool keep3dMeshIds) +MeshLib::Mesh* MeshSurfaceExtraction::getMeshSurface(const MeshLib::Mesh &mesh, const MathLib::Vector3 &dir, bool keepOriginalNodeIds) { INFO ("Extracting mesh surface..."); const std::vector<MeshLib::Element*> all_elements (mesh.getElements()); @@ -100,14 +100,14 @@ MeshLib::Mesh* MeshSurfaceExtraction::getMeshSurface(const MeshLib::Mesh &mesh, } std::vector<std::size_t> id_map; - if (keep3dMeshIds) + if (keepOriginalNodeIds) { id_map.reserve(sfc_nodes.size()); for (auto node = sfc_nodes.cbegin(); node != sfc_nodes.cend(); ++node) id_map.push_back((*node)->getID()); } MeshLib::Mesh* result (new Mesh("SurfaceMesh", sfc_nodes, new_elements)); - if (keep3dMeshIds) + if (keepOriginalNodeIds) for (auto node = sfc_nodes.begin(); node != sfc_nodes.end(); ++node) (*node)->setID(id_map[(*node)->getID()]); diff --git a/MeshLib/MeshSurfaceExtraction.h b/MeshLib/MeshSurfaceExtraction.h index f15545e0d938a1db140f16c4a152d0d6ed441276..2089c548b953a4aab419f167960a43db8de15c5e 100644 --- a/MeshLib/MeshSurfaceExtraction.h +++ b/MeshLib/MeshSurfaceExtraction.h @@ -44,12 +44,12 @@ public: /** * Returns the 2d-element mesh representing the surface of the given layered mesh. - * \param mesh The original mesh - * \param dir The direction in which face normals have to point to be considered surface elements - * \param keep3dMeshIds If true, ids of mesh nodes are set to ids in original mesh, otherwise node ids are reset (as usual when creating a mesh) - * \return A 2D mesh representing the surface in direction dir + * \param mesh The original mesh + * \param dir The direction in which face normals have to point to be considered surface elements + * \param keepOriginalNodeIds If true, ids of mesh nodes are set to ids in original mesh, otherwise node ids are reset (as usual when creating a mesh) + * \return A 2D mesh representing the surface in direction dir */ - static MeshLib::Mesh* getMeshSurface(const MeshLib::Mesh &mesh, const MathLib::Vector3 &dir, bool keep3dMeshIds = false); + static MeshLib::Mesh* getMeshSurface(const MeshLib::Mesh &mesh, const MathLib::Vector3 &dir, bool keepOriginalNodeIds = false); private: /// Functionality needed for getSurfaceNodes() and getMeshSurface()