diff --git a/Applications/DataExplorer/DataView/MshView.cpp b/Applications/DataExplorer/DataView/MshView.cpp index 6d935057ef792008abbb7ec638d30fd1823a3c26..79cda6174da0f17e31721f2ad427f0b1fdacf6e0 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 d969b023b9280ca75413fa549faf7cb70a66fe1a..16e1944642fcd516ef2be328b9bb00722ef28c5d 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)