mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5477 Add independent scaling factor field to well measurements
This commit is contained in:
parent
e1c4f98059
commit
646a102eff
@ -304,6 +304,10 @@ void RivWellPathPartMgr::appendWellMeasurementsToModel( cvf::ModelBasicList*
|
||||
double startMD = wellMeasurement->MD() - wellPathRadius * 0.5;
|
||||
double endMD = wellMeasurement->MD() + wellPathRadius * 0.5;
|
||||
|
||||
double wellMeasurementRadius = this->wellMeasurementRadius( characteristicCellSize,
|
||||
this->wellPathCollection(),
|
||||
wellMeasurementInView );
|
||||
|
||||
std::vector<cvf::Vec3d> displayCoords;
|
||||
displayCoords.push_back( displayCoordTransform->transformToDisplayCoord(
|
||||
m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath( startMD ) ) );
|
||||
@ -315,10 +319,10 @@ void RivWellPathPartMgr::appendWellMeasurementsToModel( cvf::ModelBasicList*
|
||||
m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath( endMD ) ) );
|
||||
|
||||
std::vector<double> radii;
|
||||
radii.push_back( wellPathRadius );
|
||||
radii.push_back( wellPathRadius * 2.5 );
|
||||
radii.push_back( wellPathRadius * 2.5 );
|
||||
radii.push_back( wellPathRadius );
|
||||
radii.push_back( std::min( wellPathRadius, wellMeasurementRadius ) );
|
||||
radii.push_back( wellMeasurementRadius );
|
||||
radii.push_back( wellMeasurementRadius );
|
||||
radii.push_back( std::min( wellPathRadius, wellMeasurementRadius ) );
|
||||
|
||||
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo( wellMeasurement );
|
||||
|
||||
@ -935,3 +939,14 @@ double RivWellPathPartMgr::wellPathRadius( double characteristicCellSize, RimWel
|
||||
return wellPathCollection->wellPathRadiusScaleFactor() * m_rimWellPath->wellPathRadiusScaleFactor() *
|
||||
characteristicCellSize;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RivWellPathPartMgr::wellMeasurementRadius( double characteristicCellSize,
|
||||
const RimWellPathCollection* wellPathCollection,
|
||||
const RimWellMeasurementInView* wellMeasurementInView )
|
||||
{
|
||||
return wellPathCollection->wellPathRadiusScaleFactor() * wellMeasurementInView->radiusScaleFactor() *
|
||||
characteristicCellSize;
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ class RimWellPathCollection;
|
||||
class Rim3dView;
|
||||
class Riv3dWellLogPlanePartMgr;
|
||||
class RivWellConnectionFactorPartMgr;
|
||||
class RimWellMeasurementInView;
|
||||
|
||||
class QDateTime;
|
||||
|
||||
@ -126,6 +127,9 @@ private:
|
||||
void clearAllBranchData();
|
||||
inline RimWellPathCollection* wellPathCollection() const;
|
||||
inline double wellPathRadius( double characteristicCellSize, RimWellPathCollection* wellPathCollection );
|
||||
double wellMeasurementRadius( double characteristicCellSize,
|
||||
const RimWellPathCollection* wellPathCollection,
|
||||
const RimWellMeasurementInView* wellMeasurementInView );
|
||||
|
||||
bool isWellPathWithinBoundingBox( const cvf::BoundingBox& wellPathClipBoundingBox ) const;
|
||||
|
||||
|
@ -33,6 +33,7 @@
|
||||
|
||||
#include "cafCmdFeatureMenuBuilder.h"
|
||||
#include "cafPdmUiDoubleSliderEditor.h"
|
||||
#include "cafPdmUiDoubleValueEditor.h"
|
||||
#include "cafPdmUiTableViewEditor.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
#include "cafPdmUiTreeSelectionEditor.h"
|
||||
@ -85,6 +86,9 @@ RimWellMeasurementInView::RimWellMeasurementInView()
|
||||
m_qualityFilter.uiCapability()->setAutoAddingOptionFromValue( false );
|
||||
m_qualityFilter.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() );
|
||||
|
||||
CAF_PDM_InitField( &m_radiusScaleFactor, "RadiusScaleFactor", 2.5, "Radius Scale", "", "", "" );
|
||||
m_radiusScaleFactor.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleValueEditor::uiEditorTypeName() );
|
||||
|
||||
this->setName( "Well Measurement" );
|
||||
|
||||
m_minimumResultValue = cvf::UNDEFINED_DOUBLE;
|
||||
@ -126,6 +130,8 @@ void RimWellMeasurementInView::defineUiOrdering( QString uiConfigName, caf::PdmU
|
||||
|
||||
uiOrdering.add( &m_qualityFilter );
|
||||
|
||||
uiOrdering.add( &m_radiusScaleFactor );
|
||||
|
||||
uiOrdering.skipRemainingFields();
|
||||
}
|
||||
|
||||
@ -144,13 +150,22 @@ void RimWellMeasurementInView::defineEditorAttribute( const caf::PdmFieldHandle*
|
||||
if ( field == &m_lowerBound || field == &m_upperBound )
|
||||
{
|
||||
caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>( attribute );
|
||||
if ( !myAttr )
|
||||
if ( myAttr )
|
||||
{
|
||||
return;
|
||||
myAttr->m_minimum = m_minimumResultValue;
|
||||
myAttr->m_maximum = m_maximumResultValue;
|
||||
}
|
||||
}
|
||||
|
||||
myAttr->m_minimum = m_minimumResultValue;
|
||||
myAttr->m_maximum = m_maximumResultValue;
|
||||
if ( field == &m_radiusScaleFactor )
|
||||
{
|
||||
caf::PdmUiDoubleValueEditorAttribute* uiDoubleValueEditorAttr =
|
||||
dynamic_cast<caf::PdmUiDoubleValueEditorAttribute*>( attribute );
|
||||
if ( uiDoubleValueEditorAttr )
|
||||
{
|
||||
uiDoubleValueEditorAttr->m_decimals = 2;
|
||||
uiDoubleValueEditorAttr->m_validator = new QDoubleValidator( 0.001, 100.0, 2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -503,3 +518,11 @@ std::set<QString> RimWellMeasurementInView::getAvailableWells() const
|
||||
std::set<QString> s( v.begin(), v.end() );
|
||||
return s;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellMeasurementInView::radiusScaleFactor() const
|
||||
{
|
||||
return m_radiusScaleFactor;
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ public:
|
||||
|
||||
void rangeValues( double* lowerBound, double* upperBound ) const;
|
||||
std::vector<int> qualityFilter() const;
|
||||
double radiusScaleFactor() const;
|
||||
|
||||
protected:
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
@ -88,6 +89,7 @@ private:
|
||||
caf::PdmField<std::vector<int>> m_qualityFilter;
|
||||
caf::PdmField<QString> m_wellsSerialized;
|
||||
caf::PdmField<QString> m_availableWellsSerialized;
|
||||
caf::PdmField<double> m_radiusScaleFactor;
|
||||
|
||||
void selectNewWells( const std::set<QString>& wells );
|
||||
void setAvailableWells( const std::set<QString>& wells );
|
||||
|
Loading…
Reference in New Issue
Block a user