mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Modeled Well : Several view update issues (#7463)
This commit is contained in:
parent
6f3640ff78
commit
c1f7f0f66f
@ -86,7 +86,16 @@ void RicNewWellPathLateralAtDepthFeature::onActionTriggered( bool isChecked )
|
|||||||
newModeledWellPath->geometryDefinition()->setFixedWellPathPoints( pointVector );
|
newModeledWellPath->geometryDefinition()->setFixedWellPathPoints( pointVector );
|
||||||
newModeledWellPath->geometryDefinition()->setFixedMeasuredDepths( measuredDepths );
|
newModeledWellPath->geometryDefinition()->setFixedMeasuredDepths( measuredDepths );
|
||||||
newModeledWellPath->setName( wellPath->name() + QString( " md=%1" ).arg( wellPathSelItem->m_measuredDepth ) );
|
newModeledWellPath->setName( wellPath->name() + QString( " md=%1" ).arg( wellPathSelItem->m_measuredDepth ) );
|
||||||
|
|
||||||
|
{
|
||||||
|
RimWellPathTarget* newTarget = newModeledWellPath->geometryDefinition()->appendTarget();
|
||||||
|
auto lastPoint = pointVector.back();
|
||||||
|
auto tangent = lastPoint - pointVector[pointVector.size() - 2];
|
||||||
|
newTarget->setAsPointXYZAndTangentTarget( { lastPoint[0], lastPoint[1], lastPoint[2] }, tangent );
|
||||||
|
}
|
||||||
|
|
||||||
newModeledWellPath->geometryDefinition()->enableTargetPointPicking( true );
|
newModeledWellPath->geometryDefinition()->enableTargetPointPicking( true );
|
||||||
|
|
||||||
newModeledWellPath->createWellPathGeometry();
|
newModeledWellPath->createWellPathGeometry();
|
||||||
if ( wellPathGroup )
|
if ( wellPathGroup )
|
||||||
{
|
{
|
||||||
@ -94,7 +103,8 @@ void RicNewWellPathLateralAtDepthFeature::onActionTriggered( bool isChecked )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wellPathCollection->addWellPath( newModeledWellPath, false );
|
bool importedWellPath = false;
|
||||||
|
wellPathCollection->addWellPath( newModeledWellPath, importedWellPath );
|
||||||
wellPathCollection->groupWellPaths( { wellPath, newModeledWellPath } );
|
wellPathCollection->groupWellPaths( { wellPath, newModeledWellPath } );
|
||||||
}
|
}
|
||||||
newModeledWellPath->firstAncestorOrThisOfTypeAsserted( wellPathGroup );
|
newModeledWellPath->firstAncestorOrThisOfTypeAsserted( wellPathGroup );
|
||||||
|
@ -37,6 +37,9 @@
|
|||||||
class RimMultipleValveLocations;
|
class RimMultipleValveLocations;
|
||||||
class RimWellPath;
|
class RimWellPath;
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
class RimWellPathValve : public RimCheckableNamedObject, public RimWellPathComponentInterface
|
class RimWellPathValve : public RimCheckableNamedObject, public RimWellPathComponentInterface
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
|
@ -1029,6 +1029,8 @@ bool RimWellPath::isAssociatedWithSimulationWell() const
|
|||||||
void RimWellPath::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
void RimWellPath::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||||
{
|
{
|
||||||
|
RimProject::current()->reloadCompletionTypeResultsInAllViews();
|
||||||
|
|
||||||
updateConnectedEditors();
|
updateConnectedEditors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -633,6 +633,11 @@ void RimWellPathGeometryDef::initAfterRead()
|
|||||||
{
|
{
|
||||||
m_useAutoGeneratedTargetAtSeaLevel = false;
|
m_useAutoGeneratedTargetAtSeaLevel = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for ( auto wt : m_wellTargets )
|
||||||
|
{
|
||||||
|
if ( wt ) wt->moved.connect( this, &RimWellPathGeometryDef::onTargetMoved );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -58,15 +58,15 @@ public:
|
|||||||
void setFixedWellPathPoints( const std::vector<cvf::Vec3d>& points );
|
void setFixedWellPathPoints( const std::vector<cvf::Vec3d>& points );
|
||||||
void setFixedMeasuredDepths( const std::vector<double>& mds );
|
void setFixedMeasuredDepths( const std::vector<double>& mds );
|
||||||
|
|
||||||
std::vector<RimWellPathTarget*> createTargets( const std::vector<cvf::Vec3d>& points);
|
std::vector<RimWellPathTarget*> createTargets( const std::vector<cvf::Vec3d>& points );
|
||||||
|
|
||||||
std::pair<RimWellPathTarget*, RimWellPathTarget*>
|
std::pair<RimWellPathTarget*, RimWellPathTarget*>
|
||||||
findActiveTargetsAroundInsertionPoint( const RimWellPathTarget* targetToInsertBefore );
|
findActiveTargetsAroundInsertionPoint( const RimWellPathTarget* targetToInsertBefore );
|
||||||
|
|
||||||
cvf::ref<RigWellPath> createWellPathGeometry();
|
cvf::ref<RigWellPath> createWellPathGeometry();
|
||||||
void insertTarget( const RimWellPathTarget* targetToInsertBefore, RimWellPathTarget* targetToInsert );
|
void insertTarget( const RimWellPathTarget* targetToInsertBefore, RimWellPathTarget* targetToInsert );
|
||||||
void deleteTarget( RimWellPathTarget* targetTodelete );
|
void deleteTarget( RimWellPathTarget* targetTodelete );
|
||||||
void deleteAllTargets();
|
void deleteAllTargets();
|
||||||
RimWellPathTarget* appendTarget();
|
RimWellPathTarget* appendTarget();
|
||||||
|
|
||||||
const RimWellPathTarget* firstActiveTarget() const;
|
const RimWellPathTarget* firstActiveTarget() const;
|
||||||
@ -102,7 +102,6 @@ private:
|
|||||||
RiaLineArcWellPathCalculator lineArcWellPathCalculator() const;
|
RiaLineArcWellPathCalculator lineArcWellPathCalculator() const;
|
||||||
|
|
||||||
void updateTargetAtSeaLevel();
|
void updateTargetAtSeaLevel();
|
||||||
void test();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<cvf::Vec3d> m_referencePointUtmXyd;
|
caf::PdmField<cvf::Vec3d> m_referencePointUtmXyd;
|
||||||
|
@ -37,7 +37,6 @@ CAF_PDM_SOURCE_INIT( RimWellPathGroup, "WellPathGroup" );
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimWellPathGroup::RimWellPathGroup()
|
RimWellPathGroup::RimWellPathGroup()
|
||||||
: wellPathAddedOrRemoved( this )
|
|
||||||
{
|
{
|
||||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Well Path Group",
|
CAF_PDM_InitScriptableObjectWithNameAndComment( "Well Path Group",
|
||||||
":/WellPathGroup.svg",
|
":/WellPathGroup.svg",
|
||||||
@ -290,6 +289,20 @@ QString RimWellPathGroup::createGroupName() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if no imported well path is present, use all modeled well paths
|
||||||
|
if ( allNames.empty() )
|
||||||
|
{
|
||||||
|
std::vector<RimModeledWellPath*> descendantWellPaths;
|
||||||
|
this->descendantsOfType( descendantWellPaths );
|
||||||
|
for ( auto wellPath : descendantWellPaths )
|
||||||
|
{
|
||||||
|
if ( wellPath )
|
||||||
|
{
|
||||||
|
allNames.push_back( wellPath->name() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString commonRoot = RiaTextStringTools::commonRoot( allNames );
|
QString commonRoot = RiaTextStringTools::commonRoot( allNames );
|
||||||
QString trimmedCommonRoot = RiaTextStringTools::trimNonAlphaNumericCharacters( commonRoot );
|
QString trimmedCommonRoot = RiaTextStringTools::trimNonAlphaNumericCharacters( commonRoot );
|
||||||
|
|
||||||
@ -323,6 +336,9 @@ QString RimWellPathGroup::createGroupName() const
|
|||||||
nameWithoutSpaces.remove( ' ' );
|
nameWithoutSpaces.remove( ' ' );
|
||||||
|
|
||||||
if ( nameWithoutSpaces.length() > 8 ) fullName = trimmedCommonRoot + trimmedCommonSuffix;
|
if ( nameWithoutSpaces.length() > 8 ) fullName = trimmedCommonRoot + trimmedCommonSuffix;
|
||||||
|
|
||||||
|
if ( fullName.isEmpty() ) fullName = "Well 1";
|
||||||
|
|
||||||
return fullName;
|
return fullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,10 +25,13 @@ class RimWellPathValve;
|
|||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
class RimWellPathGroup : public RimWellPath
|
class RimWellPathGroup : public RimWellPath
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
caf::Signal<> wellPathAddedOrRemoved;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RimWellPathGroup();
|
RimWellPathGroup();
|
||||||
|
Loading…
Reference in New Issue
Block a user