diff --git a/MeshGeoToolsLib/MeshNodesAlongSurface.cpp b/MeshGeoToolsLib/MeshNodesAlongSurface.cpp index bf25042943627827e00acb23fec9e1b55023e0c1..9fc50ec6b6ed2d440c746475491b6b97886744b0 100644 --- a/MeshGeoToolsLib/MeshNodesAlongSurface.cpp +++ b/MeshGeoToolsLib/MeshNodesAlongSurface.cpp @@ -32,9 +32,9 @@ MeshNodesAlongSurface::MeshNodesAlongSurface( // loop over all nodes for (std::size_t i = 0; i < n_nodes; i++) { auto* node = mesh_nodes[i]; - if (!sfc.isPntInBoundingVolume(node->getCoords())) + if (!sfc.isPntInBoundingVolume(*node)) continue; - if (sfc.isPntInSfc(node->getCoords())) { + if (sfc.isPntInSfc(*node)) { _msh_node_ids.push_back(node->getID()); } } diff --git a/NumLib/Function/LinearInterpolationOnSurface.cpp b/NumLib/Function/LinearInterpolationOnSurface.cpp index f463e80959e55865c6c97467d2d408c528f545b2..6f7ef7702a809f3c0122ead2ed83a813dada29c4 100644 --- a/NumLib/Function/LinearInterpolationOnSurface.cpp +++ b/NumLib/Function/LinearInterpolationOnSurface.cpp @@ -41,10 +41,9 @@ LinearInterpolationOnSurface::LinearInterpolationOnSurface( double LinearInterpolationOnSurface::operator()(const MathLib::Point3d& pnt) const { - const double* coords = pnt.getCoords(); - if (!_sfc.isPntInBoundingVolume(coords)) + if (!_sfc.isPntInBoundingVolume(pnt)) return _default_value; - auto* tri = _sfc.findTriangle(coords); + auto* tri = _sfc.findTriangle(pnt); if (tri == nullptr) return _default_value; @@ -58,7 +57,7 @@ double LinearInterpolationOnSurface::operator()(const MathLib::Point3d& pnt) con pnt_values[j] = _default_value; } } - double val = interpolateInTri(*tri, pnt_values.data(), coords); + double val = interpolateInTri(*tri, pnt_values.data(), pnt); return val; }