diff --git a/GeoLib/MinimalBoundingSphere.cpp b/GeoLib/MinimalBoundingSphere.cpp index b29448a77d2513b564dad0a02a35bfeb20aad06d..7f99bc9f6072bed483c9baa62f13da3f5751bdec 100644 --- a/GeoLib/MinimalBoundingSphere.cpp +++ b/GeoLib/MinimalBoundingSphere.cpp @@ -182,7 +182,7 @@ MinimalBoundingSphere::recurseCalculation( double MinimalBoundingSphere::pointDistanceSquared(MathLib::Point3d const& pnt) const { - return MathLib::sqrDist(_center.getCoords(), pnt.getCoords())-(_radius*_radius); + return MathLib::sqrDist(_center, pnt)-(_radius*_radius); } std::vector<MathLib::Point3d*>* MinimalBoundingSphere::getRandomSpherePoints(std::size_t n_points) const diff --git a/MeshGeoToolsLib/MeshNodeSearcher.cpp b/MeshGeoToolsLib/MeshNodeSearcher.cpp index 5afc280eb6d25fdb1086995b96e2d4cd1bb3cd11..7887ba457ad55f323ae60127d25cf01d8496fc86 100644 --- a/MeshGeoToolsLib/MeshNodeSearcher.cpp +++ b/MeshGeoToolsLib/MeshNodeSearcher.cpp @@ -163,9 +163,7 @@ std::vector<std::size_t> MeshNodeSearcher::getMeshNodeIDs( ss << "- bulk node: " << (*bulk_nodes[id])[0] << ", " << (*bulk_nodes[id])[1] << ", " << (*bulk_nodes[id])[2] << ", distance: " - << std::sqrt(MathLib::sqrDist(bulk_nodes[id]->getCoords(), - p.getCoords())) - << "\n"; + << std::sqrt(MathLib::sqrDist(*bulk_nodes[id], p)) << "\n"; } OGS_FATAL( "Found {:d} nodes in the mesh for point {:d} : ({:g}, {:g}, " diff --git a/MeshLib/Elements/LineRule2.cpp b/MeshLib/Elements/LineRule2.cpp index 7ff5e1f01d8eee28baeed70b4ca14a413c07e57b..373a8ef4b8b4146b72a8ad6b94469281638ef281 100644 --- a/MeshLib/Elements/LineRule2.cpp +++ b/MeshLib/Elements/LineRule2.cpp @@ -21,7 +21,7 @@ const unsigned LineRule2::edge_nodes[1][2] = double LineRule2::computeVolume(Node const* const* _nodes) { - return sqrt(MathLib::sqrDist(_nodes[0]->getCoords(), _nodes[1]->getCoords())); + return sqrt(MathLib::sqrDist(*_nodes[0], *_nodes[1])); } bool LineRule2::isPntInElement(Node const* const* nodes, diff --git a/MeshLib/MeshEditing/MeshRevision.cpp b/MeshLib/MeshEditing/MeshRevision.cpp index 7783ff84722b3dc0f6292139ab6ae9eb461e6b5b..3815dc5ff6c3ebbcca96b6eca1a987383b7fab05 100644 --- a/MeshLib/MeshEditing/MeshRevision.cpp +++ b/MeshLib/MeshEditing/MeshRevision.cpp @@ -179,8 +179,7 @@ std::vector<std::size_t> MeshRevision::collapseNodeIndices(double eps) const } // calc distance - if (MathLib::sqrDist(node->getCoords(), - test_node->getCoords()) < sqr_eps) + if (MathLib::sqrDist(*node, *test_node) < sqr_eps) { id_map[test_node->getID()] = node->getID(); }