mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 23:46:00 -06:00
#1544 : Move well path radius to RimWellPath
This commit is contained in:
parent
8e5bcef7c7
commit
c7d61ed7f4
@ -178,16 +178,13 @@ void RivWellPathPartMgr::appendPerforationsToModel(const QDateTime& currentViewD
|
||||
{
|
||||
if (!m_rimWellPath || !m_rimWellPath->perforationIntervalCollection()->isChecked()) return;
|
||||
|
||||
RimWellPathCollection* wellPathCollection = this->wellPathCollection();
|
||||
if (!wellPathCollection) return;
|
||||
|
||||
RigWellPath* wellPathGeometry = m_rimWellPath->wellPathGeometry();
|
||||
if (!wellPathGeometry) return;
|
||||
|
||||
// Since we're using the index of measured depths to find the index of a point, ensure they're equal
|
||||
CVF_ASSERT(wellPathGeometry->m_measuredDepths.size() == wellPathGeometry->m_wellPathPoints.size());
|
||||
|
||||
double wellPathRadius = this->wellPathRadius(characteristicCellSize, wellPathCollection);
|
||||
double wellPathRadius = m_rimWellPath->wellPathRadius(characteristicCellSize);
|
||||
double perforationRadius = wellPathRadius * 1.1;
|
||||
|
||||
RivPipeGeometryGenerator geoGenerator;
|
||||
@ -236,7 +233,7 @@ void RivWellPathPartMgr::buildWellPathParts(const caf::DisplayCoordTransform* di
|
||||
if (wellPathGeometry->m_wellPathPoints.size() < 2) return;
|
||||
|
||||
clearAllBranchData();
|
||||
double wellPathRadius = this->wellPathRadius(characteristicCellSize, wellPathCollection);
|
||||
double wellPathRadius = m_rimWellPath->wellPathRadius(characteristicCellSize);
|
||||
|
||||
cvf::Vec3d textPosition;
|
||||
|
||||
@ -473,10 +470,3 @@ RimWellPathCollection* RivWellPathPartMgr::wellPathCollection()
|
||||
return wellPathCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RivWellPathPartMgr::wellPathRadius(double characteristicCellSize, RimWellPathCollection* wellPathCollection)
|
||||
{
|
||||
return wellPathCollection->wellPathRadiusScaleFactor() * m_rimWellPath->wellPathRadiusScaleFactor() * characteristicCellSize;
|
||||
}
|
||||
|
@ -93,7 +93,6 @@ private:
|
||||
|
||||
void clearAllBranchData();
|
||||
inline RimWellPathCollection* wellPathCollection();
|
||||
inline double wellPathRadius(double characteristicCellSize, RimWellPathCollection* wellPathCollection);
|
||||
|
||||
private:
|
||||
caf::PdmPointer<RimWellPath> m_rimWellPath;
|
||||
|
@ -195,6 +195,23 @@ void RimWellPath::setSurveyType(QString surveyType)
|
||||
wellPathColor = cvf::Color3f(0.0f, 0.333f, 0.999f);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPath::wellPathRadius(double characteristicCellSize) const
|
||||
{
|
||||
double radius = characteristicCellSize * wellPathRadiusScaleFactor();
|
||||
|
||||
RimWellPathCollection* coll = nullptr;
|
||||
this->firstAncestorOrThisOfType(coll);
|
||||
if (coll)
|
||||
{
|
||||
radius *= coll->wellPathRadiusScaleFactor();
|
||||
}
|
||||
|
||||
return radius;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -100,6 +100,9 @@ public:
|
||||
|
||||
caf::PdmField<bool> showWellPath;
|
||||
caf::PdmField<cvf::Color3f> wellPathColor;
|
||||
|
||||
double wellPathRadius(double characteristicCellSize) const;
|
||||
|
||||
caf::PdmField<double> wellPathRadiusScaleFactor;
|
||||
|
||||
RimFishbonesCollection* fishbonesCollection();
|
||||
|
Loading…
Reference in New Issue
Block a user