mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3312 Well Path Creation: Update intersections, completion type result and fractures when moving the wellpath
This commit is contained in:
parent
50b10d6078
commit
0431540073
@ -32,6 +32,7 @@
|
|||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include "RivPartPriority.h"
|
#include "RivPartPriority.h"
|
||||||
#include "cafPdmUiCommandSystemProxy.h"
|
#include "cafPdmUiCommandSystemProxy.h"
|
||||||
|
#include "RimModeledWellPath.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
@ -58,8 +59,6 @@ RicPointTangentManipulator::~RicPointTangentManipulator()
|
|||||||
void RicPointTangentManipulator::setOrigin(const cvf::Vec3d& origin)
|
void RicPointTangentManipulator::setOrigin(const cvf::Vec3d& origin)
|
||||||
{
|
{
|
||||||
m_partManager->setOrigin(origin);
|
m_partManager->setOrigin(origin);
|
||||||
|
|
||||||
emit notifyRedraw();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -68,8 +67,6 @@ void RicPointTangentManipulator::setOrigin(const cvf::Vec3d& origin)
|
|||||||
void RicPointTangentManipulator::setTangent(const cvf::Vec3d& tangent)
|
void RicPointTangentManipulator::setTangent(const cvf::Vec3d& tangent)
|
||||||
{
|
{
|
||||||
m_partManager->setTangent(tangent);
|
m_partManager->setTangent(tangent);
|
||||||
|
|
||||||
emit notifyRedraw();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -78,7 +75,6 @@ void RicPointTangentManipulator::setTangent(const cvf::Vec3d& tangent)
|
|||||||
void RicPointTangentManipulator::setHandleSize(double handleSize)
|
void RicPointTangentManipulator::setHandleSize(double handleSize)
|
||||||
{
|
{
|
||||||
m_partManager->setHandleSize(handleSize);
|
m_partManager->setHandleSize(handleSize);
|
||||||
emit notifyRedraw();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -108,7 +104,6 @@ bool RicPointTangentManipulator::eventFilter(QObject *obj, QEvent* inputEvent)
|
|||||||
if(m_partManager->isManipulatorActive())
|
if(m_partManager->isManipulatorActive())
|
||||||
{
|
{
|
||||||
emit notifySelected();
|
emit notifySelected();
|
||||||
emit notifyRedraw();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -137,8 +132,6 @@ bool RicPointTangentManipulator::eventFilter(QObject *obj, QEvent* inputEvent)
|
|||||||
|
|
||||||
emit notifyUpdate(origin, tangent);
|
emit notifyUpdate(origin, tangent);
|
||||||
|
|
||||||
emit notifyRedraw();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -154,6 +147,7 @@ bool RicPointTangentManipulator::eventFilter(QObject *obj, QEvent* inputEvent)
|
|||||||
m_partManager->originAndTangent(&origin, &tangent);
|
m_partManager->originAndTangent(&origin, &tangent);
|
||||||
|
|
||||||
emit notifyUpdate(origin, tangent);
|
emit notifyUpdate(origin, tangent);
|
||||||
|
emit notifyDragFinished();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -809,6 +803,10 @@ void RicWellTarget3dEditor::configureAndUpdateUi(const QString& uiConfigName)
|
|||||||
SIGNAL( notifySelected() ),
|
SIGNAL( notifySelected() ),
|
||||||
this,
|
this,
|
||||||
SLOT( slotSelectedIn3D() ) );
|
SLOT( slotSelectedIn3D() ) );
|
||||||
|
QObject::connect(m_manipulator,
|
||||||
|
SIGNAL( notifyDragFinished() ),
|
||||||
|
this,
|
||||||
|
SLOT( slotDragFinished() ) );
|
||||||
m_cvfModel = new cvf::ModelBasicList;
|
m_cvfModel = new cvf::ModelBasicList;
|
||||||
m_ownerViewer->addStaticModelOnce(m_cvfModel.p());
|
m_ownerViewer->addStaticModelOnce(m_cvfModel.p());
|
||||||
}
|
}
|
||||||
@ -871,11 +869,9 @@ void RicWellTarget3dEditor::slotUpdated(const cvf::Vec3d& origin, const cvf::Vec
|
|||||||
domainOrigin.z() = -domainOrigin.z();
|
domainOrigin.z() = -domainOrigin.z();
|
||||||
QVariant originVariant = caf::PdmValueFieldSpecialization < cvf::Vec3d >::convert(domainOrigin);
|
QVariant originVariant = caf::PdmValueFieldSpecialization < cvf::Vec3d >::convert(domainOrigin);
|
||||||
|
|
||||||
std::cout << "RicWellTarget3dEditor::slotUpdated() start" << std::endl;
|
target->enableFullUpdate(false);
|
||||||
|
|
||||||
caf::PdmUiCommandSystemProxy::instance()->setUiValueToField(target->m_targetPoint.uiCapability(), originVariant);
|
caf::PdmUiCommandSystemProxy::instance()->setUiValueToField(target->m_targetPoint.uiCapability(), originVariant);
|
||||||
std::cout << "RicWellTarget3dEditor::slotUpdated() end" << std::endl;
|
target->enableFullUpdate(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RicWellTarget3dEditor::slotSelectedIn3D()
|
void RicWellTarget3dEditor::slotSelectedIn3D()
|
||||||
@ -888,3 +884,19 @@ void RicWellTarget3dEditor::slotSelectedIn3D()
|
|||||||
|
|
||||||
caf::SelectionManager::instance()->setSelectedItemAtLevel(target, caf::SelectionManager::FIRST_LEVEL);
|
caf::SelectionManager::instance()->setSelectedItemAtLevel(target, caf::SelectionManager::FIRST_LEVEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicWellTarget3dEditor::slotDragFinished()
|
||||||
|
{
|
||||||
|
RimWellPathTarget* target = dynamic_cast<RimWellPathTarget*>(this->pdmObject());
|
||||||
|
if ( !target)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
RimModeledWellPath* wellpath;
|
||||||
|
target->firstAncestorOrThisOfTypeAsserted(wellpath);
|
||||||
|
wellpath->scheduleUpdateOfDependentVisualization();
|
||||||
|
}
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void notifySelected();
|
void notifySelected();
|
||||||
void notifyRedraw();
|
void notifyDragFinished();
|
||||||
void notifyUpdate(const cvf::Vec3d& origin, const cvf::Vec3d& tangent);
|
void notifyUpdate(const cvf::Vec3d& origin, const cvf::Vec3d& tangent);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -286,6 +286,7 @@ protected:
|
|||||||
private slots:
|
private slots:
|
||||||
void slotUpdated(const cvf::Vec3d& origin, const cvf::Vec3d& tangent);
|
void slotUpdated(const cvf::Vec3d& origin, const cvf::Vec3d& tangent);
|
||||||
void slotSelectedIn3D();
|
void slotSelectedIn3D();
|
||||||
|
void slotDragFinished();
|
||||||
private:
|
private:
|
||||||
QPointer<RicPointTangentManipulator> m_manipulator;
|
QPointer<RicPointTangentManipulator> m_manipulator;
|
||||||
cvf::ref<cvf::ModelBasicList> m_cvfModel;
|
cvf::ref<cvf::ModelBasicList> m_cvfModel;
|
||||||
|
@ -209,30 +209,26 @@ void RimFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
|
|||||||
setDefaultFractureColorResult();
|
setDefaultFractureColorResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changedField == &m_azimuth || changedField == &m_fractureTemplate || changedField == &m_stimPlanTimeIndexToPlot ||
|
if ( changedField == &m_azimuth
|
||||||
changedField == this->objectToggleField() || changedField == &m_dip || changedField == &m_tilt ||
|
|| changedField == &m_fractureTemplate
|
||||||
changedField == &m_perforationLength)
|
|| changedField == &m_stimPlanTimeIndexToPlot
|
||||||
|
|| changedField == this->objectToggleField()
|
||||||
|
|| changedField == &m_dip
|
||||||
|
|| changedField == &m_tilt
|
||||||
|
|| changedField == &m_perforationLength)
|
||||||
{
|
{
|
||||||
clearCachedNonDarcyProperties();
|
clearCachedNonDarcyProperties();
|
||||||
|
|
||||||
RimEclipseView* rimView = nullptr;
|
|
||||||
this->firstAncestorOrThisOfType(rimView);
|
|
||||||
if (rimView)
|
|
||||||
{
|
|
||||||
RimEclipseCase* eclipseCase = nullptr;
|
RimEclipseCase* eclipseCase = nullptr;
|
||||||
rimView->firstAncestorOrThisOfType(eclipseCase);
|
this->firstAncestorOrThisOfType(eclipseCase);
|
||||||
if (eclipseCase)
|
if ( eclipseCase )
|
||||||
{
|
{
|
||||||
RiaCompletionTypeCalculationScheduler::instance()->scheduleRecalculateCompletionTypeAndRedrawAllViews(
|
RiaCompletionTypeCalculationScheduler::instance()->scheduleRecalculateCompletionTypeAndRedrawAllViews(
|
||||||
eclipseCase);
|
eclipseCase);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Can be triggered from well path, find active view
|
RiaCompletionTypeCalculationScheduler::instance()->scheduleRecalculateCompletionTypeAndRedrawAllViews();
|
||||||
RimProject* proj;
|
|
||||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
|
||||||
proj->reloadCompletionTypeResultsInAllViews();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,8 @@ public:
|
|||||||
bool hasDefiningPoints() const;
|
bool hasDefiningPoints() const;
|
||||||
|
|
||||||
int branchIndex() const;
|
int branchIndex() const;
|
||||||
|
void rebuildGeometryAndScheduleCreateDisplayModel();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual caf::PdmFieldHandle* userDescriptionField();
|
virtual caf::PdmFieldHandle* userDescriptionField();
|
||||||
virtual caf::PdmFieldHandle* objectToggleField();
|
virtual caf::PdmFieldHandle* objectToggleField();
|
||||||
@ -140,7 +142,6 @@ private:
|
|||||||
void updateWellExtentDefaultValue();
|
void updateWellExtentDefaultValue();
|
||||||
void addExtents(std::vector<cvf::Vec3d> &polyLine) const;
|
void addExtents(std::vector<cvf::Vec3d> &polyLine) const;
|
||||||
void updateName();
|
void updateName();
|
||||||
void rebuildGeometryAndScheduleCreateDisplayModel();
|
|
||||||
static double azimuthInRadians(cvf::Vec3d vec);
|
static double azimuthInRadians(cvf::Vec3d vec);
|
||||||
private:
|
private:
|
||||||
cvf::ref<RivIntersectionPartMgr> m_crossSectionPartMgr;
|
cvf::ref<RivIntersectionPartMgr> m_crossSectionPartMgr;
|
||||||
|
@ -25,6 +25,11 @@
|
|||||||
|
|
||||||
#include "cafPdmUiTreeOrdering.h"
|
#include "cafPdmUiTreeOrdering.h"
|
||||||
#include "RimPlotCurve.h"
|
#include "RimPlotCurve.h"
|
||||||
|
#include "RiaCompletionTypeCalculationScheduler.h"
|
||||||
|
#include "RimIntersection.h"
|
||||||
|
#include "RimWellPath.h"
|
||||||
|
#include "RimWellPathFractureCollection.h"
|
||||||
|
#include "RimWellPathFracture.h"
|
||||||
|
|
||||||
|
|
||||||
CAF_PDM_SOURCE_INIT(RimModeledWellPath, "ModeledWellPath");
|
CAF_PDM_SOURCE_INIT(RimModeledWellPath, "ModeledWellPath");
|
||||||
@ -67,9 +72,6 @@ void RimModeledWellPath::createWellPathGeometry()
|
|||||||
void RimModeledWellPath::updateWellPathVisualization()
|
void RimModeledWellPath::updateWellPathVisualization()
|
||||||
{
|
{
|
||||||
this->setWellPathGeometry(m_geometryDefinition->createWellPathGeometry().p());
|
this->setWellPathGeometry(m_geometryDefinition->createWellPathGeometry().p());
|
||||||
RimProject* proj;
|
|
||||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
|
||||||
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
|
||||||
|
|
||||||
std::vector<RimPlotCurve*> refferingCurves;
|
std::vector<RimPlotCurve*> refferingCurves;
|
||||||
this->objectsWithReferringPtrFieldsOfType(refferingCurves);
|
this->objectsWithReferringPtrFieldsOfType(refferingCurves);
|
||||||
@ -78,6 +80,32 @@ void RimModeledWellPath::updateWellPathVisualization()
|
|||||||
{
|
{
|
||||||
curve->loadDataAndUpdate(false);
|
curve->loadDataAndUpdate(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for ( auto fracture : this->fractureCollection()->activeFractures() )
|
||||||
|
{
|
||||||
|
fracture->loadDataAndUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<RimIntersection*> refferingIntersections;
|
||||||
|
this->objectsWithReferringPtrFieldsOfType(refferingIntersections);
|
||||||
|
|
||||||
|
for (auto intersection: refferingIntersections)
|
||||||
|
{
|
||||||
|
intersection->rebuildGeometryAndScheduleCreateDisplayModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
RimProject* proj;
|
||||||
|
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||||
|
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimModeledWellPath::scheduleUpdateOfDependentVisualization()
|
||||||
|
{
|
||||||
|
|
||||||
|
RiaCompletionTypeCalculationScheduler::instance()->scheduleRecalculateCompletionTypeAndRedrawAllViews();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -35,6 +35,7 @@ public:
|
|||||||
|
|
||||||
void createWellPathGeometry();
|
void createWellPathGeometry();
|
||||||
void updateWellPathVisualization();
|
void updateWellPathVisualization();
|
||||||
|
void scheduleUpdateOfDependentVisualization();
|
||||||
RimWellPathGeometryDef* geometryDefinition();
|
RimWellPathGeometryDef* geometryDefinition();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -24,6 +24,7 @@ RimWellPathTarget::RimWellPathTarget()
|
|||||||
, m_targetPoint(cvf::Vec3d::ZERO)
|
, m_targetPoint(cvf::Vec3d::ZERO)
|
||||||
, m_azimuth(0.0)
|
, m_azimuth(0.0)
|
||||||
, m_inclination(0.0)
|
, m_inclination(0.0)
|
||||||
|
, m_isFullUpdateEnabled(true)
|
||||||
{
|
{
|
||||||
|
|
||||||
CAF_PDM_InitField(&m_isEnabled, "IsEnabled", true, "", "", "", "");
|
CAF_PDM_InitField(&m_isEnabled, "IsEnabled", true, "", "", "", "");
|
||||||
@ -173,6 +174,14 @@ double RimWellPathTarget::radius2() const
|
|||||||
return 30.0/cvf::Math::toRadians(m_dogleg2);
|
return 30.0/cvf::Math::toRadians(m_dogleg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellPathTarget::enableFullUpdate(bool enable)
|
||||||
|
{
|
||||||
|
m_isFullUpdateEnabled = enable;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -195,6 +204,10 @@ void RimWellPathTarget::fieldChangedByUi(const caf::PdmFieldHandle* changedField
|
|||||||
RimModeledWellPath* wellPath;
|
RimModeledWellPath* wellPath;
|
||||||
firstAncestorOrThisOfTypeAsserted(wellPath);
|
firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||||
wellPath->updateWellPathVisualization();
|
wellPath->updateWellPathVisualization();
|
||||||
|
if (m_isFullUpdateEnabled)
|
||||||
|
{
|
||||||
|
wellPath->scheduleUpdateOfDependentVisualization();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -54,6 +54,8 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RicWellTarget3dEditor;
|
friend class RicWellTarget3dEditor;
|
||||||
|
void enableFullUpdate(bool enable);
|
||||||
|
bool m_isFullUpdateEnabled;
|
||||||
caf::PdmField<bool> m_isEnabled;
|
caf::PdmField<bool> m_isEnabled;
|
||||||
caf::PdmField<caf::AppEnum<TargetTypeEnum> > m_targetType;
|
caf::PdmField<caf::AppEnum<TargetTypeEnum> > m_targetType;
|
||||||
caf::PdmField<cvf::Vec3d> m_targetPoint;
|
caf::PdmField<cvf::Vec3d> m_targetPoint;
|
||||||
|
Loading…
Reference in New Issue
Block a user