diff --git a/GeoLib/AnalyticalGeometry.cpp b/GeoLib/AnalyticalGeometry.cpp index 198c0443744b9a93841edf6aff83f12a85ca4180..957581ebe1f677da3c0554e5473a4ed1cb445732 100644 --- a/GeoLib/AnalyticalGeometry.cpp +++ b/GeoLib/AnalyticalGeometry.cpp @@ -363,7 +363,7 @@ void computeAndInsertAllIntersectionPoints(GeoLib::PointVec &pnt_vec, } GeoLib::Polygon rotatePolygonToXY(GeoLib::Polygon const& polygon_in, - MathLib::Vector3 & plane_normal) + Eigen::Vector3d& plane_normal) { // 1 copy all points auto* polygon_pnts(new std::vector<GeoLib::Point*>); @@ -373,12 +373,8 @@ GeoLib::Polygon rotatePolygonToXY(GeoLib::Polygon const& polygon_in, } // 2 rotate points - auto const [normal, d_polygon] = GeoLib::getNewellPlane(*polygon_pnts); - // ToDo (TF) remove when computeRotationMatrixToXY uses Eigen - plane_normal[0] = normal[0]; - plane_normal[1] = normal[1]; - plane_normal[2] = normal[2]; - + double d_polygon; + std::tie(plane_normal, d_polygon) = GeoLib::getNewellPlane(*polygon_pnts); MathLib::DenseMatrix<double> rot_mat(3,3); GeoLib::computeRotationMatrixToXY(plane_normal, rot_mat); GeoLib::rotatePoints(rot_mat, *polygon_pnts); diff --git a/GeoLib/AnalyticalGeometry.h b/GeoLib/AnalyticalGeometry.h index 9415245efb6652836a4aad4ff91b85f1ab16da5a..7835e5cd480792f224e8ce6c85d1d652e92764da 100644 --- a/GeoLib/AnalyticalGeometry.h +++ b/GeoLib/AnalyticalGeometry.h @@ -223,7 +223,7 @@ void computeAndInsertAllIntersectionPoints(GeoLib::PointVec &pnt_vec, * @return a rotated polygon */ GeoLib::Polygon rotatePolygonToXY(GeoLib::Polygon const& polygon_in, - MathLib::Vector3 & plane_normal); + Eigen::Vector3d& plane_normal); /// Sorts the vector of segments such that the \f$i\f$-th segment is connected /// with the \f$i+1\f$st segment, i.e. the end point of the \f$i\f$-th segment diff --git a/MeshGeoToolsLib/MeshEditing/MarkNodesOutsideOfPolygon.h b/MeshGeoToolsLib/MeshEditing/MarkNodesOutsideOfPolygon.h index 4b7612b37b84f681fc7ea1cd6fc4eb995525d0b3..ac19be6a9309699c5a6b4be61981e8453be171fe 100644 --- a/MeshGeoToolsLib/MeshEditing/MarkNodesOutsideOfPolygon.h +++ b/MeshGeoToolsLib/MeshEditing/MarkNodesOutsideOfPolygon.h @@ -27,11 +27,8 @@ std::vector<bool> markNodesOutSideOfPolygon( std::vector<MeshLib::Node*> const& nodes, GeoLib::Polygon const& polygon) { // *** rotate polygon to xy_plane - MathLib::Vector3 tmp_normal; - GeoLib::Polygon rot_polygon(GeoLib::rotatePolygonToXY(polygon, tmp_normal)); - // ToDo (TF) remove when computeRotationMatrixToXY accepts Eigen normal - auto const normal = Eigen::Map<Eigen::Vector3d>( - const_cast<double*>(tmp_normal.getCoords())); + Eigen::Vector3d normal; + GeoLib::Polygon rot_polygon(GeoLib::rotatePolygonToXY(polygon, normal)); // *** rotate mesh nodes to xy-plane // 1 copy all mesh nodes to GeoLib::Points