From da0d4091a1813d347d77dc7574aed5af5c150275 Mon Sep 17 00:00:00 2001 From: Karsten Rink <karsten.rink@ufz.de> Date: Wed, 1 Oct 2014 13:03:39 +0200 Subject: [PATCH] replaced boost::radian with boost::pi again because the former didn't give the desired result --- Applications/DataExplorer/DataView/MshView.cpp | 2 +- MeshLib/MeshSurfaceExtraction.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Applications/DataExplorer/DataView/MshView.cpp b/Applications/DataExplorer/DataView/MshView.cpp index 6d935057ef7..79cda6174da 100644 --- a/Applications/DataExplorer/DataView/MshView.cpp +++ b/Applications/DataExplorer/DataView/MshView.cpp @@ -194,7 +194,7 @@ void MshView::extractSurfaceMesh() const MeshLib::Mesh* mesh = static_cast<MshModel*>(this->model())->getMesh(index); const MathLib::Vector3 dir(0, 0, -1); - static_cast<MshModel*>(this->model())->addMesh( MeshLib::MeshSurfaceExtraction::getMeshSurface(*mesh, dir, 90) ); + static_cast<MshModel*>(this->model())->addMesh( MeshLib::MeshSurfaceExtraction::getMeshSurface(*mesh, dir, 89) ); } void MshView::convertMeshToGeometry() diff --git a/MeshLib/MeshSurfaceExtraction.cpp b/MeshLib/MeshSurfaceExtraction.cpp index d969b023b92..16e1944642f 100644 --- a/MeshLib/MeshSurfaceExtraction.cpp +++ b/MeshLib/MeshSurfaceExtraction.cpp @@ -125,7 +125,8 @@ void MeshSurfaceExtraction::get2DSurfaceElements(const std::vector<MeshLib::Elem bool const complete_surface = (MathLib::scalarProduct(dir, dir) == 0); - double const cos_theta (std::cos(angle * boost::math::constants::radian<double>())); + double const pi (boost::math::constants::pi<double>()); + double const cos_theta (std::cos(angle * pi / 180.0)); MathLib::Vector3 const norm_dir (dir.getNormalizedVector()); for (auto elem = all_elements.cbegin(); elem != all_elements.cend(); ++elem) -- GitLab