From 0ec7f97db7ce34c87263cb1e840c52fafbd4091a Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Wed, 23 Jun 2021 08:56:05 +0200 Subject: [PATCH] [A/U | A/IO] Use MathLib::Point3d version of Polygon::isPntInPolygon. --- Applications/FileIO/FEFLOW/FEFLOWMeshInterface.cpp | 2 +- .../MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Applications/FileIO/FEFLOW/FEFLOWMeshInterface.cpp b/Applications/FileIO/FEFLOW/FEFLOWMeshInterface.cpp index fcbbd9f1d1c..22b47e28938 100644 --- a/Applications/FileIO/FEFLOW/FEFLOWMeshInterface.cpp +++ b/Applications/FileIO/FEFLOW/FEFLOWMeshInterface.cpp @@ -735,7 +735,7 @@ void FEFLOWMeshInterface::setMaterialIDs( } GeoLib::Polygon polygon(*poly, true); - if (polygon.isPntInPolygon(gpt[0], gpt[1], gpt[2])) + if (polygon.isPntInPolygon(gpt)) { matId = j; break; diff --git a/Applications/Utils/MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp b/Applications/Utils/MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp index a0e61a2d1c8..49ac89e93b2 100644 --- a/Applications/Utils/MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp +++ b/Applications/Utils/MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp @@ -150,10 +150,10 @@ int main(int argc, char* argv[]) std::vector<std::pair<std::size_t, double>> ids_and_areas; for (std::size_t k(0); k < all_sfc_nodes.size(); k++) { - MeshLib::Node const& pnt(*(all_sfc_nodes[k])); - if (polygon.isPntInPolygon(pnt[0], pnt[1], pnt[2])) + MeshLib::Node const& surface_node(*(all_sfc_nodes[k])); + if (polygon.isPntInPolygon(surface_node)) { - ids_and_areas.emplace_back(pnt.getID(), areas[k]); + ids_and_areas.emplace_back(surface_node.getID(), areas[k]); } } if (ids_and_areas.empty()) -- GitLab