mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#260) Displaying NNC info and intersection point for picked faults when there's no cell index
This commit is contained in:
parent
04d70a9204
commit
320b0c62c4
@ -86,19 +86,23 @@ QString RiuResultTextBuilder::mainResultText()
|
|||||||
// Priority defined as follows : NNC, Fault, Grid
|
// Priority defined as follows : NNC, Fault, Grid
|
||||||
{
|
{
|
||||||
QString nncText = nncResultText();
|
QString nncText = nncResultText();
|
||||||
QString faultText = faultResultText();
|
|
||||||
|
|
||||||
if (!nncText.isEmpty())
|
if (!nncText.isEmpty())
|
||||||
{
|
{
|
||||||
text = "NNC : " + nncText;
|
text = "NNC : " + nncText;
|
||||||
}
|
}
|
||||||
else if (!faultResultText().isEmpty())
|
|
||||||
|
if (m_cellIndex != cvf::UNDEFINED_SIZE_T)
|
||||||
{
|
{
|
||||||
text = "Fault : " + faultText;
|
QString faultText = faultResultText();
|
||||||
}
|
|
||||||
else
|
if (!faultResultText().isEmpty())
|
||||||
{
|
{
|
||||||
text = "Grid cell : " + gridResultText();
|
text = "Fault : " + faultText;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
text = "Grid cell : " + gridResultText();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
text += "\n";
|
text += "\n";
|
||||||
@ -110,13 +114,13 @@ QString RiuResultTextBuilder::mainResultText()
|
|||||||
|
|
||||||
appendDetails(text, nncDetails());
|
appendDetails(text, nncDetails());
|
||||||
|
|
||||||
appendDetails(text, faultResultDetails());
|
if (m_cellIndex != cvf::UNDEFINED_SIZE_T)
|
||||||
|
{
|
||||||
appendDetails(text, cellEdgeResultDetails());
|
appendDetails(text, faultResultDetails());
|
||||||
|
appendDetails(text, cellEdgeResultDetails());
|
||||||
appendDetails(text, gridResultDetails());
|
appendDetails(text, gridResultDetails());
|
||||||
|
appendDetails(text, wellResultText());
|
||||||
appendDetails(text, wellResultText());
|
}
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -133,31 +137,34 @@ QString RiuResultTextBuilder::topologyText(QString itemSeparator)
|
|||||||
const RigCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
|
const RigCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
|
||||||
if (eclipseCase)
|
if (eclipseCase)
|
||||||
{
|
{
|
||||||
size_t i = 0;
|
if (m_cellIndex != cvf::UNDEFINED_SIZE_T)
|
||||||
size_t j = 0;
|
|
||||||
size_t k = 0;
|
|
||||||
if (eclipseCase->grid(m_gridIndex)->ijkFromCellIndex(m_cellIndex, &i, &j, &k))
|
|
||||||
{
|
{
|
||||||
// Adjust to 1-based Eclipse indexing
|
size_t i = 0;
|
||||||
i++;
|
size_t j = 0;
|
||||||
j++;
|
size_t k = 0;
|
||||||
k++;
|
if (eclipseCase->grid(m_gridIndex)->ijkFromCellIndex(m_cellIndex, &i, &j, &k))
|
||||||
|
{
|
||||||
|
// Adjust to 1-based Eclipse indexing
|
||||||
|
i++;
|
||||||
|
j++;
|
||||||
|
k++;
|
||||||
|
|
||||||
cvf::Vec3d domainCoord = m_intersectionPoint + eclipseCase->grid(m_gridIndex)->displayModelOffset();
|
cvf::StructGridInterface::FaceEnum faceEnum(m_face);
|
||||||
|
|
||||||
cvf::StructGridInterface::FaceEnum faceEnum(m_face);
|
QString faceText = faceEnum.text();
|
||||||
|
|
||||||
QString faceText = faceEnum.text();
|
text += QString("Face : %1").arg(faceText) + itemSeparator;
|
||||||
|
text += QString("Hit grid %1").arg(m_gridIndex) + itemSeparator;
|
||||||
text += QString("Face : %1").arg(faceText) + itemSeparator;
|
text += QString("Cell : [%1, %2, %3]").arg(i).arg(j).arg(k) + itemSeparator;
|
||||||
text += QString("Hit grid %1").arg(m_gridIndex) + itemSeparator;
|
}
|
||||||
text += QString("Cell : [%1, %2, %3]").arg(i).arg(j).arg(k) + itemSeparator;
|
|
||||||
|
|
||||||
QString formattedText;
|
|
||||||
formattedText.sprintf("Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]", domainCoord.x(), domainCoord.y(), -domainCoord.z());
|
|
||||||
|
|
||||||
text += formattedText;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cvf::Vec3d domainCoord = m_intersectionPoint + eclipseCase->grid(0)->displayModelOffset();
|
||||||
|
|
||||||
|
QString formattedText;
|
||||||
|
formattedText.sprintf("Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]", domainCoord.x(), domainCoord.y(), -domainCoord.z());
|
||||||
|
|
||||||
|
text += formattedText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ void RiuViewerCommands::handlePickAction(int winPosX, int winPosY)
|
|||||||
QString pickInfo = "No hits";
|
QString pickInfo = "No hits";
|
||||||
QString resultInfo = "";
|
QString resultInfo = "";
|
||||||
|
|
||||||
if (cellIndex != cvf::UNDEFINED_SIZE_T)
|
if (cellIndex != cvf::UNDEFINED_SIZE_T || nncIndex != cvf::UNDEFINED_SIZE_T)
|
||||||
{
|
{
|
||||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(m_reservoirView.p());
|
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(m_reservoirView.p());
|
||||||
RimGeoMechView* geomView = dynamic_cast<RimGeoMechView*>(m_reservoirView.p());
|
RimGeoMechView* geomView = dynamic_cast<RimGeoMechView*>(m_reservoirView.p());
|
||||||
|
Loading…
Reference in New Issue
Block a user