mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
clang-format: Set column width to 140
* Set column width to 140 * Use c++20 * Remove redundant virtual
This commit is contained in:
@@ -19,12 +19,7 @@ CAF_PDM_SOURCE_INIT( RimFileWellPath, "WellPath" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFileWellPath::RimFileWellPath()
|
||||
{
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "File Well Path",
|
||||
":/Well.svg",
|
||||
"",
|
||||
"",
|
||||
"FileWellPath",
|
||||
"Well Paths Loaded From File" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "File Well Path", ":/Well.svg", "", "", "FileWellPath", "Well Paths Loaded From File" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &id, "WellPathId", "Id" );
|
||||
id.uiCapability()->setUiReadOnly( true );
|
||||
@@ -53,10 +48,7 @@ RimFileWellPath::RimFileWellPath()
|
||||
CAF_PDM_InitField( &m_wellPathIndexInFile, "WellPathNumberInFile", -1, "Well Number in File" );
|
||||
m_wellPathIndexInFile.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
CAF_PDM_InitField( &m_useAutoGeneratedPointAtSeaLevel,
|
||||
"UseAutoGeneratedPointAtSeaLevel",
|
||||
false,
|
||||
"Generate Point at Sea Level" );
|
||||
CAF_PDM_InitField( &m_useAutoGeneratedPointAtSeaLevel, "UseAutoGeneratedPointAtSeaLevel", false, "Generate Point at Sea Level" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -154,11 +146,9 @@ bool RimFileWellPath::readWellPathFile( QString* errorMessage, RifWellPathImport
|
||||
{
|
||||
if ( caf::Utils::fileExists( this->filePath() ) )
|
||||
{
|
||||
RifWellPathImporter::WellData wellData =
|
||||
wellPathImporter->readWellData( this->filePath(), m_wellPathIndexInFile() );
|
||||
RifWellPathImporter::WellData wellData = wellPathImporter->readWellData( this->filePath(), m_wellPathIndexInFile() );
|
||||
|
||||
RifWellPathImporter::WellMetaData wellMetaData =
|
||||
wellPathImporter->readWellMetaData( this->filePath(), m_wellPathIndexInFile() );
|
||||
RifWellPathImporter::WellMetaData wellMetaData = wellPathImporter->readWellMetaData( this->filePath(), m_wellPathIndexInFile() );
|
||||
// General well info
|
||||
|
||||
if ( setWellNameForExport )
|
||||
@@ -333,9 +323,7 @@ void RimFileWellPath::ensureWellPathStartAtSeaLevel( RigWellPath* wellPath )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFileWellPath::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimFileWellPath::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
RimWellPath::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
|
||||
|
||||
@@ -26,12 +26,12 @@ public:
|
||||
RimFileWellPath();
|
||||
~RimFileWellPath() override;
|
||||
|
||||
QString filePath() const;
|
||||
void setFilepath( const QString& path );
|
||||
bool readWellPathFile( QString* errorMessage, RifWellPathImporter* wellPathImporter, bool setWellNameForExport );
|
||||
int wellPathIndexInFile() const; // -1 means none.
|
||||
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath );
|
||||
void setWellPathIndexInFile( int index );
|
||||
QString filePath() const;
|
||||
void setFilepath( const QString& path );
|
||||
bool readWellPathFile( QString* errorMessage, RifWellPathImporter* wellPathImporter, bool setWellNameForExport );
|
||||
int wellPathIndexInFile() const; // -1 means none.
|
||||
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath );
|
||||
void setWellPathIndexInFile( int index );
|
||||
static QString getCacheDirectoryPath();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -46,15 +46,9 @@ CAF_PDM_SOURCE_INIT( RimModeledWellPath, "ModeledWellPath" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimModeledWellPath::RimModeledWellPath()
|
||||
{
|
||||
CAF_PDM_InitScriptableObject( "Modeled Well Path",
|
||||
":/EditableWell.png",
|
||||
"",
|
||||
"A Well Path created interactively in ResInsight" );
|
||||
CAF_PDM_InitScriptableObject( "Modeled Well Path", ":/EditableWell.png", "", "A Well Path created interactively in ResInsight" );
|
||||
|
||||
CAF_PDM_InitScriptableFieldWithScriptKeywordNoDefault( &m_geometryDefinition,
|
||||
"WellPathGeometryDef",
|
||||
"WellPathGeometry",
|
||||
"Trajectory" );
|
||||
CAF_PDM_InitScriptableFieldWithScriptKeywordNoDefault( &m_geometryDefinition, "WellPathGeometryDef", "WellPathGeometry", "Trajectory" );
|
||||
m_geometryDefinition = new RimWellPathGeometryDef;
|
||||
m_geometryDefinition->changed.connect( this, &RimModeledWellPath::onGeometryDefinitionChanged );
|
||||
|
||||
@@ -143,12 +137,11 @@ QString RimModeledWellPath::wellPlanText()
|
||||
formatter.setTableRowLineAppendText( "" );
|
||||
|
||||
std::vector<RifTextDataTableColumn> tableHeader;
|
||||
std::vector<QString> columns = { "MDRKB", "CL", "Inc", "Azi", "TVDMSL", "NS", "EW", "Dogleg", "Build", "Turn" };
|
||||
std::vector<QString> columns = { "MDRKB", "CL", "Inc", "Azi", "TVDMSL", "NS", "EW", "Dogleg", "Build", "Turn" };
|
||||
for ( QString column : columns )
|
||||
{
|
||||
tableHeader.push_back(
|
||||
RifTextDataTableColumn( column,
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_FLOAT, 2 ) ) );
|
||||
RifTextDataTableColumn( column, RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_FLOAT, 2 ) ) );
|
||||
}
|
||||
|
||||
formatter.header( tableHeader );
|
||||
@@ -207,9 +200,7 @@ void RimModeledWellPath::onGeometryDefinitionChanged( const caf::SignalEmitter*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimModeledWellPath::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimModeledWellPath::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
// TODO remove if nothing happens here
|
||||
|
||||
@@ -266,9 +257,8 @@ void RimModeledWellPath::updateTieInLocationFromParentWell()
|
||||
!parentWellPath->wellPathGeometry()->measuredDepths().empty() )
|
||||
{
|
||||
auto [pointVector, measuredDepths] =
|
||||
parentWellPath->wellPathGeometry()
|
||||
->clippedPointSubset( parentWellPath->wellPathGeometry()->measuredDepths().front(),
|
||||
tieIn->tieInMeasuredDepth() );
|
||||
parentWellPath->wellPathGeometry()->clippedPointSubset( parentWellPath->wellPathGeometry()->measuredDepths().front(),
|
||||
tieIn->tieInMeasuredDepth() );
|
||||
|
||||
if ( pointVector.size() >= 2u )
|
||||
{
|
||||
|
||||
@@ -39,14 +39,9 @@ public:
|
||||
RimWellIADataAccess( RimGeoMechCase* thecase );
|
||||
~RimWellIADataAccess();
|
||||
|
||||
int resultIndex( RigFemResultPosEnum resultType, cvf::Vec3d position );
|
||||
int elementIndex( cvf::Vec3d position );
|
||||
double resultValue( QString fieldName,
|
||||
QString componentName,
|
||||
RigFemResultPosEnum resultType,
|
||||
size_t resultIndex,
|
||||
int timeStep,
|
||||
int frameId );
|
||||
int resultIndex( RigFemResultPosEnum resultType, cvf::Vec3d position );
|
||||
int elementIndex( cvf::Vec3d position );
|
||||
double resultValue( QString fieldName, QString componentName, RigFemResultPosEnum resultType, size_t resultIndex, int timeStep, int frameId );
|
||||
double interpolatedResultValue( QString fieldname,
|
||||
QString componentName,
|
||||
RigFemResultPosEnum resultType,
|
||||
|
||||
@@ -83,8 +83,7 @@ bool RimWellIAModelBox::updateBox( cvf::Vec3d startPos, cvf::Vec3d endPos, doubl
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<cvf::Vec3d>
|
||||
RimWellIAModelBox::generateRectangle( cvf::Vec3d center, cvf::Vec3d unitX, cvf::Vec3d unitY, double buffer )
|
||||
std::vector<cvf::Vec3d> RimWellIAModelBox::generateRectangle( cvf::Vec3d center, cvf::Vec3d unitX, cvf::Vec3d unitY, double buffer )
|
||||
{
|
||||
std::vector<cvf::Vec3d> corners;
|
||||
corners.resize( 4 );
|
||||
|
||||
@@ -137,9 +137,7 @@ void RimWellIASettings::updateVisualization()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellIASettings::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimWellIASettings::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( ( changedField == &m_startMD ) || ( changedField == &m_endMD ) || ( changedField == objectToggleField() ) ||
|
||||
( changedField == &m_bufferXY ) || ( changedField == &m_showBox ) )
|
||||
@@ -206,9 +204,7 @@ void RimWellIASettings::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellIASettings::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RimWellIASettings::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_startMD || field == &m_endMD )
|
||||
{
|
||||
@@ -461,9 +457,8 @@ bool RimWellIASettings::updateResInsightParameters()
|
||||
RimParameterGroup* initialStress = new RimParameterGroup();
|
||||
initialStress->setName( "initial_stress" );
|
||||
initialStress->setLabel( "Initial Stress" );
|
||||
initialStress->setComment(
|
||||
"SXX is in North direction, SYY is East, SZZ is vertical; PP is the initial pore pressure in the "
|
||||
"formation, set to 0 for hydrostatic assumption; inclination is 0 for a vertical well" );
|
||||
initialStress->setComment( "SXX is in North direction, SYY is East, SZZ is vertical; PP is the initial pore pressure in the "
|
||||
"formation, set to 0 for hydrostatic assumption; inclination is 0 for a vertical well" );
|
||||
|
||||
cvf::Vec3d position = m_modelbox.center();
|
||||
RimWellIADataAccess dataAccess( m_geomechCase );
|
||||
@@ -472,8 +467,7 @@ bool RimWellIASettings::updateResInsightParameters()
|
||||
|
||||
for ( size_t i = 0; i < nativeKeys.size(); i++ )
|
||||
{
|
||||
double stressValue =
|
||||
dataAccess.interpolatedResultValue( "ST", nativeKeys[i], RigFemResultPosEnum::RIG_ELEMENT_NODAL, position, 0, 0 );
|
||||
double stressValue = dataAccess.interpolatedResultValue( "ST", nativeKeys[i], RigFemResultPosEnum::RIG_ELEMENT_NODAL, position, 0, 0 );
|
||||
if ( std::isfinite( stressValue ) )
|
||||
{
|
||||
initialStress->addParameter( paramKeys[i], stressValue * 100000.0 );
|
||||
@@ -494,8 +488,7 @@ bool RimWellIASettings::updateResInsightParameters()
|
||||
initialStress->addParameter( "PP", 0.0 );
|
||||
}
|
||||
|
||||
auto angles = RigWellPathGeometryTools::calculateAzimuthAndInclinationAtMd( ( m_startMD + m_endMD ) / 2.0,
|
||||
wellPath()->wellPathGeometry() );
|
||||
auto angles = RigWellPathGeometryTools::calculateAzimuthAndInclinationAtMd( ( m_startMD + m_endMD ) / 2.0, wellPath()->wellPathGeometry() );
|
||||
initialStress->addParameter( "azimuth_well", cvf::Math::toDegrees( angles.first ) );
|
||||
initialStress->addParameter( "inclination_well", cvf::Math::toDegrees( angles.second ) );
|
||||
|
||||
@@ -656,8 +649,7 @@ std::vector<QDateTime> RimWellIASettings::timeStepDates()
|
||||
{
|
||||
std::vector<QDateTime> dates = m_geomechCase->timeStepDates();
|
||||
|
||||
if ( dates.size() < (size_t)m_geomechCase->timeStepStrings().size() )
|
||||
dates.insert( dates.begin(), m_geostaticDate );
|
||||
if ( dates.size() < (size_t)m_geomechCase->timeStepStrings().size() ) dates.insert( dates.begin(), m_geostaticDate );
|
||||
|
||||
return dates;
|
||||
}
|
||||
@@ -674,12 +666,9 @@ std::vector<cvf::Vec3d> RimWellIASettings::extractDisplacements( std::vector<cvf
|
||||
for ( auto& pos : corners )
|
||||
{
|
||||
int lastFrame = -1;
|
||||
double u1 =
|
||||
dataAccess.interpolatedResultValue( "U", "U1", RigFemResultPosEnum::RIG_NODAL, pos, timeStep, lastFrame );
|
||||
double u2 =
|
||||
dataAccess.interpolatedResultValue( "U", "U2", RigFemResultPosEnum::RIG_NODAL, pos, timeStep, lastFrame );
|
||||
double u3 =
|
||||
dataAccess.interpolatedResultValue( "U", "U3", RigFemResultPosEnum::RIG_NODAL, pos, timeStep, lastFrame );
|
||||
double u1 = dataAccess.interpolatedResultValue( "U", "U1", RigFemResultPosEnum::RIG_NODAL, pos, timeStep, lastFrame );
|
||||
double u2 = dataAccess.interpolatedResultValue( "U", "U2", RigFemResultPosEnum::RIG_NODAL, pos, timeStep, lastFrame );
|
||||
double u3 = dataAccess.interpolatedResultValue( "U", "U3", RigFemResultPosEnum::RIG_NODAL, pos, timeStep, lastFrame );
|
||||
|
||||
displacements.push_back( cvf::Vec3d( u1, u2, u3 ) );
|
||||
}
|
||||
|
||||
@@ -94,9 +94,7 @@ protected:
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
|
||||
|
||||
@@ -41,14 +41,10 @@ public:
|
||||
bool isEnabled() const;
|
||||
bool hasSettings() const;
|
||||
|
||||
RimWellIASettings* startWellIntegrationAnalysis( QString baseDir,
|
||||
RimWellPath* wellPath,
|
||||
double measuredDepth,
|
||||
RimGeoMechCase* theCase,
|
||||
QString& outErrmsg );
|
||||
RimWellIASettings*
|
||||
startWellIntegrationAnalysis( QString baseDir, RimWellPath* wellPath, double measuredDepth, RimGeoMechCase* theCase, QString& outErrmsg );
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimWellIASettings*> m_wellIASettings;
|
||||
|
||||
@@ -936,8 +936,7 @@ void RimWellPath::setFormationsGeometry( cvf::ref<RigWellPathFormations> wellPat
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPath::readWellPathFormationsFile( QString* errorMessage,
|
||||
RifWellPathFormationsImporter* wellPathFormationsImporter )
|
||||
bool RimWellPath::readWellPathFormationsFile( QString* errorMessage, RifWellPathFormationsImporter* wellPathFormationsImporter )
|
||||
{
|
||||
if ( m_wellPathFormationFilePath().path().isEmpty() )
|
||||
{
|
||||
@@ -946,8 +945,8 @@ bool RimWellPath::readWellPathFormationsFile( QString* err
|
||||
|
||||
if ( caf::Utils::fileExists( m_wellPathFormationFilePath().path() ) )
|
||||
{
|
||||
m_wellPathFormations = wellPathFormationsImporter->readWellPathFormations( m_wellPathFormationFilePath().path(),
|
||||
m_formationKeyInFile() );
|
||||
m_wellPathFormations =
|
||||
wellPathFormationsImporter->readWellPathFormations( m_wellPathFormationFilePath().path(), m_formationKeyInFile() );
|
||||
if ( m_name().isEmpty() )
|
||||
{
|
||||
setName( m_formationKeyInFile() );
|
||||
@@ -956,8 +955,7 @@ bool RimWellPath::readWellPathFormationsFile( QString* err
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( errorMessage )
|
||||
( *errorMessage ) = "Could not find the well pick file: " + m_wellPathFormationFilePath().path();
|
||||
if ( errorMessage ) ( *errorMessage ) = "Could not find the well pick file: " + m_wellPathFormationFilePath().path();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -965,8 +963,7 @@ bool RimWellPath::readWellPathFormationsFile( QString* err
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPath::reloadWellPathFormationsFile( QString* errorMessage,
|
||||
RifWellPathFormationsImporter* wellPathFormationsImporter )
|
||||
bool RimWellPath::reloadWellPathFormationsFile( QString* errorMessage, RifWellPathFormationsImporter* wellPathFormationsImporter )
|
||||
{
|
||||
if ( m_wellPathFormationFilePath().path().isEmpty() )
|
||||
{
|
||||
@@ -975,14 +972,13 @@ bool RimWellPath::reloadWellPathFormationsFile( QString* e
|
||||
|
||||
if ( caf::Utils::fileExists( m_wellPathFormationFilePath().path() ) )
|
||||
{
|
||||
m_wellPathFormations = wellPathFormationsImporter->reloadWellPathFormations( m_wellPathFormationFilePath().path(),
|
||||
m_formationKeyInFile() );
|
||||
m_wellPathFormations =
|
||||
wellPathFormationsImporter->reloadWellPathFormations( m_wellPathFormationFilePath().path(), m_formationKeyInFile() );
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( errorMessage )
|
||||
( *errorMessage ) = "Could not find the well pick file: " + m_wellPathFormationFilePath().path();
|
||||
if ( errorMessage ) ( *errorMessage ) = "Could not find the well pick file: " + m_wellPathFormationFilePath().path();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1085,8 +1081,7 @@ bool RimWellPath::isAssociatedWithSimulationWell() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPath::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
void RimWellPath::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
RimProject::current()->reloadCompletionTypeResultsInAllViews();
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
void setFormationsGeometry( cvf::ref<RigWellPathFormations> wellPathFormations );
|
||||
bool readWellPathFormationsFile( QString* errorMessage, RifWellPathFormationsImporter* wellPathFormationsImporter );
|
||||
bool reloadWellPathFormationsFile( QString* errorMessage, RifWellPathFormationsImporter* wellPathFormationsImporter );
|
||||
bool hasFormations() const;
|
||||
bool hasFormations() const;
|
||||
const RigWellPathFormations* formationsGeometry() const;
|
||||
|
||||
void add3dWellLogCurve( Rim3dWellLogCurve* rim3dWellLogCurve );
|
||||
@@ -155,8 +155,7 @@ public:
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
void applyOffset( double offsetMD ) override;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
bool isTopLevelWellPath() const;
|
||||
bool isMultiLateralWellPath() const;
|
||||
@@ -175,12 +174,12 @@ protected:
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
bool isDeletable() const override;
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
void initAfterRead() override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName ) override;
|
||||
void defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName ) override;
|
||||
void defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
static void copyCompletionSettings( RimWellPath* from, RimWellPath* to );
|
||||
|
||||
|
||||
@@ -254,9 +254,7 @@ QString RimWellPathAttribute::generateInchesLabel( double diameter )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathAttribute::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimWellPathAttribute::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_type )
|
||||
{
|
||||
|
||||
@@ -62,8 +62,8 @@ private:
|
||||
bool isDiameterSupported() const;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
static QString generateInchesLabel( double diameter );
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
private:
|
||||
caf::PdmField<CompletionTypeEnum> m_type;
|
||||
|
||||
@@ -114,9 +114,7 @@ void RimWellPathAttributeCollection::deleteAllAttributes()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathAttributeCollection::defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu,
|
||||
QMenu* menu,
|
||||
QWidget* fieldEditorWidget )
|
||||
void RimWellPathAttributeCollection::defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget )
|
||||
{
|
||||
caf::CmdFeatureMenuBuilder menuBuilder;
|
||||
|
||||
@@ -157,8 +155,7 @@ void RimWellPathAttributeCollection::defineUiOrdering( QString uiConfigName, caf
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathAttributeCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||
QString uiConfigName /*= ""*/ )
|
||||
void RimWellPathAttributeCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
||||
{
|
||||
uiTreeOrdering.skipRemainingChildren( true );
|
||||
}
|
||||
@@ -166,9 +163,7 @@ void RimWellPathAttributeCollection::defineUiTreeOrdering( caf::PdmUiTreeOrderin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathAttributeCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimWellPathAttributeCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == this->objectToggleField() )
|
||||
{
|
||||
|
||||
@@ -37,15 +37,13 @@ public:
|
||||
|
||||
void updateAllReferringTracks();
|
||||
std::vector<RimWellPathAttribute*> attributes() const;
|
||||
void insertAttribute( RimWellPathAttribute* insertBefore, RimWellPathAttribute* attribute );
|
||||
void deleteAttribute( RimWellPathAttribute* attributeToDelete );
|
||||
void deleteAllAttributes();
|
||||
void insertAttribute( RimWellPathAttribute* insertBefore, RimWellPathAttribute* attribute );
|
||||
void deleteAttribute( RimWellPathAttribute* attributeToDelete );
|
||||
void deleteAllAttributes();
|
||||
|
||||
protected:
|
||||
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
@@ -86,12 +86,7 @@ CAF_PDM_SOURCE_INIT( RimWellPathCollection, "WellPaths" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathCollection::RimWellPathCollection()
|
||||
{
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Wells",
|
||||
":/WellCollection.png",
|
||||
"",
|
||||
"",
|
||||
"WellPathCollection",
|
||||
"Collection of Well Paths" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Wells", ":/WellCollection.png", "", "", "WellPathCollection", "Collection of Well Paths" );
|
||||
|
||||
CAF_PDM_InitField( &isActive, "Active", true, "Active" );
|
||||
isActive.uiCapability()->setUiHidden( true );
|
||||
@@ -101,10 +96,7 @@ RimWellPathCollection::RimWellPathCollection()
|
||||
cvf::Color3f defWellLabelColor = RiaPreferences::current()->defaultWellLabelColor();
|
||||
CAF_PDM_InitField( &wellPathLabelColor, "WellPathLabelColor", defWellLabelColor, "Well label color" );
|
||||
|
||||
CAF_PDM_InitField( &wellPathVisibility,
|
||||
"GlobalWellPathVisibility",
|
||||
WellVisibilityEnum( ALL_ON ),
|
||||
"Global Well Path Visibility" );
|
||||
CAF_PDM_InitField( &wellPathVisibility, "GlobalWellPathVisibility", WellVisibilityEnum( ALL_ON ), "Global Well Path Visibility" );
|
||||
|
||||
CAF_PDM_InitField( &wellPathRadiusScaleFactor, "WellPathRadiusScale", 0.1, "Well Path Radius Scale" );
|
||||
CAF_PDM_InitField( &wellPathCrossSectionVertexCount, "WellPathVertexCount", 12, "Well Path Vertex Count" );
|
||||
@@ -139,9 +131,7 @@ RimWellPathCollection::~RimWellPathCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimWellPathCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
scheduleRedrawAffectedViews();
|
||||
}
|
||||
@@ -211,8 +201,7 @@ void RimWellPathCollection::loadDataAndUpdate()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellPath*>
|
||||
RimWellPathCollection::addWellPaths( QStringList filePaths, bool importGrouped, QStringList* errorMessages )
|
||||
std::vector<RimWellPath*> RimWellPathCollection::addWellPaths( QStringList filePaths, bool importGrouped, QStringList* errorMessages )
|
||||
{
|
||||
CAF_ASSERT( errorMessages );
|
||||
|
||||
@@ -608,8 +597,7 @@ void RimWellPathCollection::groupWellPaths( const std::vector<RimWellPath*>& wel
|
||||
|
||||
if ( wellPath->name() < existingWellPath->name() ) continue;
|
||||
|
||||
double identicalTubeLength =
|
||||
existingWellPath->wellPathGeometry()->identicalTubeLength( *wellPathGeometry );
|
||||
double identicalTubeLength = existingWellPath->wellPathGeometry()->identicalTubeLength( *wellPathGeometry );
|
||||
if ( identicalTubeLength > eps )
|
||||
{
|
||||
wellPathsWithCommonGeometry[existingWellPath] = identicalTubeLength;
|
||||
@@ -620,8 +608,7 @@ void RimWellPathCollection::groupWellPaths( const std::vector<RimWellPath*>& wel
|
||||
double longestIdenticalTubeLength = 0.0;
|
||||
for ( auto [existingWellPath, identicalTubeLength] : wellPathsWithCommonGeometry )
|
||||
{
|
||||
if ( existingWellPath && ( existingWellPath != wellPath ) &&
|
||||
identicalTubeLength > longestIdenticalTubeLength )
|
||||
if ( existingWellPath && ( existingWellPath != wellPath ) && identicalTubeLength > longestIdenticalTubeLength )
|
||||
{
|
||||
mostSimilarWellPath = existingWellPath;
|
||||
longestIdenticalTubeLength = identicalTubeLength;
|
||||
@@ -923,9 +910,7 @@ std::map<QString, std::vector<RimWellPath*>>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::buildUiTreeOrdering( cafTreeNode* treeNode,
|
||||
caf::PdmUiTreeOrdering* parentUiTreeNode,
|
||||
const QString& uiConfigName )
|
||||
void RimWellPathCollection::buildUiTreeOrdering( cafTreeNode* treeNode, caf::PdmUiTreeOrdering* parentUiTreeNode, const QString& uiConfigName )
|
||||
{
|
||||
CAF_ASSERT( treeNode );
|
||||
CAF_ASSERT( parentUiTreeNode );
|
||||
@@ -986,8 +971,7 @@ const RimWellMeasurementCollection* RimWellPathCollection::measurementCollection
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
void RimWellPathCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
rebuildWellPathNodes();
|
||||
|
||||
|
||||
@@ -126,8 +126,7 @@ public:
|
||||
RimWellMeasurementCollection* measurementCollection();
|
||||
const RimWellMeasurementCollection* measurementCollection() const;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
void onChildAdded( caf::PdmFieldHandle* containerForNewObject ) override;
|
||||
|
||||
@@ -149,12 +148,9 @@ private:
|
||||
|
||||
std::vector<RimWellPath*> wellPathsWithNoParent( const std::vector<RimWellPath*>& sourceWellPaths ) const;
|
||||
|
||||
std::map<QString, std::vector<RimWellPath*>>
|
||||
wellPathsForWellNameStem( const std::vector<RimWellPath*>& sourceWellPaths ) const;
|
||||
std::map<QString, std::vector<RimWellPath*>> wellPathsForWellNameStem( const std::vector<RimWellPath*>& sourceWellPaths ) const;
|
||||
|
||||
static void buildUiTreeOrdering( cafTreeNode* treeNode,
|
||||
caf::PdmUiTreeOrdering* parentUiTreeNode,
|
||||
const QString& uiConfigName );
|
||||
static void buildUiTreeOrdering( cafTreeNode* treeNode, caf::PdmUiTreeOrdering* parentUiTreeNode, const QString& uiConfigName );
|
||||
|
||||
static QString unGroupedText();
|
||||
|
||||
|
||||
@@ -83,15 +83,9 @@ RimWellPathGeometryDef::RimWellPathGeometryDef()
|
||||
m_wellTargets.uiCapability()->setCustomContextMenuEnabled( true );
|
||||
|
||||
CAF_PDM_InitField( &m_showAbsolutePosForWellTargets, "ShowAbsolutePosForWellTargets", false, "Show UTM Coords" );
|
||||
CAF_PDM_InitField( &m_useTopLevelWellReferencePoint,
|
||||
"UseTopLevelWellReferencePoint",
|
||||
false,
|
||||
"Use Top Level Well Reference Point" );
|
||||
CAF_PDM_InitField( &m_useTopLevelWellReferencePoint, "UseTopLevelWellReferencePoint", false, "Use Top Level Well Reference Point" );
|
||||
|
||||
CAF_PDM_InitScriptableField( &m_useAutoGeneratedTargetAtSeaLevel,
|
||||
"UseAutoGeneratedTargetAtSeaLevel",
|
||||
true,
|
||||
"Generate Target at Sea Level" );
|
||||
CAF_PDM_InitScriptableField( &m_useAutoGeneratedTargetAtSeaLevel, "UseAutoGeneratedTargetAtSeaLevel", true, "Generate Target at Sea Level" );
|
||||
|
||||
CAF_PDM_InitScriptableField( &m_linkReferencePointUpdates, "LinkReferencePointUpdates", false, "Link Reference Point" );
|
||||
|
||||
@@ -272,17 +266,15 @@ cvf::ref<RigWellPath> RimWellPathGeometryDef::createWellPathGeometry()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<RigWellPath> RimWellPathGeometryDef::createWellPathGeometry( bool useAutoGeneratedTargetAtSeaLevel,
|
||||
double offsetMd,
|
||||
bool updateTargets ) const
|
||||
cvf::ref<RigWellPath>
|
||||
RimWellPathGeometryDef::createWellPathGeometry( bool useAutoGeneratedTargetAtSeaLevel, double offsetMd, bool updateTargets ) const
|
||||
{
|
||||
cvf::ref<RigWellPath> wellPathGeometry = new RigWellPath;
|
||||
|
||||
std::vector<cvf::Vec3d> wellPathPoints = m_fixedWellPathPoints;
|
||||
std::vector<double> measuredDepths = m_fixedMeasuredDepths;
|
||||
|
||||
RiaLineArcWellPathCalculator wellPathCalculator =
|
||||
lineArcWellPathCalculator( useAutoGeneratedTargetAtSeaLevel, updateTargets );
|
||||
RiaLineArcWellPathCalculator wellPathCalculator = lineArcWellPathCalculator( useAutoGeneratedTargetAtSeaLevel, updateTargets );
|
||||
|
||||
if ( wellPathCalculator.lineArcEndpoints().size() >= 2 )
|
||||
{
|
||||
@@ -317,8 +309,7 @@ cvf::ref<RigWellPath> RimWellPathGeometryDef::createWellPathGeometry( bool use
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RiaWellPlanCalculator::WellPlanSegment> RimWellPathGeometryDef::wellPlan() const
|
||||
{
|
||||
RiaLineArcWellPathCalculator wellPathCalculator =
|
||||
lineArcWellPathCalculator( m_useAutoGeneratedTargetAtSeaLevel, false );
|
||||
RiaLineArcWellPathCalculator wellPathCalculator = lineArcWellPathCalculator( m_useAutoGeneratedTargetAtSeaLevel, false );
|
||||
|
||||
RiaWellPlanCalculator wpCalc( wellPathCalculator.startTangent(), wellPathCalculator.lineArcEndpoints() );
|
||||
|
||||
@@ -501,9 +492,7 @@ QList<caf::PdmOptionItemInfo> RimWellPathGeometryDef::calculateValueOptions( con
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathGeometryDef::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimWellPathGeometryDef::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_pickPointsEnabled )
|
||||
{
|
||||
@@ -516,9 +505,7 @@ void RimWellPathGeometryDef::fieldChangedByUi( const caf::PdmFieldHandle* change
|
||||
auto linkedDefs = RimWellPathGeometryDefTools::linkedDefinitions();
|
||||
|
||||
// Remove this to avoid duplicate updates
|
||||
linkedDefs.erase( std::remove_if( linkedDefs.begin(),
|
||||
linkedDefs.end(),
|
||||
[this]( auto const& geoDef ) { return geoDef == this; } ),
|
||||
linkedDefs.erase( std::remove_if( linkedDefs.begin(), linkedDefs.end(), [this]( auto const& geoDef ) { return geoDef == this; } ),
|
||||
linkedDefs.end() );
|
||||
|
||||
cvf::Vec3d oldPos;
|
||||
@@ -633,8 +620,7 @@ std::vector<RimWellPathTarget*> RimWellPathGeometryDef::activeWellTargets( bool
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaLineArcWellPathCalculator RimWellPathGeometryDef::lineArcWellPathCalculator( bool useAutoGeneratedTargetAtSeaLevel,
|
||||
bool updateTargets ) const
|
||||
RiaLineArcWellPathCalculator RimWellPathGeometryDef::lineArcWellPathCalculator( bool useAutoGeneratedTargetAtSeaLevel, bool updateTargets ) const
|
||||
{
|
||||
std::vector<RimWellPathTarget*> activeTargets;
|
||||
|
||||
@@ -661,16 +647,14 @@ RiaLineArcWellPathCalculator RimWellPathGeometryDef::lineArcWellPathCalculator(
|
||||
targetDatas.push_back( wellTarget->wellTargetData() );
|
||||
}
|
||||
|
||||
RiaLineArcWellPathCalculator wellPathCalculator( anchorPointXyz(), targetDatas );
|
||||
const std::vector<RiaLineArcWellPathCalculator::WellTargetStatus>& targetStatuses =
|
||||
wellPathCalculator.targetStatuses();
|
||||
RiaLineArcWellPathCalculator wellPathCalculator( anchorPointXyz(), targetDatas );
|
||||
const std::vector<RiaLineArcWellPathCalculator::WellTargetStatus>& targetStatuses = wellPathCalculator.targetStatuses();
|
||||
|
||||
if ( updateTargets )
|
||||
{
|
||||
for ( size_t tIdx = 0; tIdx < activeTargets.size(); ++tIdx )
|
||||
{
|
||||
activeTargets[tIdx]->setDerivedTangent( targetStatuses[tIdx].resultAzimuthRadians,
|
||||
targetStatuses[tIdx].resultInclinationRadians );
|
||||
activeTargets[tIdx]->setDerivedTangent( targetStatuses[tIdx].resultAzimuthRadians, targetStatuses[tIdx].resultInclinationRadians );
|
||||
|
||||
activeTargets[tIdx]->setRadius1Data( targetStatuses[tIdx].isRadius1Editable,
|
||||
targetStatuses[tIdx].hasOverriddenRadius1,
|
||||
@@ -724,9 +708,7 @@ void RimWellPathGeometryDef::updateTargetAtSeaLevel()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathGeometryDef::defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu,
|
||||
QMenu* menu,
|
||||
QWidget* fieldEditorWidget )
|
||||
void RimWellPathGeometryDef::defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget )
|
||||
{
|
||||
caf::CmdFeatureMenuBuilder menuBuilder;
|
||||
|
||||
@@ -740,9 +722,7 @@ void RimWellPathGeometryDef::defineCustomContextMenu( const caf::PdmFieldHandle*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathGeometryDef::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RimWellPathGeometryDef::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_pickPointsEnabled )
|
||||
{
|
||||
|
||||
@@ -68,14 +68,13 @@ public:
|
||||
|
||||
std::vector<RimWellPathTarget*> createTargets( const std::vector<cvf::Vec3d>& points );
|
||||
|
||||
std::pair<RimWellPathTarget*, RimWellPathTarget*>
|
||||
findActiveTargetsAroundInsertionPoint( const RimWellPathTarget* targetToInsertBefore );
|
||||
std::pair<RimWellPathTarget*, RimWellPathTarget*> findActiveTargetsAroundInsertionPoint( const RimWellPathTarget* targetToInsertBefore );
|
||||
|
||||
cvf::ref<RigWellPath> createWellPathGeometry();
|
||||
void insertTarget( const RimWellPathTarget* targetToInsertBefore, RimWellPathTarget* targetToInsert );
|
||||
void deleteTarget( RimWellPathTarget* targetTodelete );
|
||||
void deleteAllTargets();
|
||||
RimWellPathTarget* appendTarget();
|
||||
void insertTarget( const RimWellPathTarget* targetToInsertBefore, RimWellPathTarget* targetToInsert );
|
||||
void deleteTarget( RimWellPathTarget* targetTodelete );
|
||||
void deleteAllTargets();
|
||||
RimWellPathTarget* appendTarget();
|
||||
|
||||
const RimWellPathTarget* firstActiveTarget() const;
|
||||
const RimWellPathTarget* lastActiveTarget() const;
|
||||
@@ -96,16 +95,13 @@ public:
|
||||
|
||||
protected:
|
||||
std::vector<RimWellPathTarget*> activeWellTargets( bool useAutoGeneratedTargetAtSeaLevel ) const;
|
||||
cvf::ref<RigWellPath>
|
||||
createWellPathGeometry( bool useAutoGeneratedTargetAtSeaLevel, double offsetMd, bool updateTargets ) const;
|
||||
cvf::ref<RigWellPath> createWellPathGeometry( bool useAutoGeneratedTargetAtSeaLevel, double offsetMd, bool updateTargets ) const;
|
||||
|
||||
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget ) override;
|
||||
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
void defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
void onTargetMoved( const caf::SignalEmitter* emitter, bool fullUpdate );
|
||||
@@ -117,8 +113,7 @@ private:
|
||||
void initAfterRead() override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
|
||||
RiaLineArcWellPathCalculator lineArcWellPathCalculator( bool useAutoGeneratedTargetAtSeaLevel,
|
||||
bool updateTargets = true ) const;
|
||||
RiaLineArcWellPathCalculator lineArcWellPathCalculator( bool useAutoGeneratedTargetAtSeaLevel, bool updateTargets = true ) const;
|
||||
|
||||
void updateTargetAtSeaLevel();
|
||||
|
||||
|
||||
@@ -27,8 +27,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathGeometryDefTools::updateLinkedGeometryDefinitions( std::vector<RimWellPathGeometryDef*>& definitions,
|
||||
const cvf::Vec3d& delta )
|
||||
void RimWellPathGeometryDefTools::updateLinkedGeometryDefinitions( std::vector<RimWellPathGeometryDef*>& definitions, const cvf::Vec3d& delta )
|
||||
{
|
||||
for ( auto wellPathGeoDef : definitions )
|
||||
{
|
||||
|
||||
@@ -26,8 +26,7 @@ class RimWellPathGeometryDef;
|
||||
class RimWellPathGeometryDefTools
|
||||
{
|
||||
public:
|
||||
static void updateLinkedGeometryDefinitions( std::vector<RimWellPathGeometryDef*>& definitions,
|
||||
const cvf::Vec3d& delta );
|
||||
static void updateLinkedGeometryDefinitions( std::vector<RimWellPathGeometryDef*>& definitions, const cvf::Vec3d& delta );
|
||||
|
||||
static std::vector<RimWellPathGeometryDef*> linkedDefinitions();
|
||||
};
|
||||
|
||||
@@ -275,8 +275,7 @@ QString RimWellPathGroup::createGroupName() const
|
||||
{
|
||||
if ( wellPath )
|
||||
{
|
||||
bool groupOrLateral = dynamic_cast<RimWellPathGroup*>( wellPath ) ||
|
||||
dynamic_cast<RimModeledWellPath*>( wellPath );
|
||||
bool groupOrLateral = dynamic_cast<RimWellPathGroup*>( wellPath ) || dynamic_cast<RimModeledWellPath*>( wellPath );
|
||||
if ( !groupOrLateral )
|
||||
{
|
||||
allNames.push_back( wellPath->name() );
|
||||
@@ -420,8 +419,7 @@ void RimWellPathGroup::makeMoreLevelsIfNecessary()
|
||||
{
|
||||
m_childWellPaths().removeChild( wellPath );
|
||||
newGroup->addChildWellPath( wellPath );
|
||||
newGroup->wellPathGeometry()->setUniqueStartAndEndIndex( childStartIndex,
|
||||
std::numeric_limits<size_t>::max() );
|
||||
newGroup->wellPathGeometry()->setUniqueStartAndEndIndex( childStartIndex, std::numeric_limits<size_t>::max() );
|
||||
}
|
||||
m_childWellPaths().push_back( newGroup );
|
||||
}
|
||||
|
||||
@@ -54,12 +54,7 @@ RimWellPathTarget::RimWellPathTarget()
|
||||
: moved( this )
|
||||
, m_isFullUpdateEnabled( true )
|
||||
{
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Well Target",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"WellPathTarget",
|
||||
"Class containing the Well Target definition" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Well Target", "", "", "", "WellPathTarget", "Class containing the Well Target definition" );
|
||||
|
||||
CAF_PDM_InitField( &m_isEnabled, "IsEnabled", true, "" );
|
||||
|
||||
@@ -424,9 +419,7 @@ void RimWellPathTarget::initAfterRead()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathTarget::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RimWellPathTarget::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_targetPointXYD )
|
||||
{
|
||||
@@ -524,9 +517,7 @@ RimWellPathGeometryDef* RimWellPathTarget::geometryDefinition() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathTarget::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimWellPathTarget::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
moved.send( m_isFullUpdateEnabled );
|
||||
}
|
||||
|
||||
@@ -78,9 +78,7 @@ public:
|
||||
private:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void initAfterRead() override;
|
||||
|
||||
cvf::Vec3d targetPointForDisplayXYD() const;
|
||||
|
||||
@@ -121,8 +121,8 @@ void RimWellPathTieIn::updateFirstTargetFromParentWell()
|
||||
parentWellPath->wellPathGeometry()->measuredDepths().size() > 2 )
|
||||
{
|
||||
auto [pointVector, measuredDepths] =
|
||||
parentWellPath->wellPathGeometry()
|
||||
->clippedPointSubset( parentWellPath->wellPathGeometry()->measuredDepths().front(), m_tieInMeasuredDepth );
|
||||
parentWellPath->wellPathGeometry()->clippedPointSubset( parentWellPath->wellPathGeometry()->measuredDepths().front(),
|
||||
m_tieInMeasuredDepth );
|
||||
if ( pointVector.size() < 2u ) return;
|
||||
|
||||
RimWellPathTarget* newTarget = nullptr;
|
||||
@@ -143,8 +143,7 @@ void RimWellPathTieIn::updateFirstTargetFromParentWell()
|
||||
cvf::Vec3d referencePointXYZ = modeledWellPath->geometryDefinition()->anchorPointXyz();
|
||||
cvf::Vec3d relativePointXYZ = lastPointXYZ - referencePointXYZ;
|
||||
|
||||
newTarget->setAsPointXYZAndTangentTarget( { relativePointXYZ[0], relativePointXYZ[1], relativePointXYZ[2] },
|
||||
tangent );
|
||||
newTarget->setAsPointXYZAndTangentTarget( { relativePointXYZ[0], relativePointXYZ[1], relativePointXYZ[2] }, tangent );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,9 +185,7 @@ void RimWellPathTieIn::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathTieIn::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimWellPathTieIn::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_parentWell )
|
||||
{
|
||||
@@ -231,9 +228,7 @@ QList<caf::PdmOptionItemInfo> RimWellPathTieIn::calculateValueOptions( const caf
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathTieIn::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RimWellPathTieIn::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_tieInMeasuredDepth )
|
||||
{
|
||||
|
||||
@@ -52,9 +52,7 @@ private:
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
private:
|
||||
caf::PdmPtrField<RimWellPath*> m_parentWell;
|
||||
|
||||
Reference in New Issue
Block a user