mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2449 2d intersection view. Show UTM intersection point in result info window
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
#include "RigResultAccessorFactory.h"
|
||||
#include "RigSimWellData.h"
|
||||
|
||||
#include "Rim2dIntersectionView.h"
|
||||
#include "RimIntersection.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
@@ -36,6 +38,8 @@
|
||||
#include "RimLegendConfig.h"
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
|
||||
#include "RivIntersectionPartMgr.h"
|
||||
|
||||
#include "cafDisplayCoordTransform.h"
|
||||
|
||||
|
||||
@@ -73,6 +77,14 @@ void RiuResultTextBuilder::setIntersectionPoint(cvf::Vec3d intersectionPoint)
|
||||
m_intersectionPoint = intersectionPoint;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuResultTextBuilder::set2dIntersectionView(Rim2dIntersectionView* intersectionView)
|
||||
{
|
||||
m_2dIntersectionView = intersectionView;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -177,9 +189,24 @@ QString RiuResultTextBuilder::geometrySelectionText(QString itemSeparator)
|
||||
cvf::Vec3d domainCoord = transForm->translateToDomainCoord(m_intersectionPoint);
|
||||
|
||||
QString formattedText;
|
||||
formattedText.sprintf("Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]", domainCoord.x(), domainCoord.y(), -domainCoord.z());
|
||||
if (m_2dIntersectionView)
|
||||
{
|
||||
formattedText.sprintf("Horizontal length from well start: %.2f", domainCoord.x());
|
||||
text += formattedText + itemSeparator;
|
||||
|
||||
text += formattedText;
|
||||
cvf::Mat4d t = m_2dIntersectionView->flatIntersectionPartMgr()->unflattenTransformMatrix(m_intersectionPoint);
|
||||
if (!t.isZero())
|
||||
{
|
||||
cvf::Vec3d intPt = m_intersectionPoint.getTransformedPoint(t);
|
||||
formattedText.sprintf("Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]", intPt.x(), intPt.y(), -intPt.z());
|
||||
text += formattedText;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
formattedText.sprintf("Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]", domainCoord.x(), domainCoord.y(), -domainCoord.z());
|
||||
text += formattedText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user