mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1544 Fracture : Show perforation length for along well path fractures
This commit is contained in:
parent
53418179ba
commit
5c1f5326a0
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -168,6 +168,16 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (changedField == &perforationLength)
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj)
|
||||
{
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user