#1544 Fracture : Show perforation length for along well path fractures

This commit is contained in:
Magne Sjaastad 2018-01-19 15:08:28 +01:00
parent 53418179ba
commit 5c1f5326a0
4 changed files with 79 additions and 1 deletions

View File

@ -23,6 +23,7 @@
#include "RigFractureGrid.h"
#include "RigHexIntersectionTools.h"
#include "RigMainGrid.h"
#include "RigWellPath.h"
#include "RimCase.h"
#include "RimEclipseView.h"
@ -34,11 +35,13 @@
#include "RimSimWellInView.h"
#include "RimStimPlanColors.h"
#include "RimStimPlanFractureTemplate.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RivFaultGeometryGenerator.h"
#include "RivObjectSourceInfo.h"
#include "RivPartPriority.h"
#include "RivPipeGeometryGenerator.h"
#include "RivWellFracturePartMgr.h"
#include "cafDisplayCoordTransform.h"
@ -220,6 +223,8 @@ void RivWellFracturePartMgr::appendGeometryPartsToModel(cvf::ModelBasicList* mod
}
}
}
appendFracturePerforationLengthParts(eclView, model);
}
//--------------------------------------------------------------------------------------------------
@ -689,6 +694,66 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createContainmentMaskPart(const RimE
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivWellFracturePartMgr::appendFracturePerforationLengthParts(const RimEclipseView& activeView, cvf::ModelBasicList* model)
{
if (!m_rimFracture->isChecked()) return;
if (!m_rimFracture->fractureTemplate()) return;
if (m_rimFracture->fractureTemplate()->orientationType() != RimFractureTemplate::ALONG_WELL_PATH) return;
auto displayCoordTransform = activeView.displayCoordTransform();
if (displayCoordTransform.isNull()) return;
double characteristicCellSize = activeView.ownerCase()->characteristicCellSize();
double wellPathRadius = 1.0;
{
RimWellPath* rimWellPath = nullptr;
m_rimFracture->firstAncestorOrThisOfType(rimWellPath);
if (rimWellPath)
{
wellPathRadius = rimWellPath->wellPathRadius(characteristicCellSize);
}
}
{
RimSimWellInView* simWell = nullptr;
m_rimFracture->firstAncestorOrThisOfType(simWell);
if (simWell)
{
wellPathRadius = simWell->pipeRadius();
}
}
std::vector<cvf::Vec3d> displayCoords;
{
std::vector<cvf::Vec3d> perforationLengthCoord = m_rimFracture->perforationLengthCenterLineCoords();
for (const cvf::Vec3d& point : perforationLengthCoord)
{
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(point));
}
}
if (!displayCoords.empty())
{
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(m_rimFracture);
double perforationRadius = wellPathRadius * 1.2;
cvf::Collection<cvf::Part> parts;
RivPipeGeometryGenerator geoGenerator;
geoGenerator.cylinderWithCenterLineParts(&parts, displayCoords, cvf::Color3f::ORANGE, perforationRadius);
for (auto part : parts)
{
part->setSourceInfo(objectSourceInfo.p());
model->addPart(part.p());
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -66,6 +66,8 @@ private:
cvf::ref<cvf::Part> createStimPlanElementColorSurfacePart(const RimEclipseView& activeView);
cvf::ref<cvf::Part> createContainmentMaskPart(const RimEclipseView& activeView);
void appendFracturePerforationLengthParts(const RimEclipseView& activeView, cvf::ModelBasicList* model);
cvf::ref<cvf::Part> createStimPlanMeshPart(const RimEclipseView& activeView);
cvf::ref<cvf::DrawableGeo> createStimPlanMeshDrawable(RimStimPlanFractureTemplate* stimPlanFracTemplate, const RimEclipseView& activeView) const;

View File

@ -230,7 +230,8 @@ void RimFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
changedField == &m_stimPlanCellVizMode ||
changedField == this->objectToggleField() ||
changedField == &m_dip ||
changedField == &m_tilt)
changedField == &m_tilt ||
changedField == &m_perforationLength)
{
Rim3dView* rimView = nullptr;
this->firstAncestorOrThisOfType(rimView);

View File

@ -168,6 +168,16 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
}
}
}
if (changedField == &perforationLength)
{
RimProject* proj;
this->firstAncestorOrThisOfType(proj);
if (proj)
{
proj->createDisplayModelAndRedrawAllViews();
}
}
}
//--------------------------------------------------------------------------------------------------